diff --git a/.gitignore b/.gitignore index 91d0a67bad..ce51d79fa6 100644 --- a/.gitignore +++ b/.gitignore @@ -114,3 +114,5 @@ temp/ # JetBrains .idea + +packages/allow-scripts/types diff --git a/config/tsconfig.base.json b/config/tsconfig.base.json new file mode 100644 index 0000000000..8925daf6fb --- /dev/null +++ b/config/tsconfig.base.json @@ -0,0 +1,13 @@ +{ + "compilerOptions": { + "allowJs": true, + "allowSyntheticDefaultImports": true, + "checkJs": true, + "declaration": true, + "declarationMap": true, + "emitDeclarationOnly": true, + "composite": true, + "types": ["node"] + }, + "extends": "@tsconfig/node14/tsconfig.json" +} diff --git a/package-lock.json b/package-lock.json index 4f42453784..682da1e2d7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -15,6 +15,9 @@ "@commitlint/cli": "^17.6.7", "@commitlint/config-conventional": "^17.6.7", "@metamask/eslint-config-nodejs": "^12.0.0", + "@tsconfig/node14": "^14.1.0", + "@types/node": "^20.4.1", + "@types/yargs": "^17.0.24", "ava": "^5.3.1", "conventional-changelog-conventionalcommits": "^6.1.0", "cross-env": "^7.0.3", @@ -26,7 +29,8 @@ "eslint-plugin-react": "^7.33.0", "husky": "^8.0.3", "lerna": "^7.1.4", - "lint-staged": "^13.2.3" + "lint-staged": "^13.2.3", + "typescript": "^5.1.6" }, "engines": { "node": ">=14.0.0" @@ -3144,9 +3148,10 @@ "license": "MIT" }, "node_modules/@tsconfig/node14": { - "version": "1.0.3", - "dev": true, - "license": "MIT" + "version": "14.1.0", + "resolved": "https://registry.npmjs.org/@tsconfig/node14/-/node14-14.1.0.tgz", + "integrity": "sha512-VmsCG04YR58ciHBeJKBDNMWWfYbyP8FekWVuTlpstaUPlat1D0x/tXzkWP7yCMU0eSz9V4OZU0LBWTFJ3xZf6w==", + "dev": true }, "node_modules/@tsconfig/node16": { "version": "1.0.4", @@ -3356,6 +3361,15 @@ "dev": true, "license": "MIT" }, + "node_modules/@types/npmcli__promise-spawn": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/@types/npmcli__promise-spawn/-/npmcli__promise-spawn-6.0.0.tgz", + "integrity": "sha512-UeAlcVTkwHOrjZ4MLG+t/oNTvYa9Zg1qewaWMyG0NmHGpY6OqygGoDjq6uPNDqSiIXFxsDS9sgx8aHNBxGbyMg==", + "dev": true, + "dependencies": { + "@types/node": "*" + } + }, "node_modules/@types/parse-json": { "version": "4.0.0", "dev": true, @@ -3471,6 +3485,21 @@ "@types/node": "*" } }, + "node_modules/@types/yargs": { + "version": "17.0.24", + "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.24.tgz", + "integrity": "sha512-6i0aC7jV6QzQB8ne1joVZ0eSFIstHsCrobmOtghM11yGlH0j43FKL2UhWdELkyps0zuf7qVTUVCCR+tgSlyLLw==", + "dev": true, + "dependencies": { + "@types/yargs-parser": "*" + } + }, + "node_modules/@types/yargs-parser": { + "version": "21.0.0", + "resolved": "https://registry.npmjs.org/@types/yargs-parser/-/yargs-parser-21.0.0.tgz", + "integrity": "sha512-iO9ZQHkZxHn4mSakYV0vFHAVDyEOIJQrV2uZ06HxEPcx+mt8swXoZHIbaaJ2crJYFfErySgktuTZ3BeLz+XmFA==", + "dev": true + }, "node_modules/@vue/compiler-core": { "version": "3.3.1", "dev": true, @@ -18801,6 +18830,12 @@ } } }, + "node_modules/ts-node/node_modules/@tsconfig/node14": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@tsconfig/node14/-/node14-1.0.3.tgz", + "integrity": "sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==", + "dev": true + }, "node_modules/ts-node/node_modules/arg": { "version": "4.1.3", "dev": true, @@ -20063,11 +20098,14 @@ "@npmcli/run-script": "^6.0.0", "bin-links": "4.0.1", "npm-normalize-package-bin": "^3.0.0", - "yargs": "^16.2.0" + "yargs": "^17.7.2" }, "bin": { "allow-scripts": "src/cli.js" }, + "devDependencies": { + "@types/npmcli__promise-spawn": "^6.0.0" + }, "engines": { "node": ">=14.0.0" } diff --git a/package.json b/package.json index 64fbf42081..42a998c48e 100644 --- a/package.json +++ b/package.json @@ -9,6 +9,9 @@ "@commitlint/cli": "^17.6.7", "@commitlint/config-conventional": "^17.6.7", "@metamask/eslint-config-nodejs": "^12.0.0", + "@tsconfig/node14": "^14.1.0", + "@types/node": "^20.4.1", + "@types/yargs": "^17.0.24", "ava": "^5.3.1", "conventional-changelog-conventionalcommits": "^6.1.0", "cross-env": "^7.0.3", @@ -20,6 +23,7 @@ "eslint-plugin-react": "^7.33.0", "husky": "^8.0.3", "lerna": "^7.1.4", + "typescript": "^5.1.6", "lint-staged": "^13.2.3" }, "engines": { @@ -32,8 +36,12 @@ "lint:eslint": "eslint .", "lint:fix": "eslint . --fix", "lint:deps": "lerna run lint:deps", - "build": "npm -w @lavamoat/lavapack -w @lavamoat/viz -w @lavamoat/yarn-plugin-allow-scripts run build", + "build": "npm -w @lavamoat/lavapack -w @lavamoat/viz -w @lavamoat/yarn-plugin-allow-scripts run build && npm run build:types", + "build:types": "tsc -b", + "clean:types": "tsc -b --clean", + "watch:types": "tsc -b --watch", "rebuild": "npm -w @lavamoat/lavapack -w @lavamoat/viz -w @lavamoat/yarn-plugin-allow-scripts run rebuild", + "rebuild:types": "npm run clean:types; npm run build:types", "lint:staged": "lint-staged", "lint:commit": "commitlint", "postinstall": "husky install", diff --git a/packages/allow-scripts/.depcheckrc b/packages/allow-scripts/.depcheckrc index cfbbd2ca32..949fe1ec1d 100644 --- a/packages/allow-scripts/.depcheckrc +++ b/packages/allow-scripts/.depcheckrc @@ -1,3 +1,7 @@ ignores: # monorepo deps - 'ava' + - "@types/npmcli__promise-spawn" + + # only types (from @types/npmcli__promise-spawn) are referenced + - "@npmcli/promise-spawn" diff --git a/packages/allow-scripts/package.json b/packages/allow-scripts/package.json index 5f3782e28e..eb3c921ef8 100644 --- a/packages/allow-scripts/package.json +++ b/packages/allow-scripts/package.json @@ -15,7 +15,7 @@ "@npmcli/run-script": "^6.0.0", "bin-links": "4.0.1", "npm-normalize-package-bin": "^3.0.0", - "yargs": "^16.2.0" + "yargs": "^17.7.2" }, "repository": { "type": "git", @@ -29,6 +29,9 @@ "directories": { "test": "test" }, + "devDependencies": { + "@types/npmcli__promise-spawn": "^6.0.0" + }, "scripts": { "test": "npm run test:prep && test:run", "test:run": "ava", @@ -45,5 +48,6 @@ "test/*.spec.js" ], "timeout": "30s" - } + }, + "types": "./types/index.d.ts" } diff --git a/packages/allow-scripts/src/cli.js b/packages/allow-scripts/src/cli.js index 8286fb6166..9510ced414 100755 --- a/packages/allow-scripts/src/cli.js +++ b/packages/allow-scripts/src/cli.js @@ -1,9 +1,10 @@ #!/usr/bin/env node -const yargs = require('yargs') +const yargs = require('yargs/yargs') +const { hideBin } = require('yargs/helpers') const { runAllowedPackages, setDefaultConfiguration, printPackagesList } = require('./index.js') const { writeRcFile, editPackageJson } = require('./setup.js') -const { FEATURE } = require('./toggles') +const { FEATURE } = require('./toggles') start().catch((err) => { console.error(err) @@ -46,7 +47,7 @@ async function start () { } function parseArgs () { - const argsParser = yargs + const argsParser = yargs(hideBin(process.argv)) .usage('Usage: $0 [options]') .command('$0', 'run the allowed scripts') .command('run', 'run the allowed scripts') @@ -60,7 +61,7 @@ function parseArgs () { }) .help() - const parsedArgs = argsParser.parse() + const parsedArgs = argsParser.parseSync() parsedArgs.command = parsedArgs._[0] return parsedArgs diff --git a/packages/allow-scripts/src/index.js b/packages/allow-scripts/src/index.js index 1b5c5b47b5..aa5b55dff2 100644 --- a/packages/allow-scripts/src/index.js +++ b/packages/allow-scripts/src/index.js @@ -11,19 +11,23 @@ const setup = require('./setup') /** * @typedef {Object} PkgConfs - * @property {Object} packageJson + * @property {Record} packageJson * @property {Object} configs * @property {ScriptsConfig} configs.lifecycle * @property {BinsConfig} configs.bin * @property {boolean} somePoliciesAreMissing - * - * Individual package info + */ + +/** + * Individual package info * @typedef {Object} PkgInfo * @property {string} canonicalName * @property {string} path * @property {Object} scripts - * - * Individual bin link info + */ + +/** + * Individual bin link info * @typedef {Object} BinInfo * @property {string} canonicalName * @property {boolean} isDirect @@ -31,25 +35,31 @@ const setup = require('./setup') * @property {string} path * @property {string} link * @property {string} fullLinkPath - * +**/ + +/** * Configuration for a type of scripts policies * @typedef {Object} ScriptsConfig - * @property {Object} allowConfig + * @property {Record} allowConfig * @property {Map} packagesWithScripts - * @property {Array} allowedPatterns - * @property {Array} disallowedPatterns - * @property {Array} missingPolicies - * @property {Array} excessPolicies - * - * @typedef {Map} BinCandidates - * + * @property {Array} allowedPatterns + * @property {Array} disallowedPatterns + * @property {Array} missingPolicies + * @property {Array} excessPolicies + */ + +/** + * @typedef {Map} BinCandidates + */ + +/** * Configuration for a type of bins policies * @typedef {Object} BinsConfig - * @property {Object} allowConfig + * @property {Record} allowConfig * @property {BinCandidates} binCandidates * @property {Array} allowedBins * @property {Array} firewalledBins - * @property {Array} excessPolicies + * @property {Array} excessPolicies * @property {boolean} somePoliciesAreMissing */ @@ -61,6 +71,10 @@ module.exports = { setup, } +/** + * + * @param {GetOptionsForBinOpts} param0 + */ async function getOptionsForBin({ rootDir, name }) { const { configs: { @@ -74,6 +88,10 @@ async function getOptionsForBin({ rootDir, name }) { } +/** + * @param {RunAllowedPackagesOpts} param0 + * @returns {Promise} + */ async function runAllowedPackages({ rootDir }) { const { configs: { @@ -131,6 +149,9 @@ async function runAllowedPackages({ rootDir }) { await runScript({ event: 'prepare', path: rootDir }) } +/** + * @param {SetDefaultConfigurationOpts} param0 + */ async function setDefaultConfiguration({ rootDir }) { const conf = await loadAllPackageConfigurations({ rootDir }) const { @@ -167,6 +188,10 @@ async function setDefaultConfiguration({ rootDir }) { }) } +/** + * @param {PrintPackagesListOpts} param0 + * @returns {Promise} + */ async function printPackagesList({ rootDir }) { const { configs: { @@ -180,6 +205,10 @@ async function printPackagesList({ rootDir }) { } +/** + * + * @param {PrintMissingPoliciesIfAnyOpts} param0 + */ function printMissingPoliciesIfAny({ missingPolicies = [], packagesWithScripts = new Map() }) { if(missingPolicies.length) { console.log('packages missing configuration:') @@ -193,8 +222,8 @@ function printMissingPoliciesIfAny({ missingPolicies = [], packagesWithScripts = // internals /** - * - * @param {Object} arg + * + * @param {Object} arg * @param {string} arg.event * @param {Array} arg.packages */ @@ -207,7 +236,8 @@ async function runAllScriptsForEvent({ event, packages }) { } } /** - * @param {Array} allowedBins + * @param {Array} allowedBins + * @returns {Promise} */ async function installBinScripts(allowedBins) { for (const { bin, path, link, canonicalName } of allowedBins) { @@ -217,8 +247,9 @@ async function installBinScripts(allowedBins) { } /** * Points all bins on the list to whichbin.js cli app from allow-scripts - * @param {Array} firewalledBins + * @param {Array} firewalledBins * @param {string} link - absolute path to the whichbin.js script + * @returns {Promise} */ async function installBinFirewall(firewalledBins, link) { // Note how we take the path of the original package so that the bin is added at the appropriate level of node_modules nesting @@ -227,6 +258,10 @@ async function installBinFirewall(firewalledBins, link) { } } +/** + * @param {RunScriptOpts} param0 + * @returns {Promise} + */ async function runScript({ path, event }) { await npmRunScript({ // required, the script to run @@ -250,9 +285,10 @@ async function runScript({ path, event }) { const bannedBins = new Set(['node', 'npm', 'yarn', 'pnpm']) /** - * @param {BinCandidates} binCandidates + * @param {BinCandidates} binCandidates */ function prepareBinScriptsPolicy(binCandidates) { + /** @type {Record} */ const policy = {} // pick direct dependencies without conflicts and enable them by default unless colliding with bannedBins for ( const [bin, infos] of binCandidates.entries()) { @@ -267,7 +303,7 @@ function prepareBinScriptsPolicy(binCandidates) { /** - * @param {BinsConfig} param0 + * @param {BinsConfig} param0 */ function printPackagesByBins({ allowedBins, @@ -292,7 +328,7 @@ function printPackagesByBins({ } /** - * @param {ScriptsConfig} param0 + * @param {ScriptsConfig} param0 */ function printPackagesByScriptConfiguration({ packagesWithScripts, @@ -340,11 +376,9 @@ function printPackagesByScriptConfiguration({ } /** - * - * @param {Object} args - * @param {string} args.rootDir - * @param {PkgConfs} args.conf - * @returns {Promise} + * + * @param {SavePackageConfigurationsOpts} param0 + * @returns {Promise} */ async function savePackageConfigurations({ rootDir, conf: { packageJson, @@ -362,8 +396,8 @@ async function savePackageConfigurations({ rootDir, conf: { } /** - * - * @param {Object} args + * + * @param {Object} args * @param {string} args.rootDir * @returns {Promise} */ @@ -412,7 +446,7 @@ async function loadAllPackageConfigurations({ rootDir }) { } collection.push({ // canonical name for a direct dependency is just dependency name - isDirect: directDeps.has(canonicalName), + isDirect: directDeps.has(canonicalName), bin: name, path: filePath, link, @@ -482,6 +516,11 @@ function indexBinsConfiguration(config) { return config } +/** + * + * @param {(value: any) => any} getterFn + * @returns {(a: any, b: any) => 1|-1|0} + */ function sortBy(getterFn) { return (a, b) => { const aVal = getterFn(a) @@ -495,3 +534,44 @@ function sortBy(getterFn) { } } } + +/** + * @typedef RunScriptOpts + * @property {string} event + * @property {string} path + */ + + +/** + * @typedef SavePackageConfigurationsOpts + * @property {string} rootDir + * @property {PkgConfs} conf + */ + +/** + * @typedef GetOptionsForBinOpts + * @property {string} rootDir + * @property {string} name + * + */ + +/** + * @typedef RunAllowedPackagesOpts + * @property {string} rootDir + */ + +/** + * @typedef PrintPackagesListOpts + * @property {string} rootDir + */ + +/** + * @typedef SetDefaultConfigurationOpts + * @property {string} rootDir + */ + +/** + * @typedef PrintMissingPoliciesIfAnyOpts + * @property {string[]} [missingPolicies] + * @property {Map} [packagesWithScripts] + */ diff --git a/packages/allow-scripts/src/linker.js b/packages/allow-scripts/src/linker.js index 4dfdf9c786..7aeccf8ff4 100644 --- a/packages/allow-scripts/src/linker.js +++ b/packages/allow-scripts/src/linker.js @@ -1,6 +1,6 @@ // @ts-check // All of this is derived from the main functionality of bin-links that unfortunately would not allow for absolute path links -const { promises: fs } = require('fs') + const binTarget = require('bin-links/lib/bin-target.js') const isWindows = require('bin-links/lib/is-windows.js') const linkBin = isWindows ? require('bin-links/lib/shim-bin.js') : require('bin-links/lib/link-bin.js') @@ -8,6 +8,9 @@ const linkBin = isWindows ? require('bin-links/lib/shim-bin.js') : require('bin- const { dirname, resolve, relative } = require('path') +/** + * @param {LinkBinOpts} opts + */ const linkBinRelative = ({ path, bin, link, top = undefined, force = true }) => { const target = binTarget({ path, top }) const to = resolve(target, bin) @@ -16,6 +19,9 @@ const linkBinRelative = ({ path, bin, link, top = undefined, force = true }) => return linkBin({ path, from, to, absFrom, force }) } +/** + * @param {LinkBinOpts} opts + */ const linkBinAbsolute = ({ path, bin, link, top = undefined, force = true }) => { const target = binTarget({ path, top }) const to = resolve(target, bin) @@ -28,3 +34,12 @@ module.exports = { linkBinRelative, linkBinAbsolute, } + +/** + * @typedef LinkBinOpts + * @property {string} path + * @property {string} bin + * @property {string} link + * @property {string} [top] + * @property {boolean} [force] + */ diff --git a/packages/allow-scripts/src/setup.js b/packages/allow-scripts/src/setup.js index 924f45a912..cfc3c7d495 100755 --- a/packages/allow-scripts/src/setup.js +++ b/packages/allow-scripts/src/setup.js @@ -35,11 +35,22 @@ module.exports = { editPackageJson, } +/** + * + * @param {string} filename + * @returns {string} + */ function addInstallParentDir(filename) { const rootDir = process.env.INIT_CWD || process.cwd() return path.join(rootDir, filename) } +/** + * + * @param {string} entry + * @param {string} file + * @returns {boolean} + */ function isEntryPresent(entry, file) { const rcPath = addInstallParentDir(file) if (!existsSync(rcPath)) { @@ -49,6 +60,10 @@ function isEntryPresent(entry, file) { return rcFileContents.includes(entry) } +/** + * + * @param {WriteRcFileContentOpts} param0 + */ function writeRcFileContent({file, entry}) { const rcPath = addInstallParentDir(file) @@ -60,11 +75,14 @@ function writeRcFileContent({file, entry}) { } } +/** + * @type {boolean} + */ let binsBlockedMemo + /** * - * @param {Object} args - * @param {boolean} noMemoization - turn off memoization, make a fresh lookup + * @param {AreBinsBlockedOpts} args * @returns {boolean} */ function areBinsBlocked({ noMemoization = false } = {}) { @@ -156,3 +174,14 @@ function editPackageJson () { writeFileSync(addInstallParentDir('package.json'), JSON.stringify(packageJson, null, 2)) } } + +/** + * @typedef WriteRcFileContentOpts + * @property {string} file + * @property {string} entry + */ + +/** + * @typedef AreBinsBlockedOpts + * @property {boolean} [noMemoization] turn off memoization, make a fresh lookup + */ diff --git a/packages/allow-scripts/src/types/bin-links/bin-target.d.ts b/packages/allow-scripts/src/types/bin-links/bin-target.d.ts new file mode 100644 index 0000000000..972ff2f778 --- /dev/null +++ b/packages/allow-scripts/src/types/bin-links/bin-target.d.ts @@ -0,0 +1,12 @@ +declare module "bin-links/lib/bin-target.js" { + namespace binTarget { + interface BinTargetOptions { + top?: string; + path: string; + } + } + + function binTarget(opts: binTarget.BinTargetOptions): string; + + export = binTarget; +} diff --git a/packages/allow-scripts/src/types/bin-links/is-windows.d.ts b/packages/allow-scripts/src/types/bin-links/is-windows.d.ts new file mode 100644 index 0000000000..169023204c --- /dev/null +++ b/packages/allow-scripts/src/types/bin-links/is-windows.d.ts @@ -0,0 +1,4 @@ +declare module "bin-links/lib/is-windows.js" { + var isWindows: boolean; + export = isWindows; +} diff --git a/packages/allow-scripts/src/types/bin-links/link-bin.d.ts b/packages/allow-scripts/src/types/bin-links/link-bin.d.ts new file mode 100644 index 0000000000..107ad18f27 --- /dev/null +++ b/packages/allow-scripts/src/types/bin-links/link-bin.d.ts @@ -0,0 +1,15 @@ +declare module "bin-links/lib/link-bin.js" { + namespace linkBin { + interface LinkBinOptions { + path: string; + from: string; + to: string; + absFrom: string; + force: boolean; + } + } + + function linkBin(opts: linkBin.LinkBinOptions): Promise; + + export = linkBin; +} diff --git a/packages/allow-scripts/src/types/bin-links/shim-bin..d.ts b/packages/allow-scripts/src/types/bin-links/shim-bin..d.ts new file mode 100644 index 0000000000..00e2546c93 --- /dev/null +++ b/packages/allow-scripts/src/types/bin-links/shim-bin..d.ts @@ -0,0 +1,15 @@ +declare module "bin-links/lib/shim-bin.js" { + namespace shimBin { + interface ShimBinOptions { + path: string; + from: string; + to: string; + absFrom: string; + force: boolean; + } + } + + function shimBin(opts: shimBin.ShimBinOptions): Promise; + + export = shimBin; +} diff --git a/packages/allow-scripts/src/types/lavamoat__aa.d.ts b/packages/allow-scripts/src/types/lavamoat__aa.d.ts new file mode 100644 index 0000000000..23e5399909 --- /dev/null +++ b/packages/allow-scripts/src/types/lavamoat__aa.d.ts @@ -0,0 +1,15 @@ +// XXX: temporary while `@lavamoat/aa` exports no types + +declare module "@lavamoat/aa" { + export interface Resolver { + sync(path: string, opts: { basedir: string }): string; + } + export interface LoadCanonicalNameMapOpts { + rootDir: string; + includeDevDeps?: boolean; + resolve?: Resolver; + } + export function loadCanonicalNameMap( + opts: LoadCanonicalNameMapOpts + ): Promise>; +} diff --git a/packages/allow-scripts/src/types/npm-normalize-package-bin.d.ts b/packages/allow-scripts/src/types/npm-normalize-package-bin.d.ts new file mode 100644 index 0000000000..346a837766 --- /dev/null +++ b/packages/allow-scripts/src/types/npm-normalize-package-bin.d.ts @@ -0,0 +1,19 @@ +declare module "npm-normalize-package-bin" { + namespace normalizePackageBin { + interface PackageBin { + name: string; + bin?: string | Record; + } + + interface NormalizedPackageBin { + name: string; + bin?: Record; + } + } + + function normalizePackageBin( + pkg: normalizePackageBin.PackageBin + ): normalizePackageBin.NormalizedPackageBin; + + export = normalizePackageBin; +} diff --git a/packages/allow-scripts/src/types/npmcli__run-script.d.ts b/packages/allow-scripts/src/types/npmcli__run-script.d.ts new file mode 100644 index 0000000000..3846c004d4 --- /dev/null +++ b/packages/allow-scripts/src/types/npmcli__run-script.d.ts @@ -0,0 +1,22 @@ +declare module "@npmcli/run-script" { + import { StdioOptions } from "node:child_process"; + import type PromiseSpawn from "@npmcli/promise-spawn"; + + namespace npmRunScript { + interface RunScriptOptions { + event: string; + path: string; + scriptShell?: string; + env?: Record; + stdio?: StdioOptions; + stdioString?: boolean; + banner?: boolean; + } + } + + function npmRunScript( + opts: npmRunScript.RunScriptOptions + ): ReturnType; + + export = npmRunScript; +} diff --git a/packages/allow-scripts/tsconfig.json b/packages/allow-scripts/tsconfig.json new file mode 100644 index 0000000000..0153e64ea4 --- /dev/null +++ b/packages/allow-scripts/tsconfig.json @@ -0,0 +1,9 @@ +{ + "extends": "../../config/tsconfig.base.json", + "include": ["src"], + "compilerOptions": { + "outDir": "types", + "rootDir": "src", + "skipLibCheck": false + } +} diff --git a/tsconfig.json b/tsconfig.json new file mode 100644 index 0000000000..0b3e903d4a --- /dev/null +++ b/tsconfig.json @@ -0,0 +1,8 @@ +{ + "files": [], + "references": [ + { + "path": "packages/allow-scripts" + } + ] +}