Skip to content

Commit 37583b0

Browse files
committed
fixup! Bump decoupled local dependencies.
1 parent 840d443 commit 37583b0

3 files changed

Lines changed: 48 additions & 20 deletions

File tree

libraries/heft-config-file/src/test/ConfigurationFile.test.ts

Lines changed: 32 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -837,7 +837,14 @@ describe('ConfigurationFile', () => {
837837
},
838838
{
839839
plugin: FileSystem.getRealPath(
840-
nodeJsPath.resolve(projectRoot, 'node_modules', '@rushstack', 'heft', 'lib', 'index.js')
840+
nodeJsPath.resolve(
841+
projectRoot,
842+
'node_modules',
843+
'@rushstack',
844+
'heft',
845+
'lib-commonjs',
846+
'index.js'
847+
)
841848
)
842849
},
843850
{
@@ -918,7 +925,14 @@ describe('ConfigurationFile', () => {
918925
},
919926
{
920927
plugin: await FileSystem.getRealPathAsync(
921-
nodeJsPath.resolve(projectRoot, 'node_modules', '@rushstack', 'heft', 'lib', 'index.js')
928+
nodeJsPath.resolve(
929+
projectRoot,
930+
'node_modules',
931+
'@rushstack',
932+
'heft',
933+
'lib-commonjs',
934+
'index.js'
935+
)
922936
)
923937
},
924938
{
@@ -1001,7 +1015,14 @@ describe('ConfigurationFile', () => {
10011015
},
10021016
{
10031017
plugin: FileSystem.getRealPath(
1004-
nodeJsPath.resolve(projectRoot, 'node_modules', '@rushstack', 'heft', 'lib', 'index.js')
1018+
nodeJsPath.resolve(
1019+
projectRoot,
1020+
'node_modules',
1021+
'@rushstack',
1022+
'heft',
1023+
'lib-commonjs',
1024+
'index.js'
1025+
)
10051026
)
10061027
},
10071028
{
@@ -1082,7 +1103,14 @@ describe('ConfigurationFile', () => {
10821103
},
10831104
{
10841105
plugin: await FileSystem.getRealPathAsync(
1085-
nodeJsPath.resolve(projectRoot, 'node_modules', '@rushstack', 'heft', 'lib', 'index.js')
1106+
nodeJsPath.resolve(
1107+
projectRoot,
1108+
'node_modules',
1109+
'@rushstack',
1110+
'heft',
1111+
'lib-commonjs',
1112+
'index.js'
1113+
)
10861114
)
10871115
},
10881116
{

libraries/node-core-library/src/test/Import.test.ts

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ describe(Import.name, () => {
5353
Path.convertToSlashes(
5454
Import.resolveModule({ modulePath: '@rushstack/heft', baseFolderPath: __dirname })
5555
)
56-
).toMatch(/node_modules\/@rushstack\/heft\/lib\/index.js$/);
56+
).toMatch(/node_modules\/@rushstack\/heft\/lib-commonjs\/index.js$/);
5757
});
5858

5959
it('resolves a path inside a dependency', () => {
@@ -86,29 +86,29 @@ describe(Import.name, () => {
8686
baseFolderPath: nodeJsPath.join(packageRoot, 'node_modules', '@rushstack', 'heft')
8787
})
8888
)
89-
).toMatch(/node_modules\/@rushstack\/ts-command-line\/lib\/index\.js$/);
89+
).toMatch(/node_modules\/@rushstack\/ts-command-line\/lib-commonjs\/index\.js$/);
9090
});
9191

9292
it('resolves a path inside a dependency of a dependency', () => {
9393
expect(
9494
Path.convertToSlashes(
9595
Import.resolveModule({
96-
modulePath: '@rushstack/ts-command-line/lib/Constants.js',
96+
modulePath: '@rushstack/ts-command-line/lib-commonjs/Constants.js',
9797
baseFolderPath: nodeJsPath.join(packageRoot, 'node_modules', '@rushstack', 'heft')
9898
})
9999
)
100-
).toMatch(/node_modules\/@rushstack\/ts-command-line\/lib\/Constants\.js$/);
100+
).toMatch(/node_modules\/@rushstack\/ts-command-line\/lib-commonjs\/Constants\.js$/);
101101
});
102102

103103
it('resolves a path inside a dependency of a dependency without an extension', () => {
104104
expect(
105105
Path.convertToSlashes(
106106
Import.resolveModule({
107-
modulePath: '@rushstack/ts-command-line/lib/Constants',
107+
modulePath: '@rushstack/ts-command-line/lib-commonjs/Constants',
108108
baseFolderPath: nodeJsPath.join(packageRoot, 'node_modules', '@rushstack', 'heft')
109109
})
110110
)
111-
).toMatch(/node_modules\/@rushstack\/ts-command-line\/lib\/Constants\.js$/);
111+
).toMatch(/node_modules\/@rushstack\/ts-command-line\/lib-commonjs\/Constants\.js$/);
112112
});
113113

114114
describe('allowSelfReference', () => {
@@ -122,11 +122,11 @@ describe(Import.name, () => {
122122
).toEqual(packageRoot);
123123
expect(
124124
Import.resolveModule({
125-
modulePath: '@rushstack/node-core-library/lib/Constants.js',
125+
modulePath: '@rushstack/node-core-library/lib-commonjs/Constants.js',
126126
baseFolderPath: __dirname,
127127
allowSelfReference: true
128128
})
129-
).toEqual(nodeJsPath.join(packageRoot, 'lib', 'Constants.js'));
129+
).toEqual(nodeJsPath.join(packageRoot, 'lib-commonjs', 'Constants.js'));
130130
});
131131

132132
it('resolves the real path inside a package with allowSelfReference turned on', () => {
@@ -150,7 +150,7 @@ describe(Import.name, () => {
150150
);
151151
expectToThrowNormalizedErrorMatchingSnapshot(() =>
152152
Import.resolveModule({
153-
modulePath: '@rushstack/node-core-library/lib/Constants.js',
153+
modulePath: '@rushstack/node-core-library/lib-commonjs/Constants.js',
154154
baseFolderPath: __dirname
155155
})
156156
);
@@ -206,7 +206,7 @@ describe(Import.name, () => {
206206
expectToThrowNormalizedErrorMatchingSnapshot(() =>
207207
Path.convertToSlashes(
208208
Import.resolvePackage({
209-
packageName: '@rushstack/heft/lib/start.js',
209+
packageName: '@rushstack/heft/lib-commonjs/start.js',
210210
baseFolderPath: __dirname
211211
})
212212
)
@@ -228,7 +228,7 @@ describe(Import.name, () => {
228228
expectToThrowNormalizedErrorMatchingSnapshot(() =>
229229
Path.convertToSlashes(
230230
Import.resolvePackage({
231-
packageName: '@rushstack/ts-command-line/lib/Constants.js',
231+
packageName: '@rushstack/ts-command-line/lib-commonjs/Constants.js',
232232
baseFolderPath: nodeJsPath.join(packageRoot, 'node_modules', '@rushstack', 'heft')
233233
})
234234
)
@@ -263,7 +263,7 @@ describe(Import.name, () => {
263263
it('fails to resolve a path inside this package with allowSelfReference turned on', () => {
264264
expectToThrowNormalizedErrorMatchingSnapshot(() =>
265265
Import.resolvePackage({
266-
packageName: '@rushstack/node-core-library/lib/Constants.js',
266+
packageName: '@rushstack/node-core-library/lib-commonjs/Constants.js',
267267
baseFolderPath: __dirname,
268268
allowSelfReference: true
269269
})

libraries/node-core-library/src/test/__snapshots__/Import.test.ts.snap

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,19 @@
22

33
exports[`Import resolveModule allowSelfReference throws on an attempt to reference this package without allowSelfReference turned on 1`] = `"Cannot find module \\"@rushstack/node-core-library\\" from \\"<packageRoot>/lib-commonjs/test\\": Error: Cannot find module '@rushstack/node-core-library' from '<dirname>'"`;
44
5-
exports[`Import resolveModule allowSelfReference throws on an attempt to reference this package without allowSelfReference turned on 2`] = `"Cannot find module \\"@rushstack/node-core-library/lib/Constants.js\\" from \\"<packageRoot>/lib-commonjs/test\\": Error: Cannot find module '@rushstack/node-core-library/lib/Constants.js' from '<dirname>'"`;
5+
exports[`Import resolveModule allowSelfReference throws on an attempt to reference this package without allowSelfReference turned on 2`] = `"Cannot find module \\"@rushstack/node-core-library/lib-commonjs/Constants.js\\" from \\"<packageRoot>/lib-commonjs/test\\": Error: Cannot find module '@rushstack/node-core-library/lib-commonjs/Constants.js' from '<dirname>'"`;
66
77
exports[`Import resolveModule includeSystemModules throws on an attempt to resolve a non-existing path inside a system module with includeSystemModules turned on 1`] = `"Cannot find module \\"fs/foo/bar\\" from \\"<packageRoot>/lib-commonjs/test\\": Error: Cannot find module 'fs/foo/bar' from '<dirname>'"`;
88
99
exports[`Import resolveModule includeSystemModules throws on an attempt to resolve a system module without includeSystemModules turned on 1`] = `"Cannot find module \\"fs\\" from \\"<packageRoot>/lib-commonjs/test\\"."`;
1010
11-
exports[`Import resolvePackage allowSelfReference fails to resolve a path inside this package with allowSelfReference turned on 1`] = `"The package name \\"@rushstack/node-core-library/lib/Constants.js\\" contains an invalid character: \\"/\\""`;
11+
exports[`Import resolvePackage allowSelfReference fails to resolve a path inside this package with allowSelfReference turned on 1`] = `"The package name \\"@rushstack/node-core-library/lib-commonjs/Constants.js\\" contains an invalid character: \\"/\\""`;
1212
1313
exports[`Import resolvePackage allowSelfReference throws on an attempt to reference this package without allowSelfReference turned on 1`] = `"Cannot find package \\"@rushstack/node-core-library\\" from \\"<packageRoot>/lib-commonjs/test\\": Error: Cannot find module '@rushstack/node-core-library/package.json' from '<dirname>'."`;
1414
15-
exports[`Import resolvePackage fails to resolve a path inside a dependency 1`] = `"The package name \\"@rushstack/heft/lib/start.js\\" contains an invalid character: \\"/\\""`;
15+
exports[`Import resolvePackage fails to resolve a path inside a dependency 1`] = `"The package name \\"@rushstack/heft/lib-commonjs/start.js\\" contains an invalid character: \\"/\\""`;
1616
17-
exports[`Import resolvePackage fails to resolve a path inside a dependency of a dependency 1`] = `"The package name \\"@rushstack/ts-command-line/lib/Constants.js\\" contains an invalid character: \\"/\\""`;
17+
exports[`Import resolvePackage fails to resolve a path inside a dependency of a dependency 1`] = `"The package name \\"@rushstack/ts-command-line/lib-commonjs/Constants.js\\" contains an invalid character: \\"/\\""`;
1818
1919
exports[`Import resolvePackage includeSystemModules throws on an attempt to resolve a non-existing path inside a system module with includeSystemModules turned on 1`] = `"The package name \\"fs/foo/bar\\" contains an invalid character: \\"/\\""`;
2020

0 commit comments

Comments
 (0)