Skip to content

Commit 2697d39

Browse files
committed
chore(deps): bump webpack and backstage-cli
This change bumps the webpack version and backstage-cli versions, along with the relevant changes needed to fix the build and tests. Assisted-by: Cursor
1 parent fadd3b8 commit 2697d39

4 files changed

Lines changed: 189 additions & 52 deletions

File tree

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
},
3838
"dependencies": {
3939
"@backstage/cli": "0.34.1",
40-
"@backstage/cli-common": "^0.1.15",
40+
"@backstage/cli-common": "^0.1.17",
4141
"@backstage/cli-node": "^0.2.12",
4242
"@backstage/config": "^1.3.2",
4343
"@backstage/config-loader": "^1.9.5",
@@ -80,7 +80,7 @@
8080
"style-loader": "^3.3.1",
8181
"swc-loader": "^0.2.3",
8282
"typescript-json-schema": "^0.64.0",
83-
"webpack": "~5.96.0",
83+
"webpack": "~5.104.1",
8484
"webpack-dev-server": "^5.0.0",
8585
"yaml": "^2.5.1",
8686
"yml-loader": "^2.1.0",

src/lib/bundler/LinkedPackageResolvePlugin.test.ts

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,42 @@
1414
* limitations under the License.
1515
*/
1616

17+
import * as fs from 'fs';
1718
import * as os from 'os';
1819
import * as path from 'path';
1920

2021
import { LinkedPackageResolvePlugin } from './LinkedPackageResolvePlugin';
2122

2223
describe('LinkedPackageResolvePlugin', () => {
23-
const root = os.platform() === 'win32' ? 'C:\\root' : '/root';
24+
// Use a temp dir so isChildPath (realpathSync) can access paths; /root may be inaccessible (EACCES).
25+
const root = path.join(
26+
os.tmpdir(),
27+
`linked-package-resolve-plugin-test-${Date.now()}`,
28+
);
29+
30+
beforeAll(() => {
31+
const dirs = [
32+
path.join(root, 'external-a'),
33+
path.join(root, 'external-a/src'),
34+
path.join(root, 'external-b'),
35+
path.join(root, 'external-b/src'),
36+
path.join(root, 'external-aa'),
37+
path.join(root, 'external-aa/src'),
38+
path.join(root, 'repo/package/x/src'),
39+
path.join(root, 'repo/node_modules'),
40+
];
41+
for (const dir of dirs) {
42+
fs.mkdirSync(dir, { recursive: true });
43+
}
44+
});
45+
46+
afterAll(() => {
47+
try {
48+
fs.rmSync(root, { recursive: true });
49+
} catch {
50+
// ignore cleanup errors
51+
}
52+
});
2453

2554
it('should re-write paths for external packages', () => {
2655
const plugin = new LinkedPackageResolvePlugin(

src/lib/bundler/optimization.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ export const optimization = (
3333
format: 'iife',
3434
}),
3535
],
36-
runtimeChunk: 'single',
36+
runtimeChunk: { name: _ => 'runtime' },
3737
splitChunks: {
3838
automaticNameDelimiter: '-',
3939
cacheGroups: {

0 commit comments

Comments
 (0)