This reverts commit 4becc1bc9531b79e0d834e453981655897571bdf. The changes to the case-sensitivity handling in #36968 caused multiple projects to fail to build. See #36992, #36993 and #37000. The issue is related to the logical path handling. But it is felt that it is safer to revert the entire PR and then to investigate further. PR Close #37003
This commit is contained in:
parent
00cc02fb0c
commit
0fc0d9bb3d
@ -68,9 +68,7 @@ export class NodeJSFileSystem implements FileSystem {
|
||||
}
|
||||
isCaseSensitive(): boolean {
|
||||
if (this._caseSensitive === undefined) {
|
||||
// Note the use of the real file-system is intentional:
|
||||
// `this.exists()` relies upon `isCaseSensitive()` so that would cause an infinite recursion.
|
||||
this._caseSensitive = !fs.existsSync(togglePathCase(__filename));
|
||||
this._caseSensitive = this.exists(togglePathCase(__filename));
|
||||
}
|
||||
return this._caseSensitive;
|
||||
}
|
||||
|
@ -153,6 +153,14 @@ describe('NodeJSFileSystem', () => {
|
||||
expect(mkdirCalls).toEqual([xPath, xyPath, xyzPath]);
|
||||
});
|
||||
|
||||
describe('removeDeep()', () => {
|
||||
it('should delegate to fsExtra.remove()', () => {
|
||||
const spy = spyOn(fsExtra, 'removeSync');
|
||||
fs.removeDeep(abcPath);
|
||||
expect(spy).toHaveBeenCalledWith(abcPath);
|
||||
});
|
||||
});
|
||||
|
||||
it('should not fail if a directory (that did not exist before) does exist when trying to create it',
|
||||
() => {
|
||||
let abcPathExists = false;
|
||||
@ -220,19 +228,4 @@ describe('NodeJSFileSystem', () => {
|
||||
expect(isDirectorySpy).toHaveBeenCalledTimes(1);
|
||||
});
|
||||
});
|
||||
|
||||
describe('removeDeep()', () => {
|
||||
it('should delegate to fsExtra.remove()', () => {
|
||||
const spy = spyOn(fsExtra, 'removeSync');
|
||||
fs.removeDeep(abcPath);
|
||||
expect(spy).toHaveBeenCalledWith(abcPath);
|
||||
});
|
||||
});
|
||||
|
||||
describe('isCaseSensitive()', () => {
|
||||
it('should return true if the FS is case-sensitive', () => {
|
||||
const isCaseSensitive = !realFs.existsSync(__filename.toUpperCase());
|
||||
expect(fs.isCaseSensitive()).toEqual(isCaseSensitive);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user