Skip to content

Commit 8a8db52

Browse files
committed
Update constraints file and node version
1 parent af5966b commit 8a8db52

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@
9090
"devEngines": {
9191
"packageManager": {
9292
"name": "yarn",
93-
"version": "^4.8.1",
93+
"version": "^4.12.0",
9494
"onFail": "warn"
9595
},
9696
"runtime": {

yarn.config.cjs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,14 @@ module.exports = defineConfig({
2323
}
2424
}
2525

26-
// Make sure that if the dependency is defined in the root workspace
27-
// that all child workspaces use the same version of that dependency
2826
const [rootWorkspace] = Yarn.workspaces({ ident: name });
2927

3028
// There should not be any resolutions value for js-slang,
3129
// which might be present if you linked js-slang to a local copy
3230
rootWorkspace.set('resolutions.js-slang', undefined);
3331

32+
// Make sure that if the dependency is defined in the root workspace
33+
// that all child workspaces use the same version of that dependency
3434
for (const workspaceDep of Yarn.dependencies({ workspace: rootWorkspace })) {
3535
for (const otherDep of Yarn.dependencies({ ident: workspaceDep.ident })) {
3636
if (otherDep.type === 'peerDependencies') continue;
@@ -49,6 +49,12 @@ module.exports = defineConfig({
4949
) {
5050
dep.update('workspace:^');
5151
}
52+
53+
// @types dependencies should be devDependencies, not dependencies
54+
if (dep.ident.startsWith('@types') && dep.type === 'dependencies') {
55+
dep.workspace.set(`devDependencies.${dep.ident}`, dep.range);
56+
dep.update(undefined);
57+
}
5258
}
5359

5460
// Repotools should not be allowed to depend on any other packages in this

0 commit comments

Comments
 (0)