From 7f6f8101af9f9cf486bb616ddb18205807a68836 Mon Sep 17 00:00:00 2001 From: Avi Vahl Date: Fri, 3 Jan 2025 18:29:18 +0200 Subject: [PATCH] infra: use node16 moduleResolution - to support "exports" going forward - downgraded chai types to match chai vesion. new resolution correctly detected it being an esm-only types being imported from our commonjs repository --- package-lock.json | 18 ++++-------------- package.json | 2 +- pleb.config.mjs | 5 ++++- tsconfig.base.json | 4 ++-- 4 files changed, 11 insertions(+), 18 deletions(-) diff --git a/package-lock.json b/package-lock.json index fd4c894..1dc1d47 100644 --- a/package-lock.json +++ b/package-lock.json @@ -11,7 +11,7 @@ ], "devDependencies": { "@ts-tools/node": "^6.1.0", - "@types/chai": "^5.0.1", + "@types/chai": "^4.3.20", "@types/mocha": "^10.0.10", "@types/node": "22", "@webref/css": "~6.12.15", @@ -348,19 +348,9 @@ } }, "node_modules/@types/chai": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/@types/chai/-/chai-5.0.1.tgz", - "integrity": "sha512-5T8ajsg3M/FOncpLYW7sdOcD6yf4+722sze/tc4KQV0P8Z2rAr3SAuHCIkYmYpt8VbcQlnz8SxlOlPQYefe4cA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/deep-eql": "*" - } - }, - "node_modules/@types/deep-eql": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/@types/deep-eql/-/deep-eql-4.0.2.tgz", - "integrity": "sha512-c9h9dVVMigMPc4bwTvC5dxqtqJZwQPePsWjPlpSOnojbor6pGqdk541lfA7AqFQr5pB1BRdq0juY9db81BwyFw==", + "version": "4.3.20", + "resolved": "https://registry.npmjs.org/@types/chai/-/chai-4.3.20.tgz", + "integrity": "sha512-/pC9HAB5I/xMlc5FP77qjCnI16ChlJfW0tGa0IUcFn38VJrTV6DeZ60NU5KZBtaOZqjdpwTWohz5HU1RrhiYxQ==", "dev": true, "license": "MIT" }, diff --git a/package.json b/package.json index be125d2..e3b33f6 100644 --- a/package.json +++ b/package.json @@ -16,7 +16,7 @@ }, "devDependencies": { "@ts-tools/node": "^6.1.0", - "@types/chai": "^5.0.1", + "@types/chai": "^4.3.20", "@types/mocha": "^10.0.10", "@types/node": "22", "@webref/css": "~6.12.15", diff --git a/pleb.config.mjs b/pleb.config.mjs index ed31aaf..52acc3e 100644 --- a/pleb.config.mjs +++ b/pleb.config.mjs @@ -1,3 +1,6 @@ export default { - pinnedPackages: [{ name: 'chai', reason: 'esm only from v5' }], + pinnedPackages: [ + { name: 'chai', reason: 'esm only from v5' }, + { name: '@types/chai', reason: 'esm only from v5' }, + ], }; diff --git a/tsconfig.base.json b/tsconfig.base.json index 9d552fc..b6761cc 100644 --- a/tsconfig.base.json +++ b/tsconfig.base.json @@ -25,9 +25,9 @@ // "moduleDetection": "auto", /* Control what method is used to detect module-format JS files. */ /* Modules */ - "module": "commonjs", /* Specify what module code is generated. */ + "module": "node16", /* Specify what module code is generated. */ // "rootDir": "./", /* Specify the root folder within your source files. */ - "moduleResolution": "node", /* Specify how TypeScript looks up a file from a given module specifier. */ + "moduleResolution": "node16", /* Specify how TypeScript looks up a file from a given module specifier. */ // "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */ // "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */ // "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */