-
Notifications
You must be signed in to change notification settings - Fork 13.2k
Open
Description
🔎 Search Terms
CaseInsensitive CaseSensitive
🕗 Version & Regression Information
- This changed between versions ______ and _______
- This changed in commit or PR _______
- This is the behavior in every version I tried, and I reviewed the FAQ for entries about _________
- I was unable to test this on prior versions because _______
⏯ Playground Link
No response
💻 Code
// Your code here🙁 Actual behavior
Repository on overlayfs with CaseSensitive filesystem and symlinlinked node_modules outside of repo to pnpm virtual-store with CaseInsensitive filesystem (mac os)
and any source ts-files with capital letter, like obtainRuntimeContextHandlerResults.ts
Then type checking is falling down with the error:
~/overlayfsrepo/frontend/packages/composer/src/utils/obtainRuntimeContextHandlerResults.ts
0:0 error Parsing error: ESLint was configured to run on `<tsconfigRootDir>/src/utils/obtainRuntimeContextHandlerResults.ts` using `parserOptions.project`: <tsconfigRootDir>/tsconfig.json
However, that TSConfig does not include this file. Either:
- Change ESLint's list of included files to not include this file
- Change that TSConfig to include this file
- Create a new TSConfig that includes this file and include it in your parserOptions.project
See the typescript-eslint docs for more info: https://typescript-eslint.io/troubleshooting/typed-linting#i-get-errors-telling-me-eslint-was-configured-to-run--however-that-tsconfig-does-not--none-of-those-tsconfigs-include-this-file
to fix that we use that pnpm-patch
diff --git a/lib/typescript.js b/lib/typescript.js
index 2643aa12aa6497ca0b90ecd99b202f37ea0e6330..34757f4fb1a2958bec5142c6e365c4214a2f36fb 100644
--- a/lib/typescript.js
+++ b/lib/typescript.js
@@ -8277,11 +8277,11 @@ var sys = (() => {
const isLinuxOrMacOs = process.platform === "linux" || isMacOs;
const statSyncOptions = { throwIfNoEntry: false };
const platform = _os.platform();
+ const getCurrentDirectory = memoize(() => process.cwd());
const useCaseSensitiveFileNames2 = isFileSystemCaseSensitive();
const fsRealpath = !!_fs.realpathSync.native ? process.platform === "win32" ? fsRealPathHandlingLongPath : _fs.realpathSync.native : _fs.realpathSync;
const executingFilePath = __filename.endsWith("sys.js") ? _path.join(_path.dirname(__dirname), "__fake__.js") : __filename;
const fsSupportsRecursiveFsWatch = process.platform === "win32" || isMacOs;
- const getCurrentDirectory = memoize(() => process.cwd());
const { watchFile: watchFile2, watchDirectory } = createSystemWatchFunctions({
pollingWatchFileWorker: fsWatchFileWorker,
getModifiedTime: getModifiedTime3,
@@ -8484,7 +8484,7 @@ var sys = (() => {
if (platform === "win32" || platform === "win64") {
return false;
}
- return !fileExists(swapCase(__filename));
+ return !fileExists(swapCase(getCurrentDirectory()));
}
function swapCase(s) {
return s.replace(/\w/g, (ch) => {
it would be better to fix it in the upstream
🙂 Expected behavior
the system calcs the source dir, not the node_modules or pnpm-virtual-store dir
Additional information about the issue
the fix is https://github.com/microsoft/TypeScript/pull/63099/changes
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels