@@ -18,12 +18,55 @@ const { basename, resolve } = require('path');
1818const semver = require ( 'semver' ) ;
1919const { inspect } = require ( 'util' ) ;
2020
21+ /**
22+ * Snap inner packages (snap bundle + site dapp) are exempt from all
23+ * constraints for now. Add a new entry here when migrating additional snaps.
24+ *
25+ * TODO: align these packages with monorepo conventions and remove this list.
26+ */
27+ const SNAP_PACKAGES = new Set ( [
28+ 'packages/snaps/simple-keyring' ,
29+ 'packages/snaps/simple-keyring/packages/snap' ,
30+ 'packages/snaps/simple-keyring/packages/site' ,
31+ ] ) ;
32+
2133/**
2234 * These packages and ranges are allowed to mismatch expected consistency checks
2335 * Only intended as temporary measures to faciliate upgrades and releases.
2436 * This should trend towards empty.
2537 */
26- const ALLOWED_INCONSISTENT_DEPENDENCIES = { } ;
38+ const ALLOWED_INCONSISTENT_DEPENDENCIES = {
39+ // Snap packages (simple-keyring) carry older dep versions from their
40+ // standalone repo origin. These will be aligned in a follow-up.
41+ '@lavamoat/allow-scripts' : [ '^2.0.3' ] ,
42+ '@metamask/auto-changelog' : [ '^3.3.0' ] ,
43+ '@metamask/eslint-config' : [ '^12.2.0' ] ,
44+ '@metamask/eslint-config-jest' : [ '^12.1.0' ] ,
45+ '@metamask/eslint-config-nodejs' : [ '^12.1.0' ] ,
46+ '@metamask/eslint-config-typescript' : [ '^12.1.0' ] ,
47+ '@typescript-eslint/eslint-plugin' : [ '^5.33.0' , '^5.55.0' ] ,
48+ '@typescript-eslint/parser' : [ '^5.33.0' , '^5.55.0' ] ,
49+ '@ethereumjs/common' : [ '^3.1.2' ] ,
50+ '@ethereumjs/tx' : [ '^4.1.2' ] ,
51+ '@ethereumjs/util' : [ '^8.0.5' ] ,
52+ '@metamask/eth-sig-util' : [ '^7.0.1' ] ,
53+ '@metamask/snaps-sdk' : [ '^11.0.0' , '^11.1.0' ] ,
54+ '@types/node' : [ '^20.6.2' ] ,
55+ 'depcheck' : [ '^1.4.6' ] ,
56+ 'eslint' : [ '^8.21.0' , '^8.36.0' ] ,
57+ 'eslint-config-prettier' : [ '^8.1.0' , '^8.7.0' ] ,
58+ 'eslint-plugin-import' : [ '^2.26.0' , '^2.27.5' ] ,
59+ 'eslint-plugin-jest' : [ '^26.8.2' , '^27.2.1' ] ,
60+ 'eslint-plugin-jsdoc' : [ '^39.2.9' , '^40.0.3' ] ,
61+ 'eslint-plugin-n' : [ '^16.1.0' , '^16.6.2' ] ,
62+ 'eslint-plugin-prettier' : [ '^4.2.1' ] ,
63+ 'eslint-plugin-promise' : [ '^6.1.1' ] ,
64+ 'prettier' : [ '^2.2.1' , '^2.8.4' ] ,
65+ 'rimraf' : [ '^3.0.2' , '^4.4.0' ] ,
66+ 'typescript' : [ '^4.7.4' , '^4.9.5' ] ,
67+ 'uuid' : [ '^9.0.0' ] ,
68+ 'semver' : [ '^7.5.4' ] ,
69+ } ;
2770
2871/**
2972 * Aliases for the Yarn type definitions, to make the code more readable.
@@ -52,6 +95,10 @@ module.exports = defineConfig({
5295 ) ;
5396
5497 for ( const workspace of Yarn . workspaces ( ) ) {
98+ if ( SNAP_PACKAGES . has ( workspace . cwd ) ) {
99+ continue ;
100+ }
101+
55102 const workspaceBasename = getWorkspaceBasename ( workspace ) ;
56103 const isChildWorkspace = workspace . cwd !== '.' ;
57104 const isPrivate =
0 commit comments