diff --git a/CHANGELOG.md b/CHANGELOG.md index 739ccfd1fd57..be254901c24c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,6 +20,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Add `justify-normal` and `justify-stretch` utilities ([#10560](https://github.com/tailwindlabs/tailwindcss/pull/10560)) - Add `content-normal` and `content-stretch` utilities ([#10645](https://github.com/tailwindlabs/tailwindcss/pull/10645)) - Add `line-clamp` utilities from `@tailwindcss/line-clamp` to core ([#10768](https://github.com/tailwindlabs/tailwindcss/pull/10768)) +- Enable ESM and TS based config files ([#10785](https://github.com/tailwindlabs/tailwindcss/pull/10785)) ### Fixed diff --git a/integrations/execute.js b/integrations/execute.js index 57dc14e8ed41..f5ab2131804a 100644 --- a/integrations/execute.js +++ b/integrations/execute.js @@ -26,7 +26,7 @@ module.exports = function $(command, options = {}) { let args = options.shell ? [command] : (() => { - let args = command.split(' ') + let args = command.trim().split(/\s+/) command = args.shift() command = command === 'node' diff --git a/integrations/io.js b/integrations/io.js index 383776838a4e..c555ac8ba02c 100644 --- a/integrations/io.js +++ b/integrations/io.js @@ -97,10 +97,12 @@ module.exports = function ({ }, async removeFile(file) { let filePath = path.resolve(toolRoot, file) + if (!fileCache[filePath]) { - fileCache[filePath] = await fs.readFile(filePath, 'utf8') + fileCache[filePath] = await fs.readFile(filePath, 'utf8').catch(() => null) } - await fs.unlink(filePath) + + await fs.unlink(filePath).catch(() => null) }, async readOutputFile(file) { file = await resolveFile(file, absoluteOutputFolder) diff --git a/integrations/tailwindcss-cli/tests/cli.test.js b/integrations/tailwindcss-cli/tests/cli.test.js index def432cab4e5..f30260b0b6de 100644 --- a/integrations/tailwindcss-cli/tests/cli.test.js +++ b/integrations/tailwindcss-cli/tests/cli.test.js @@ -532,6 +532,46 @@ describe('Build command', () => { }) describe('Init command', () => { + it.each([ + { flags: [], name: 'tailwind.config.js' }, + { flags: ['--ts'], name: 'tailwind.config.ts' }, + { flags: ['--esm'], name: 'tailwind.config.js' }, + { flags: ['--full'], name: 'tailwind.config.js' }, + { flags: ['--ts', '--full'], name: 'tailwind.config.ts' }, + { flags: ['--esm', '--full'], name: 'tailwind.config.js' }, + ])('works with all these flags: %j', async ({ flags, name }) => { + cleanupFile(name) + await removeFile(name) + + let { combined } = await $(`${EXECUTABLE} init ${flags.join(' ')}`) + + expect(combined).toMatchInlineSnapshot(` + " + Created Tailwind CSS config file: ${name} + " + `) + + expect(await fileExists(name)).toBe(true) + + let content = await readOutputFile(`../${name}`) + + if (flags.includes('--ts') || flags.includes('--esm')) { + expect(content).toContain('export default') + expect(content).not.toContain('module.exports =') + } else { + expect(content).toContain('module.exports =') + expect(content).not.toContain('export default') + } + + if (flags.includes('--ts')) { + expect(content).toContain('satisfies Config') + } + + if (flags.includes('--full')) { + expect(content.split('\n').length).toBeGreaterThan(50) + } + }) + test('--full', async () => { cleanupFile('full.config.js') @@ -577,14 +617,19 @@ describe('Init command', () => { tailwindcss init [options] Options: - -f, --full Initialize a full \`tailwind.config.js\` file + --esm Initialize configuration file as ESM + --ts Initialize configuration file as TypeScript -p, --postcss Initialize a \`postcss.config.js\` file + -f, --full Include the default values for all options in the generated configuration file -h, --help Display usage information `) ) }) - test('--help in ESM package', async () => { + test('ESM config is created by default in an ESM project', async () => { + cleanupFile('tailwind.config.js') + await removeFile('tailwind.config.js') + let pkg = await readOutputFile('../package.json') await writeInputFile( @@ -595,27 +640,25 @@ describe('Init command', () => { }) ) - let { combined } = await $(`${EXECUTABLE} init --help`) + let { combined } = await $(`${EXECUTABLE} init`) - expect(dedent(combined)).toEqual( - dedent(` - tailwindcss v${version} + expect(combined).toMatchInlineSnapshot(` + " + Created Tailwind CSS config file: tailwind.config.js + " + `) - Usage: - tailwindcss init [options] + expect(await fileExists('./tailwind.config.js')).toBe(true) - Options: - -f, --full Initialize a full \`tailwind.config.cjs\` file - -p, --postcss Initialize a \`postcss.config.cjs\` file - -h, --help Display usage information - `) - ) + // Not a clean way to test this. + expect(await readOutputFile('../tailwind.config.js')).toContain('export default') await writeInputFile('../package.json', pkg) }) - test('cjs config created when in ESM package', async () => { - cleanupFile('tailwind.config.cjs') + test('CJS config is created by default in a non-ESM project', async () => { + cleanupFile('tailwind.config.js') + await removeFile('tailwind.config.js') let pkg = await readOutputFile('../package.json') @@ -623,7 +666,6 @@ describe('Init command', () => { '../package.json', JSON.stringify({ ...JSON.parse(pkg), - type: 'module', }) ) @@ -631,14 +673,14 @@ describe('Init command', () => { expect(combined).toMatchInlineSnapshot(` " - Created Tailwind CSS config file: tailwind.config.cjs + Created Tailwind CSS config file: tailwind.config.js " `) - expect(await fileExists('./tailwind.config.cjs')).toBe(true) + expect(await fileExists('./tailwind.config.js')).toBe(true) // Not a clean way to test this. - expect(await readOutputFile('../tailwind.config.cjs')).toContain('module.exports =') + expect(await readOutputFile('../tailwind.config.js')).toContain('module.exports') await writeInputFile('../package.json', pkg) }) diff --git a/loadConfig.d.ts b/loadConfig.d.ts new file mode 100644 index 000000000000..f17ad23d9afc --- /dev/null +++ b/loadConfig.d.ts @@ -0,0 +1,4 @@ +import type { Config } from './types/config' + +declare function loadConfig(path: string): Config +export = loadConfig diff --git a/loadConfig.js b/loadConfig.js new file mode 100644 index 000000000000..838d72de05bc --- /dev/null +++ b/loadConfig.js @@ -0,0 +1,2 @@ +let loadConfig = require('./lib/public/load-config') +module.exports = (loadConfig.__esModule ? loadConfig : { default: loadConfig }).default diff --git a/oxide/Cargo.lock b/oxide/Cargo.lock index f15b12ee3afd..5b959d72682a 100644 --- a/oxide/Cargo.lock +++ b/oxide/Cargo.lock @@ -132,9 +132,12 @@ dependencies = [ [[package]] name = "convert_case" -version = "0.5.0" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb4a24b1aaf0fd0ce8b45161144d6f42cd91677fd5940fd431183eb023b3a2b8" +checksum = "ec182b0ca2f35d8fc196cf3404988fd8b8c739a4d270ff118a398feb0cbec1ca" +dependencies = [ + "unicode-segmentation", +] [[package]] name = "criterion" @@ -461,9 +464,9 @@ checksum = "882a73d9ef23e8dc2ebbffb6a6ae2ef467c0f18ac10711e4cc59c5485d41df0e" [[package]] name = "napi-derive" -version = "2.9.1" +version = "2.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39f3d8b02ef355898ea98f69082d9a183c8701c836942c2daf3e92364e88a0fa" +checksum = "6e367c72b3f0243d490f0cf4feed9a28e40e4e9cba16912951dbeccf6c607576" dependencies = [ "convert_case", "napi-derive-backend", @@ -474,9 +477,9 @@ dependencies = [ [[package]] name = "napi-derive-backend" -version = "1.0.38" +version = "1.0.45" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c35640513eb442fcbd1653a1c112fb6b2cc12b54d82f9c141f5859c721cab36" +checksum = "c2cf4ba5f1f6d51b9b5e2d809e229201f3aa14f198d58ec9ba4ecf82dbabb381" dependencies = [ "convert_case", "once_cell", @@ -908,6 +911,12 @@ version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6ceab39d59e4c9499d4e5a8ee0e2735b891bb7308ac83dfb4e80cad195c9f6f3" +[[package]] +name = "unicode-segmentation" +version = "1.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1dd624098567895118886609431a7c3b8f516e41d30e0643f03d94592a147e36" + [[package]] name = "unicode-width" version = "0.1.10" diff --git a/oxide/crates/node/Cargo.toml b/oxide/crates/node/Cargo.toml index 38735bf5c056..54995fa9ebd3 100644 --- a/oxide/crates/node/Cargo.toml +++ b/oxide/crates/node/Cargo.toml @@ -9,7 +9,7 @@ crate-type = ["cdylib"] [dependencies] # Default enable napi4 feature, see https://nodejs.org/api/n-api.html#node-api-version-matrix napi = { version = "2.10.0", default-features = false, features = ["napi4"] } -napi-derive = "2.9.1" +napi-derive = "2.11.1" tailwindcss-core = { path = "../core" } rayon = "1.5.3" diff --git a/package-lock.json b/package-lock.json index c55ff7e6e2f8..f40cf1db2d97 100644 --- a/package-lock.json +++ b/package-lock.json @@ -18,12 +18,13 @@ "browserslist": "^4.21.5", "chokidar": "^3.5.3", "color-name": "^1.1.4", - "detective": "^5.2.1", + "detective-typescript": "^9.0.0", "didyoumean": "^1.2.2", "dlv": "^1.1.3", "fast-glob": "^3.2.12", "glob-parent": "^6.0.2", "is-glob": "^4.0.3", + "jiti": "^1.17.2", "lightningcss": "^1.18.0", "lilconfig": "^2.1.0", "micromatch": "^4.0.5", @@ -38,7 +39,8 @@ "postcss-selector-parser": "^6.0.11", "postcss-value-parser": "^4.2.0", "quick-lru": "^5.1.1", - "resolve": "^1.22.1" + "resolve": "^1.22.1", + "sucrase": "^3.29.0" }, "bin": { "tailwind": "lib/cli.js", @@ -54,7 +56,7 @@ "cssnano": "^5.1.15", "esbuild": "^0.17.10", "eslint": "^8.35.0", - "eslint-config-prettier": "^8.6.0", + "eslint-config-prettier": "^8.7.0", "eslint-plugin-prettier": "^4.2.1", "jest": "^29.4.3", "jest-diff": "^29.4.3", @@ -924,7 +926,6 @@ "version": "7.21.2", "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.21.2.tgz", "integrity": "sha512-URpaIJQwEkEC2T9Kn+Ai6Xe/02iNaVCuT/PtoRz3GPVJVDpPd7mLo+VddTbhCRU9TXqW5mSrQfXZyi8kDKOVpQ==", - "dev": true, "bin": { "parser": "bin/babel-parser.js" }, @@ -4190,6 +4191,101 @@ "dev": true, "license": "MIT" }, + "node_modules/@typescript-eslint/types": { + "version": "5.54.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.54.1.tgz", + "integrity": "sha512-G9+1vVazrfAfbtmCapJX8jRo2E4MDXxgm/IMOF4oGh3kq7XuK3JRkOg6y2Qu1VsTRmWETyTkWt1wxy7X7/yLkw==", + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/typescript-estree": { + "version": "5.54.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.54.1.tgz", + "integrity": "sha512-bjK5t+S6ffHnVwA0qRPTZrxKSaFYocwFIkZx5k7pvWfsB1I57pO/0M0Skatzzw1sCkjJ83AfGTL0oFIFiDX3bg==", + "dependencies": { + "@typescript-eslint/types": "5.54.1", + "@typescript-eslint/visitor-keys": "5.54.1", + "debug": "^4.3.4", + "globby": "^11.1.0", + "is-glob": "^4.0.3", + "semver": "^7.3.7", + "tsutils": "^3.21.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/typescript-estree/node_modules/array-union": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", + "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", + "engines": { + "node": ">=8" + } + }, + "node_modules/@typescript-eslint/typescript-estree/node_modules/globby": { + "version": "11.1.0", + "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", + "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==", + "dependencies": { + "array-union": "^2.1.0", + "dir-glob": "^3.0.1", + "fast-glob": "^3.2.9", + "ignore": "^5.2.0", + "merge2": "^1.4.1", + "slash": "^3.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@typescript-eslint/typescript-estree/node_modules/semver": { + "version": "7.3.8", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.8.tgz", + "integrity": "sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==", + "dependencies": { + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/@typescript-eslint/visitor-keys": { + "version": "5.54.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.54.1.tgz", + "integrity": "sha512-q8iSoHTgwCfgcRJ2l2x+xCbu8nBlRAlsQ33k24Adj8eoVBE0f8dUeI+bAa8F84Mv05UGbAx57g2zrRsYIooqQg==", + "dependencies": { + "@typescript-eslint/types": "5.54.1", + "eslint-visitor-keys": "^3.3.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, "node_modules/@webassemblyjs/ast": { "version": "1.11.1", "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.11.1.tgz", @@ -4504,7 +4600,9 @@ }, "node_modules/acorn": { "version": "7.4.1", + "dev": true, "license": "MIT", + "peer": true, "bin": { "acorn": "bin/acorn" }, @@ -4521,22 +4619,6 @@ "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" } }, - "node_modules/acorn-node": { - "version": "1.8.2", - "license": "Apache-2.0", - "dependencies": { - "acorn": "^7.0.0", - "acorn-walk": "^7.0.0", - "xtend": "^4.0.2" - } - }, - "node_modules/acorn-walk": { - "version": "7.2.0", - "license": "MIT", - "engines": { - "node": ">=0.4.0" - } - }, "node_modules/ajv": { "version": "6.12.6", "dev": true, @@ -4658,6 +4740,11 @@ "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, + "node_modules/any-promise": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/any-promise/-/any-promise-1.3.0.tgz", + "integrity": "sha512-7UvmKalWRt1wgjL1RrGxoSJW/0QZFIegpeGvZG9kjp8vrRu55XTHbwnqq2GpXm9uLbcuhxm3IqX9OB4MZR1b2A==" + }, "node_modules/anymatch": { "version": "3.1.2", "license": "ISC", @@ -4808,6 +4895,14 @@ "node": ">=0.10.0" } }, + "node_modules/ast-module-types": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ast-module-types/-/ast-module-types-3.0.0.tgz", + "integrity": "sha512-CMxMCOCS+4D+DkOQfuZf+vLrSEmY/7xtORwdxs4wtcC1wVgvk2MqFFTwQCFhvWsI4KPU9lcWXPI8DgRiz+xetQ==", + "engines": { + "node": ">=6.0" + } + }, "node_modules/async-each": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/async-each/-/async-each-1.0.3.tgz", @@ -4952,7 +5047,6 @@ }, "node_modules/balanced-match": { "version": "1.0.0", - "dev": true, "license": "MIT" }, "node_modules/base": { @@ -5236,7 +5330,6 @@ }, "node_modules/brace-expansion": { "version": "1.1.11", - "dev": true, "license": "MIT", "dependencies": { "balanced-match": "^1.0.0", @@ -5983,7 +6076,6 @@ }, "node_modules/concat-map": { "version": "0.0.1", - "dev": true, "license": "MIT" }, "node_modules/concat-stream": { @@ -6461,9 +6553,9 @@ } }, "node_modules/debug": { - "version": "4.3.2", - "dev": true, - "license": "MIT", + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", "dependencies": { "ms": "2.1.2" }, @@ -6553,10 +6645,6 @@ "node": ">=0.10.0" } }, - "node_modules/defined": { - "version": "1.0.0", - "license": "MIT" - }, "node_modules/dependency-graph": { "version": "0.11.0", "resolved": "https://registry.npmjs.org/dependency-graph/-/dependency-graph-0.11.0.tgz", @@ -6596,19 +6684,18 @@ "node": ">=8" } }, - "node_modules/detective": { - "version": "5.2.1", - "license": "MIT", + "node_modules/detective-typescript": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/detective-typescript/-/detective-typescript-9.0.0.tgz", + "integrity": "sha512-lR78AugfUSBojwlSRZBeEqQ1l8LI7rbxOl1qTUnGLcjZQDjZmrZCb7R46rK8U8B5WzFvJrxa7fEBA8FoD/n5fA==", "dependencies": { - "acorn-node": "^1.8.2", - "defined": "^1.0.0", - "minimist": "^1.2.6" - }, - "bin": { - "detective": "bin/detective.js" + "@typescript-eslint/typescript-estree": "^5.13.0", + "ast-module-types": "^3.0.0", + "node-source-walk": "^5.0.0", + "typescript": "^4.5.5" }, "engines": { - "node": ">=0.8.0" + "node": "^12.20.0 || ^14.14.0 || >=16.0.0" } }, "node_modules/didyoumean": { @@ -6645,7 +6732,6 @@ "version": "3.0.1", "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", - "dev": true, "dependencies": { "path-type": "^4.0.0" }, @@ -6988,11 +7074,10 @@ } }, "node_modules/eslint-config-prettier": { - "version": "8.6.0", - "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-8.6.0.tgz", - "integrity": "sha512-bAF0eLpLVqP5oEVUFKpMA+NnRFICwn9X8B5jrR9FcqnYBuPbqWEjTEspPWMj5ye6czoSLDweCzSo3Ko7gGrZaA==", + "version": "8.7.0", + "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-8.7.0.tgz", + "integrity": "sha512-HHVXLSlVUhMSmyW4ZzEuvjpwqamgmlfkutD53cYXLikh4pt/modINRcCIApJ84czDxM4GZInwUrromsDdTImTA==", "dev": true, - "license": "MIT", "bin": { "eslint-config-prettier": "bin/cli.js" }, @@ -7036,7 +7121,6 @@ "version": "3.3.0", "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.3.0.tgz", "integrity": "sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA==", - "dev": true, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" } @@ -7945,7 +8029,6 @@ }, "node_modules/fs.realpath": { "version": "1.0.0", - "dev": true, "license": "ISC" }, "node_modules/fsevents": { @@ -8051,7 +8134,6 @@ }, "node_modules/glob": { "version": "7.1.6", - "dev": true, "license": "ISC", "dependencies": { "fs.realpath": "^1.0.0", @@ -8449,7 +8531,6 @@ }, "node_modules/ignore": { "version": "5.2.4", - "dev": true, "license": "MIT", "engines": { "node": ">= 4" @@ -8542,7 +8623,6 @@ }, "node_modules/inflight": { "version": "1.0.6", - "dev": true, "license": "ISC", "dependencies": { "once": "^1.3.0", @@ -8551,7 +8631,6 @@ }, "node_modules/inherits": { "version": "2.0.4", - "dev": true, "license": "ISC" }, "node_modules/interpret": { @@ -9835,6 +9914,14 @@ "@types/yargs-parser": "*" } }, + "node_modules/jiti": { + "version": "1.17.2", + "resolved": "https://registry.npmjs.org/jiti/-/jiti-1.17.2.tgz", + "integrity": "sha512-Xf0nU8+8wuiQpLcqdb2HRyHqYwGk2Pd+F7kstyp20ZuqTyCmB9dqpX2NxaxFc1kovraa2bG6c1RL3W7XfapiZg==", + "bin": { + "jiti": "bin/jiti.js" + } + }, "node_modules/js-sdsl": { "version": "4.1.4", "dev": true, @@ -10189,7 +10276,6 @@ }, "node_modules/lines-and-columns": { "version": "1.2.4", - "dev": true, "license": "MIT" }, "node_modules/lmdb": { @@ -10298,7 +10384,6 @@ }, "node_modules/lru-cache": { "version": "6.0.0", - "dev": true, "license": "ISC", "dependencies": { "yallist": "^4.0.0" @@ -10558,7 +10643,6 @@ }, "node_modules/minimatch": { "version": "3.1.2", - "dev": true, "license": "ISC", "dependencies": { "brace-expansion": "^1.1.7" @@ -10569,6 +10653,7 @@ }, "node_modules/minimist": { "version": "1.2.6", + "dev": true, "license": "MIT" }, "node_modules/mississippi": { @@ -10645,7 +10730,6 @@ }, "node_modules/ms": { "version": "2.1.2", - "dev": true, "license": "MIT" }, "node_modules/msgpackr": { @@ -10679,6 +10763,16 @@ "@msgpackr-extract/msgpackr-extract-win32-x64": "2.2.0" } }, + "node_modules/mz": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/mz/-/mz-2.7.0.tgz", + "integrity": "sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q==", + "dependencies": { + "any-promise": "^1.0.0", + "object-assign": "^4.0.1", + "thenify-all": "^1.0.0" + } + }, "node_modules/nan": { "version": "2.17.0", "resolved": "https://registry.npmjs.org/nan/-/nan-2.17.0.tgz", @@ -10836,6 +10930,17 @@ "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.10.tgz", "integrity": "sha512-5GFldHPXVG/YZmFzJvKK2zDSzPKhEp0+ZR5SVaoSag9fsL5YgHbUHDfnG5494ISANDcK4KwPXAx2xqVEydmd7w==" }, + "node_modules/node-source-walk": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/node-source-walk/-/node-source-walk-5.0.0.tgz", + "integrity": "sha512-58APXoMXpmmU+oVBJFajhTCoD8d/OGtngnVAWzIo2A8yn0IXwBzvIVIsTzoie/SrA37u+1hnpNz2HMWx/VIqlw==", + "dependencies": { + "@babel/parser": "^7.0.0" + }, + "engines": { + "node": ">=12" + } + }, "node_modules/normalize-path": { "version": "3.0.0", "license": "MIT", @@ -10893,7 +10998,6 @@ }, "node_modules/object-assign": { "version": "4.1.1", - "dev": true, "license": "MIT", "engines": { "node": ">=0.10.0" @@ -11017,7 +11121,6 @@ }, "node_modules/once": { "version": "1.4.0", - "dev": true, "license": "ISC", "dependencies": { "wrappy": "1" @@ -11311,7 +11414,6 @@ }, "node_modules/path-is-absolute": { "version": "1.0.1", - "dev": true, "license": "MIT", "engines": { "node": ">=0.10.0" @@ -11333,7 +11435,6 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", - "dev": true, "engines": { "node": ">=8" } @@ -11389,9 +11490,9 @@ } }, "node_modules/pirates": { - "version": "4.0.4", - "dev": true, - "license": "MIT", + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/pirates/-/pirates-4.0.5.tgz", + "integrity": "sha512-8V9+HQPupnaXMA23c5hvl69zXvTwTzyAYasnkb0Tts4XvO4CliqONMOnvlq26rkhLC3nWDFBJf73LU1e1VZLaQ==", "engines": { "node": ">= 6" } @@ -12994,7 +13095,6 @@ }, "node_modules/slash": { "version": "3.0.0", - "dev": true, "license": "MIT", "engines": { "node": ">=8" @@ -13618,6 +13718,34 @@ "postcss": "^8.2.15" } }, + "node_modules/sucrase": { + "version": "3.29.0", + "resolved": "https://registry.npmjs.org/sucrase/-/sucrase-3.29.0.tgz", + "integrity": "sha512-bZPAuGA5SdFHuzqIhTAqt9fvNEo9rESqXIG3oiKdF8K4UmkQxC4KlNL3lVyAErXp+mPvUqZ5l13qx6TrDIGf3A==", + "dependencies": { + "commander": "^4.0.0", + "glob": "7.1.6", + "lines-and-columns": "^1.1.6", + "mz": "^2.7.0", + "pirates": "^4.0.1", + "ts-interface-checker": "^0.1.9" + }, + "bin": { + "sucrase": "bin/sucrase", + "sucrase-node": "bin/sucrase-node" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/sucrase/node_modules/commander": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/commander/-/commander-4.1.1.tgz", + "integrity": "sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA==", + "engines": { + "node": ">= 6" + } + }, "node_modules/supports-color": { "version": "7.2.0", "dev": true, @@ -13810,6 +13938,25 @@ "integrity": "sha512-89Gi5raiWA3QZ4b2ePcEwswC3me9JIg+ToSgtE0JWeCynLnLxNr/f9G+xfo9K+Oj4AFdom8YNJjibIARTJmapQ==", "dev": true }, + "node_modules/thenify": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/thenify/-/thenify-3.3.1.tgz", + "integrity": "sha512-RVZSIV5IG10Hk3enotrhvz0T9em6cyHBLkH/YAZuKqd8hRkKhSfCGIcP2KUY0EPxndzANBmNllzWPwak+bheSw==", + "dependencies": { + "any-promise": "^1.0.0" + } + }, + "node_modules/thenify-all": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/thenify-all/-/thenify-all-1.6.0.tgz", + "integrity": "sha512-RNxQH/qI8/t3thXJDwcstUO4zeqo64+Uy/+sNVRBx4Xn2OX+OZ9oP+iJnNFqplFra2ZUVeKCSa2oVWi3T4uVmA==", + "dependencies": { + "thenify": ">= 3.1.0 < 4" + }, + "engines": { + "node": ">=0.8" + } + }, "node_modules/through2": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz", @@ -13966,11 +14113,35 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/ts-interface-checker": { + "version": "0.1.13", + "resolved": "https://registry.npmjs.org/ts-interface-checker/-/ts-interface-checker-0.1.13.tgz", + "integrity": "sha512-Y/arvbn+rrz3JCKl9C4kVNfTfSm2/mEp5FSz5EsZSANGPSlQrpRI5M4PKF+mJnE52jOO90PnPSc3Ur3bTQw0gA==" + }, "node_modules/tslib": { "version": "2.4.1", "dev": true, "license": "0BSD" }, + "node_modules/tsutils": { + "version": "3.21.0", + "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-3.21.0.tgz", + "integrity": "sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==", + "dependencies": { + "tslib": "^1.8.1" + }, + "engines": { + "node": ">= 6" + }, + "peerDependencies": { + "typescript": ">=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta" + } + }, + "node_modules/tsutils/node_modules/tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==" + }, "node_modules/tty-browserify": { "version": "0.0.0", "resolved": "https://registry.npmjs.org/tty-browserify/-/tty-browserify-0.0.0.tgz", @@ -14099,6 +14270,18 @@ "integrity": "sha512-/aCDEGatGvZ2BIk+HmLf4ifCJFwvKFNb9/JeZPMulfgFracn9QFcAf5GO8B/mweUjSoblS5In0cWhqpfs/5PQA==", "dev": true }, + "node_modules/typescript": { + "version": "4.9.5", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz", + "integrity": "sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==", + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=4.2.0" + } + }, "node_modules/union-value": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.1.tgz", @@ -15442,7 +15625,6 @@ }, "node_modules/wrappy": { "version": "1.0.2", - "dev": true, "license": "ISC" }, "node_modules/write-file-atomic": { @@ -15460,6 +15642,7 @@ }, "node_modules/xtend": { "version": "4.0.2", + "dev": true, "license": "MIT", "engines": { "node": ">=0.4" @@ -15481,7 +15664,6 @@ }, "node_modules/yallist": { "version": "4.0.0", - "dev": true, "license": "ISC" }, "node_modules/yaml": { @@ -15827,8 +16009,7 @@ "@babel/parser": { "version": "7.21.2", "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.21.2.tgz", - "integrity": "sha512-URpaIJQwEkEC2T9Kn+Ai6Xe/02iNaVCuT/PtoRz3GPVJVDpPd7mLo+VddTbhCRU9TXqW5mSrQfXZyi8kDKOVpQ==", - "dev": true + "integrity": "sha512-URpaIJQwEkEC2T9Kn+Ai6Xe/02iNaVCuT/PtoRz3GPVJVDpPd7mLo+VddTbhCRU9TXqW5mSrQfXZyi8kDKOVpQ==" }, "@babel/plugin-syntax-async-generators": { "version": "7.8.4", @@ -18338,6 +18519,62 @@ "version": "20.2.1", "dev": true }, + "@typescript-eslint/types": { + "version": "5.54.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.54.1.tgz", + "integrity": "sha512-G9+1vVazrfAfbtmCapJX8jRo2E4MDXxgm/IMOF4oGh3kq7XuK3JRkOg6y2Qu1VsTRmWETyTkWt1wxy7X7/yLkw==" + }, + "@typescript-eslint/typescript-estree": { + "version": "5.54.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.54.1.tgz", + "integrity": "sha512-bjK5t+S6ffHnVwA0qRPTZrxKSaFYocwFIkZx5k7pvWfsB1I57pO/0M0Skatzzw1sCkjJ83AfGTL0oFIFiDX3bg==", + "requires": { + "@typescript-eslint/types": "5.54.1", + "@typescript-eslint/visitor-keys": "5.54.1", + "debug": "^4.3.4", + "globby": "^11.1.0", + "is-glob": "^4.0.3", + "semver": "^7.3.7", + "tsutils": "^3.21.0" + }, + "dependencies": { + "array-union": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", + "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==" + }, + "globby": { + "version": "11.1.0", + "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", + "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==", + "requires": { + "array-union": "^2.1.0", + "dir-glob": "^3.0.1", + "fast-glob": "^3.2.9", + "ignore": "^5.2.0", + "merge2": "^1.4.1", + "slash": "^3.0.0" + } + }, + "semver": { + "version": "7.3.8", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.8.tgz", + "integrity": "sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==", + "requires": { + "lru-cache": "^6.0.0" + } + } + } + }, + "@typescript-eslint/visitor-keys": { + "version": "5.54.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.54.1.tgz", + "integrity": "sha512-q8iSoHTgwCfgcRJ2l2x+xCbu8nBlRAlsQ33k24Adj8eoVBE0f8dUeI+bAa8F84Mv05UGbAx57g2zrRsYIooqQg==", + "requires": { + "@typescript-eslint/types": "5.54.1", + "eslint-visitor-keys": "^3.3.0" + } + }, "@webassemblyjs/ast": { "version": "1.11.1", "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.11.1.tgz", @@ -18644,7 +18881,9 @@ "dev": true }, "acorn": { - "version": "7.4.1" + "version": "7.4.1", + "dev": true, + "peer": true }, "acorn-jsx": { "version": "5.3.2", @@ -18653,17 +18892,6 @@ "dev": true, "requires": {} }, - "acorn-node": { - "version": "1.8.2", - "requires": { - "acorn": "^7.0.0", - "acorn-walk": "^7.0.0", - "xtend": "^4.0.2" - } - }, - "acorn-walk": { - "version": "7.2.0" - }, "ajv": { "version": "6.12.6", "dev": true, @@ -18745,6 +18973,11 @@ "color-convert": "^2.0.1" } }, + "any-promise": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/any-promise/-/any-promise-1.3.0.tgz", + "integrity": "sha512-7UvmKalWRt1wgjL1RrGxoSJW/0QZFIegpeGvZG9kjp8vrRu55XTHbwnqq2GpXm9uLbcuhxm3IqX9OB4MZR1b2A==" + }, "anymatch": { "version": "3.1.2", "requires": { @@ -18859,6 +19092,11 @@ "integrity": "sha512-Q+JC7Whu8HhmTdBph/Tq59IoRtoy6KAm5zzPv00WdujX82lbAL8K7WVjne7vdCsAmbF4AYaDOPyO3k0kl8qIrw==", "dev": true }, + "ast-module-types": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ast-module-types/-/ast-module-types-3.0.0.tgz", + "integrity": "sha512-CMxMCOCS+4D+DkOQfuZf+vLrSEmY/7xtORwdxs4wtcC1wVgvk2MqFFTwQCFhvWsI4KPU9lcWXPI8DgRiz+xetQ==" + }, "async-each": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/async-each/-/async-each-1.0.3.tgz", @@ -18955,8 +19193,7 @@ } }, "balanced-match": { - "version": "1.0.0", - "dev": true + "version": "1.0.0" }, "base": { "version": "0.11.2", @@ -19171,7 +19408,6 @@ }, "brace-expansion": { "version": "1.1.11", - "dev": true, "requires": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -19746,8 +19982,7 @@ "dev": true }, "concat-map": { - "version": "0.0.1", - "dev": true + "version": "0.0.1" }, "concat-stream": { "version": "1.6.2", @@ -20096,8 +20331,9 @@ "dev": true }, "debug": { - "version": "4.3.2", - "dev": true, + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", "requires": { "ms": "2.1.2" } @@ -20155,9 +20391,6 @@ "isobject": "^3.0.1" } }, - "defined": { - "version": "1.0.0" - }, "dependency-graph": { "version": "0.11.0", "resolved": "https://registry.npmjs.org/dependency-graph/-/dependency-graph-0.11.0.tgz", @@ -20185,12 +20418,15 @@ "integrity": "sha512-TLz+x/vEXm/Y7P7wn1EJFNLxYpUD4TgMosxY6fAVJUnJMbupHBOncxyWUG9OpTaH9EBD7uFI5LfEgmMOc54DsA==", "dev": true }, - "detective": { - "version": "5.2.1", + "detective-typescript": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/detective-typescript/-/detective-typescript-9.0.0.tgz", + "integrity": "sha512-lR78AugfUSBojwlSRZBeEqQ1l8LI7rbxOl1qTUnGLcjZQDjZmrZCb7R46rK8U8B5WzFvJrxa7fEBA8FoD/n5fA==", "requires": { - "acorn-node": "^1.8.2", - "defined": "^1.0.0", - "minimist": "^1.2.6" + "@typescript-eslint/typescript-estree": "^5.13.0", + "ast-module-types": "^3.0.0", + "node-source-walk": "^5.0.0", + "typescript": "^4.5.5" } }, "didyoumean": { @@ -20225,7 +20461,6 @@ "version": "3.0.1", "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", - "dev": true, "requires": { "path-type": "^4.0.0" } @@ -20520,9 +20755,9 @@ } }, "eslint-config-prettier": { - "version": "8.6.0", - "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-8.6.0.tgz", - "integrity": "sha512-bAF0eLpLVqP5oEVUFKpMA+NnRFICwn9X8B5jrR9FcqnYBuPbqWEjTEspPWMj5ye6czoSLDweCzSo3Ko7gGrZaA==", + "version": "8.7.0", + "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-8.7.0.tgz", + "integrity": "sha512-HHVXLSlVUhMSmyW4ZzEuvjpwqamgmlfkutD53cYXLikh4pt/modINRcCIApJ84czDxM4GZInwUrromsDdTImTA==", "dev": true, "requires": {} }, @@ -20544,8 +20779,7 @@ "eslint-visitor-keys": { "version": "3.3.0", "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.3.0.tgz", - "integrity": "sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA==", - "dev": true + "integrity": "sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA==" }, "espree": { "version": "9.5.0", @@ -21173,8 +21407,7 @@ } }, "fs.realpath": { - "version": "1.0.0", - "dev": true + "version": "1.0.0" }, "fsevents": { "version": "2.3.2", @@ -21242,7 +21475,6 @@ }, "glob": { "version": "7.1.6", - "dev": true, "requires": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", @@ -21501,8 +21733,7 @@ "dev": true }, "ignore": { - "version": "5.2.4", - "dev": true + "version": "5.2.4" }, "immutable": { "version": "4.2.2", @@ -21562,15 +21793,13 @@ }, "inflight": { "version": "1.0.6", - "dev": true, "requires": { "once": "^1.3.0", "wrappy": "1" } }, "inherits": { - "version": "2.0.4", - "dev": true + "version": "2.0.4" }, "interpret": { "version": "2.2.0", @@ -22616,6 +22845,11 @@ } } }, + "jiti": { + "version": "1.17.2", + "resolved": "https://registry.npmjs.org/jiti/-/jiti-1.17.2.tgz", + "integrity": "sha512-Xf0nU8+8wuiQpLcqdb2HRyHqYwGk2Pd+F7kstyp20ZuqTyCmB9dqpX2NxaxFc1kovraa2bG6c1RL3W7XfapiZg==" + }, "js-sdsl": { "version": "4.1.4", "dev": true @@ -22808,8 +23042,7 @@ "integrity": "sha512-utWOt/GHzuUxnLKxB6dk81RoOeoNeHgbrXiuGk4yyF5qlRz+iIVWu56E2fqGHFrXz0QNUhLB/8nKqvRH66JKGQ==" }, "lines-and-columns": { - "version": "1.2.4", - "dev": true + "version": "1.2.4" }, "lmdb": { "version": "2.5.2", @@ -22900,7 +23133,6 @@ }, "lru-cache": { "version": "6.0.0", - "dev": true, "requires": { "yallist": "^4.0.0" } @@ -23091,13 +23323,13 @@ }, "minimatch": { "version": "3.1.2", - "dev": true, "requires": { "brace-expansion": "^1.1.7" } }, "minimist": { - "version": "1.2.6" + "version": "1.2.6", + "dev": true }, "mississippi": { "version": "3.0.0", @@ -23162,8 +23394,7 @@ } }, "ms": { - "version": "2.1.2", - "dev": true + "version": "2.1.2" }, "msgpackr": { "version": "1.8.2", @@ -23190,6 +23421,16 @@ "node-gyp-build-optional-packages": "5.0.3" } }, + "mz": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/mz/-/mz-2.7.0.tgz", + "integrity": "sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q==", + "requires": { + "any-promise": "^1.0.0", + "object-assign": "^4.0.1", + "thenify-all": "^1.0.0" + } + }, "nan": { "version": "2.17.0", "resolved": "https://registry.npmjs.org/nan/-/nan-2.17.0.tgz", @@ -23317,6 +23558,14 @@ "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.10.tgz", "integrity": "sha512-5GFldHPXVG/YZmFzJvKK2zDSzPKhEp0+ZR5SVaoSag9fsL5YgHbUHDfnG5494ISANDcK4KwPXAx2xqVEydmd7w==" }, + "node-source-walk": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/node-source-walk/-/node-source-walk-5.0.0.tgz", + "integrity": "sha512-58APXoMXpmmU+oVBJFajhTCoD8d/OGtngnVAWzIo2A8yn0IXwBzvIVIsTzoie/SrA37u+1hnpNz2HMWx/VIqlw==", + "requires": { + "@babel/parser": "^7.0.0" + } + }, "normalize-path": { "version": "3.0.0" }, @@ -23351,8 +23600,7 @@ "dev": true }, "object-assign": { - "version": "4.1.1", - "dev": true + "version": "4.1.1" }, "object-copy": { "version": "0.1.0", @@ -23445,7 +23693,6 @@ }, "once": { "version": "1.4.0", - "dev": true, "requires": { "wrappy": "1" } @@ -23656,8 +23903,7 @@ "dev": true }, "path-is-absolute": { - "version": "1.0.1", - "dev": true + "version": "1.0.1" }, "path-key": { "version": "3.1.1", @@ -23669,8 +23915,7 @@ "path-type": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", - "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", - "dev": true + "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==" }, "pbkdf2": { "version": "3.1.2", @@ -23701,8 +23946,9 @@ "version": "2.3.0" }, "pirates": { - "version": "4.0.4", - "dev": true + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/pirates/-/pirates-4.0.5.tgz", + "integrity": "sha512-8V9+HQPupnaXMA23c5hvl69zXvTwTzyAYasnkb0Tts4XvO4CliqONMOnvlq26rkhLC3nWDFBJf73LU1e1VZLaQ==" }, "pkg-dir": { "version": "4.2.0", @@ -24775,8 +25021,7 @@ "dev": true }, "slash": { - "version": "3.0.0", - "dev": true + "version": "3.0.0" }, "snapdragon": { "version": "0.8.2", @@ -25265,6 +25510,26 @@ "postcss-selector-parser": "^6.0.4" } }, + "sucrase": { + "version": "3.29.0", + "resolved": "https://registry.npmjs.org/sucrase/-/sucrase-3.29.0.tgz", + "integrity": "sha512-bZPAuGA5SdFHuzqIhTAqt9fvNEo9rESqXIG3oiKdF8K4UmkQxC4KlNL3lVyAErXp+mPvUqZ5l13qx6TrDIGf3A==", + "requires": { + "commander": "^4.0.0", + "glob": "7.1.6", + "lines-and-columns": "^1.1.6", + "mz": "^2.7.0", + "pirates": "^4.0.1", + "ts-interface-checker": "^0.1.9" + }, + "dependencies": { + "commander": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/commander/-/commander-4.1.1.tgz", + "integrity": "sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA==" + } + } + }, "supports-color": { "version": "7.2.0", "dev": true, @@ -25312,18 +25577,19 @@ "color-name": "^1.1.4", "concurrently": "^7.5.0", "cssnano": "^5.1.15", - "detective": "^5.2.1", + "detective-typescript": "^9.0.0", "didyoumean": "^1.2.2", "dlv": "^1.1.3", "esbuild": "^0.17.10", "eslint": "^8.35.0", - "eslint-config-prettier": "^8.6.0", + "eslint-config-prettier": "^8.7.0", "eslint-plugin-prettier": "^4.2.1", "fast-glob": "^3.2.12", "glob-parent": "^6.0.2", "is-glob": "^4.0.3", "jest": "^29.4.3", "jest-diff": "^29.4.3", + "jiti": "^1.17.2", "lightningcss": "^1.18.0", "lilconfig": "^2.1.0", "micromatch": "^4.0.5", @@ -25342,6 +25608,7 @@ "resolve": "^1.22.1", "rimraf": "^4.1.2", "source-map-js": "^1.0.2", + "sucrase": "^3.29.0", "turbo": "^1.8.3" }, "dependencies": { @@ -25613,8 +25880,7 @@ "@babel/parser": { "version": "7.21.2", "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.21.2.tgz", - "integrity": "sha512-URpaIJQwEkEC2T9Kn+Ai6Xe/02iNaVCuT/PtoRz3GPVJVDpPd7mLo+VddTbhCRU9TXqW5mSrQfXZyi8kDKOVpQ==", - "dev": true + "integrity": "sha512-URpaIJQwEkEC2T9Kn+Ai6Xe/02iNaVCuT/PtoRz3GPVJVDpPd7mLo+VddTbhCRU9TXqW5mSrQfXZyi8kDKOVpQ==" }, "@babel/plugin-syntax-async-generators": { "version": "7.8.4", @@ -28124,6 +28390,62 @@ "version": "20.2.1", "dev": true }, + "@typescript-eslint/types": { + "version": "5.54.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.54.1.tgz", + "integrity": "sha512-G9+1vVazrfAfbtmCapJX8jRo2E4MDXxgm/IMOF4oGh3kq7XuK3JRkOg6y2Qu1VsTRmWETyTkWt1wxy7X7/yLkw==" + }, + "@typescript-eslint/typescript-estree": { + "version": "5.54.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.54.1.tgz", + "integrity": "sha512-bjK5t+S6ffHnVwA0qRPTZrxKSaFYocwFIkZx5k7pvWfsB1I57pO/0M0Skatzzw1sCkjJ83AfGTL0oFIFiDX3bg==", + "requires": { + "@typescript-eslint/types": "5.54.1", + "@typescript-eslint/visitor-keys": "5.54.1", + "debug": "^4.3.4", + "globby": "^11.1.0", + "is-glob": "^4.0.3", + "semver": "^7.3.7", + "tsutils": "^3.21.0" + }, + "dependencies": { + "array-union": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", + "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==" + }, + "globby": { + "version": "11.1.0", + "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", + "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==", + "requires": { + "array-union": "^2.1.0", + "dir-glob": "^3.0.1", + "fast-glob": "^3.2.9", + "ignore": "^5.2.0", + "merge2": "^1.4.1", + "slash": "^3.0.0" + } + }, + "semver": { + "version": "7.3.8", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.8.tgz", + "integrity": "sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==", + "requires": { + "lru-cache": "^6.0.0" + } + } + } + }, + "@typescript-eslint/visitor-keys": { + "version": "5.54.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.54.1.tgz", + "integrity": "sha512-q8iSoHTgwCfgcRJ2l2x+xCbu8nBlRAlsQ33k24Adj8eoVBE0f8dUeI+bAa8F84Mv05UGbAx57g2zrRsYIooqQg==", + "requires": { + "@typescript-eslint/types": "5.54.1", + "eslint-visitor-keys": "^3.3.0" + } + }, "@webassemblyjs/ast": { "version": "1.11.1", "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.11.1.tgz", @@ -28430,7 +28752,9 @@ "dev": true }, "acorn": { - "version": "7.4.1" + "version": "7.4.1", + "dev": true, + "peer": true }, "acorn-jsx": { "version": "5.3.2", @@ -28439,17 +28763,6 @@ "dev": true, "requires": {} }, - "acorn-node": { - "version": "1.8.2", - "requires": { - "acorn": "^7.0.0", - "acorn-walk": "^7.0.0", - "xtend": "^4.0.2" - } - }, - "acorn-walk": { - "version": "7.2.0" - }, "ajv": { "version": "6.12.6", "dev": true, @@ -28531,6 +28844,11 @@ "color-convert": "^2.0.1" } }, + "any-promise": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/any-promise/-/any-promise-1.3.0.tgz", + "integrity": "sha512-7UvmKalWRt1wgjL1RrGxoSJW/0QZFIegpeGvZG9kjp8vrRu55XTHbwnqq2GpXm9uLbcuhxm3IqX9OB4MZR1b2A==" + }, "anymatch": { "version": "3.1.2", "requires": { @@ -28645,6 +28963,11 @@ "integrity": "sha512-Q+JC7Whu8HhmTdBph/Tq59IoRtoy6KAm5zzPv00WdujX82lbAL8K7WVjne7vdCsAmbF4AYaDOPyO3k0kl8qIrw==", "dev": true }, + "ast-module-types": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ast-module-types/-/ast-module-types-3.0.0.tgz", + "integrity": "sha512-CMxMCOCS+4D+DkOQfuZf+vLrSEmY/7xtORwdxs4wtcC1wVgvk2MqFFTwQCFhvWsI4KPU9lcWXPI8DgRiz+xetQ==" + }, "async-each": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/async-each/-/async-each-1.0.3.tgz", @@ -28741,8 +29064,7 @@ } }, "balanced-match": { - "version": "1.0.0", - "dev": true + "version": "1.0.0" }, "base": { "version": "0.11.2", @@ -28957,7 +29279,6 @@ }, "brace-expansion": { "version": "1.1.11", - "dev": true, "requires": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -29532,8 +29853,7 @@ "dev": true }, "concat-map": { - "version": "0.0.1", - "dev": true + "version": "0.0.1" }, "concat-stream": { "version": "1.6.2", @@ -29882,8 +30202,9 @@ "dev": true }, "debug": { - "version": "4.3.2", - "dev": true, + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", "requires": { "ms": "2.1.2" } @@ -29941,9 +30262,6 @@ "isobject": "^3.0.1" } }, - "defined": { - "version": "1.0.0" - }, "dependency-graph": { "version": "0.11.0", "resolved": "https://registry.npmjs.org/dependency-graph/-/dependency-graph-0.11.0.tgz", @@ -29971,12 +30289,15 @@ "integrity": "sha512-TLz+x/vEXm/Y7P7wn1EJFNLxYpUD4TgMosxY6fAVJUnJMbupHBOncxyWUG9OpTaH9EBD7uFI5LfEgmMOc54DsA==", "dev": true }, - "detective": { - "version": "5.2.1", + "detective-typescript": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/detective-typescript/-/detective-typescript-9.0.0.tgz", + "integrity": "sha512-lR78AugfUSBojwlSRZBeEqQ1l8LI7rbxOl1qTUnGLcjZQDjZmrZCb7R46rK8U8B5WzFvJrxa7fEBA8FoD/n5fA==", "requires": { - "acorn-node": "^1.8.2", - "defined": "^1.0.0", - "minimist": "^1.2.6" + "@typescript-eslint/typescript-estree": "^5.13.0", + "ast-module-types": "^3.0.0", + "node-source-walk": "^5.0.0", + "typescript": "^4.5.5" } }, "didyoumean": { @@ -30011,7 +30332,6 @@ "version": "3.0.1", "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", - "dev": true, "requires": { "path-type": "^4.0.0" } @@ -30306,9 +30626,9 @@ } }, "eslint-config-prettier": { - "version": "8.6.0", - "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-8.6.0.tgz", - "integrity": "sha512-bAF0eLpLVqP5oEVUFKpMA+NnRFICwn9X8B5jrR9FcqnYBuPbqWEjTEspPWMj5ye6czoSLDweCzSo3Ko7gGrZaA==", + "version": "8.7.0", + "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-8.7.0.tgz", + "integrity": "sha512-HHVXLSlVUhMSmyW4ZzEuvjpwqamgmlfkutD53cYXLikh4pt/modINRcCIApJ84czDxM4GZInwUrromsDdTImTA==", "dev": true, "requires": {} }, @@ -30330,8 +30650,7 @@ "eslint-visitor-keys": { "version": "3.3.0", "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.3.0.tgz", - "integrity": "sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA==", - "dev": true + "integrity": "sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA==" }, "espree": { "version": "9.5.0", @@ -30959,8 +31278,7 @@ } }, "fs.realpath": { - "version": "1.0.0", - "dev": true + "version": "1.0.0" }, "fsevents": { "version": "2.3.2", @@ -31028,7 +31346,6 @@ }, "glob": { "version": "7.1.6", - "dev": true, "requires": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", @@ -31287,8 +31604,7 @@ "dev": true }, "ignore": { - "version": "5.2.4", - "dev": true + "version": "5.2.4" }, "immutable": { "version": "4.2.2", @@ -31348,15 +31664,13 @@ }, "inflight": { "version": "1.0.6", - "dev": true, "requires": { "once": "^1.3.0", "wrappy": "1" } }, "inherits": { - "version": "2.0.4", - "dev": true + "version": "2.0.4" }, "interpret": { "version": "2.2.0", @@ -32402,6 +32716,11 @@ } } }, + "jiti": { + "version": "1.17.2", + "resolved": "https://registry.npmjs.org/jiti/-/jiti-1.17.2.tgz", + "integrity": "sha512-Xf0nU8+8wuiQpLcqdb2HRyHqYwGk2Pd+F7kstyp20ZuqTyCmB9dqpX2NxaxFc1kovraa2bG6c1RL3W7XfapiZg==" + }, "js-sdsl": { "version": "4.1.4", "dev": true @@ -32594,8 +32913,7 @@ "integrity": "sha512-utWOt/GHzuUxnLKxB6dk81RoOeoNeHgbrXiuGk4yyF5qlRz+iIVWu56E2fqGHFrXz0QNUhLB/8nKqvRH66JKGQ==" }, "lines-and-columns": { - "version": "1.2.4", - "dev": true + "version": "1.2.4" }, "lmdb": { "version": "2.5.2", @@ -32686,7 +33004,6 @@ }, "lru-cache": { "version": "6.0.0", - "dev": true, "requires": { "yallist": "^4.0.0" } @@ -32877,13 +33194,13 @@ }, "minimatch": { "version": "3.1.2", - "dev": true, "requires": { "brace-expansion": "^1.1.7" } }, "minimist": { - "version": "1.2.6" + "version": "1.2.6", + "dev": true }, "mississippi": { "version": "3.0.0", @@ -32948,8 +33265,7 @@ } }, "ms": { - "version": "2.1.2", - "dev": true + "version": "2.1.2" }, "msgpackr": { "version": "1.8.2", @@ -32976,6 +33292,16 @@ "node-gyp-build-optional-packages": "5.0.3" } }, + "mz": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/mz/-/mz-2.7.0.tgz", + "integrity": "sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q==", + "requires": { + "any-promise": "^1.0.0", + "object-assign": "^4.0.1", + "thenify-all": "^1.0.0" + } + }, "nan": { "version": "2.17.0", "resolved": "https://registry.npmjs.org/nan/-/nan-2.17.0.tgz", @@ -33103,6 +33429,14 @@ "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.10.tgz", "integrity": "sha512-5GFldHPXVG/YZmFzJvKK2zDSzPKhEp0+ZR5SVaoSag9fsL5YgHbUHDfnG5494ISANDcK4KwPXAx2xqVEydmd7w==" }, + "node-source-walk": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/node-source-walk/-/node-source-walk-5.0.0.tgz", + "integrity": "sha512-58APXoMXpmmU+oVBJFajhTCoD8d/OGtngnVAWzIo2A8yn0IXwBzvIVIsTzoie/SrA37u+1hnpNz2HMWx/VIqlw==", + "requires": { + "@babel/parser": "^7.0.0" + } + }, "normalize-path": { "version": "3.0.0" }, @@ -33137,8 +33471,7 @@ "dev": true }, "object-assign": { - "version": "4.1.1", - "dev": true + "version": "4.1.1" }, "object-copy": { "version": "0.1.0", @@ -33231,7 +33564,6 @@ }, "once": { "version": "1.4.0", - "dev": true, "requires": { "wrappy": "1" } @@ -33442,8 +33774,7 @@ "dev": true }, "path-is-absolute": { - "version": "1.0.1", - "dev": true + "version": "1.0.1" }, "path-key": { "version": "3.1.1", @@ -33455,8 +33786,7 @@ "path-type": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", - "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", - "dev": true + "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==" }, "pbkdf2": { "version": "3.1.2", @@ -33487,8 +33817,9 @@ "version": "2.3.0" }, "pirates": { - "version": "4.0.4", - "dev": true + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/pirates/-/pirates-4.0.5.tgz", + "integrity": "sha512-8V9+HQPupnaXMA23c5hvl69zXvTwTzyAYasnkb0Tts4XvO4CliqONMOnvlq26rkhLC3nWDFBJf73LU1e1VZLaQ==" }, "pkg-dir": { "version": "4.2.0", @@ -34561,8 +34892,7 @@ "dev": true }, "slash": { - "version": "3.0.0", - "dev": true + "version": "3.0.0" }, "snapdragon": { "version": "0.8.2", @@ -35051,6 +35381,26 @@ "postcss-selector-parser": "^6.0.4" } }, + "sucrase": { + "version": "3.29.0", + "resolved": "https://registry.npmjs.org/sucrase/-/sucrase-3.29.0.tgz", + "integrity": "sha512-bZPAuGA5SdFHuzqIhTAqt9fvNEo9rESqXIG3oiKdF8K4UmkQxC4KlNL3lVyAErXp+mPvUqZ5l13qx6TrDIGf3A==", + "requires": { + "commander": "^4.0.0", + "glob": "7.1.6", + "lines-and-columns": "^1.1.6", + "mz": "^2.7.0", + "pirates": "^4.0.1", + "ts-interface-checker": "^0.1.9" + }, + "dependencies": { + "commander": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/commander/-/commander-4.1.1.tgz", + "integrity": "sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA==" + } + } + }, "supports-color": { "version": "7.2.0", "dev": true, @@ -35188,6 +35538,22 @@ "integrity": "sha512-89Gi5raiWA3QZ4b2ePcEwswC3me9JIg+ToSgtE0JWeCynLnLxNr/f9G+xfo9K+Oj4AFdom8YNJjibIARTJmapQ==", "dev": true }, + "thenify": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/thenify/-/thenify-3.3.1.tgz", + "integrity": "sha512-RVZSIV5IG10Hk3enotrhvz0T9em6cyHBLkH/YAZuKqd8hRkKhSfCGIcP2KUY0EPxndzANBmNllzWPwak+bheSw==", + "requires": { + "any-promise": "^1.0.0" + } + }, + "thenify-all": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/thenify-all/-/thenify-all-1.6.0.tgz", + "integrity": "sha512-RNxQH/qI8/t3thXJDwcstUO4zeqo64+Uy/+sNVRBx4Xn2OX+OZ9oP+iJnNFqplFra2ZUVeKCSa2oVWi3T4uVmA==", + "requires": { + "thenify": ">= 3.1.0 < 4" + } + }, "through2": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz", @@ -35310,10 +35676,30 @@ } } }, + "ts-interface-checker": { + "version": "0.1.13", + "resolved": "https://registry.npmjs.org/ts-interface-checker/-/ts-interface-checker-0.1.13.tgz", + "integrity": "sha512-Y/arvbn+rrz3JCKl9C4kVNfTfSm2/mEp5FSz5EsZSANGPSlQrpRI5M4PKF+mJnE52jOO90PnPSc3Ur3bTQw0gA==" + }, "tslib": { "version": "2.4.1", "dev": true }, + "tsutils": { + "version": "3.21.0", + "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-3.21.0.tgz", + "integrity": "sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==", + "requires": { + "tslib": "^1.8.1" + }, + "dependencies": { + "tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==" + } + } + }, "tty-browserify": { "version": "0.0.0", "resolved": "https://registry.npmjs.org/tty-browserify/-/tty-browserify-0.0.0.tgz", @@ -35392,6 +35778,11 @@ "integrity": "sha512-/aCDEGatGvZ2BIk+HmLf4ifCJFwvKFNb9/JeZPMulfgFracn9QFcAf5GO8B/mweUjSoblS5In0cWhqpfs/5PQA==", "dev": true }, + "typescript": { + "version": "4.9.5", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz", + "integrity": "sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==" + }, "union-value": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.1.tgz", @@ -36327,8 +36718,7 @@ } }, "wrappy": { - "version": "1.0.2", - "dev": true + "version": "1.0.2" }, "write-file-atomic": { "version": "4.0.2", @@ -36341,7 +36731,8 @@ } }, "xtend": { - "version": "4.0.2" + "version": "4.0.2", + "dev": true }, "xxhash-wasm": { "version": "0.4.2", @@ -36354,8 +36745,7 @@ "dev": true }, "yallist": { - "version": "4.0.0", - "dev": true + "version": "4.0.0" }, "yaml": { "version": "1.10.2" @@ -36497,6 +36887,22 @@ "integrity": "sha512-89Gi5raiWA3QZ4b2ePcEwswC3me9JIg+ToSgtE0JWeCynLnLxNr/f9G+xfo9K+Oj4AFdom8YNJjibIARTJmapQ==", "dev": true }, + "thenify": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/thenify/-/thenify-3.3.1.tgz", + "integrity": "sha512-RVZSIV5IG10Hk3enotrhvz0T9em6cyHBLkH/YAZuKqd8hRkKhSfCGIcP2KUY0EPxndzANBmNllzWPwak+bheSw==", + "requires": { + "any-promise": "^1.0.0" + } + }, + "thenify-all": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/thenify-all/-/thenify-all-1.6.0.tgz", + "integrity": "sha512-RNxQH/qI8/t3thXJDwcstUO4zeqo64+Uy/+sNVRBx4Xn2OX+OZ9oP+iJnNFqplFra2ZUVeKCSa2oVWi3T4uVmA==", + "requires": { + "thenify": ">= 3.1.0 < 4" + } + }, "through2": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz", @@ -36619,10 +37025,30 @@ } } }, + "ts-interface-checker": { + "version": "0.1.13", + "resolved": "https://registry.npmjs.org/ts-interface-checker/-/ts-interface-checker-0.1.13.tgz", + "integrity": "sha512-Y/arvbn+rrz3JCKl9C4kVNfTfSm2/mEp5FSz5EsZSANGPSlQrpRI5M4PKF+mJnE52jOO90PnPSc3Ur3bTQw0gA==" + }, "tslib": { "version": "2.4.1", "dev": true }, + "tsutils": { + "version": "3.21.0", + "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-3.21.0.tgz", + "integrity": "sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==", + "requires": { + "tslib": "^1.8.1" + }, + "dependencies": { + "tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==" + } + } + }, "tty-browserify": { "version": "0.0.0", "resolved": "https://registry.npmjs.org/tty-browserify/-/tty-browserify-0.0.0.tgz", @@ -36701,6 +37127,11 @@ "integrity": "sha512-/aCDEGatGvZ2BIk+HmLf4ifCJFwvKFNb9/JeZPMulfgFracn9QFcAf5GO8B/mweUjSoblS5In0cWhqpfs/5PQA==", "dev": true }, + "typescript": { + "version": "4.9.5", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz", + "integrity": "sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==" + }, "union-value": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.1.tgz", @@ -37636,8 +38067,7 @@ } }, "wrappy": { - "version": "1.0.2", - "dev": true + "version": "1.0.2" }, "write-file-atomic": { "version": "4.0.2", @@ -37650,7 +38080,8 @@ } }, "xtend": { - "version": "4.0.2" + "version": "4.0.2", + "dev": true }, "xxhash-wasm": { "version": "0.4.2", @@ -37663,8 +38094,7 @@ "dev": true }, "yallist": { - "version": "4.0.0", - "dev": true + "version": "4.0.0" }, "yaml": { "version": "1.10.2" diff --git a/package-lock.stable.json b/package-lock.stable.json index 552ad21e8c46..0561cd3a167d 100644 --- a/package-lock.stable.json +++ b/package-lock.stable.json @@ -1,24 +1,24 @@ { "name": "tailwindcss", - "version": "3.2.6", + "version": "3.2.7", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "tailwindcss", - "version": "3.2.6", + "version": "3.2.7", "license": "MIT", "dependencies": { - "@tailwindcss/oxide": "file:./oxide-node-api-shim", "arg": "^5.0.2", "chokidar": "^3.5.3", "color-name": "^1.1.4", - "detective": "^5.2.1", + "detective-typescript": "^9.0.0", "didyoumean": "^1.2.2", "dlv": "^1.1.3", "fast-glob": "^3.2.12", "glob-parent": "^6.0.2", "is-glob": "^4.0.3", + "jiti": "^1.17.2", "lilconfig": "^2.0.6", "micromatch": "^4.0.5", "normalize-path": "^3.0.0", @@ -32,7 +32,8 @@ "postcss-selector-parser": "^6.0.11", "postcss-value-parser": "^4.2.0", "quick-lru": "^5.1.1", - "resolve": "^1.22.1" + "resolve": "^1.22.1", + "sucrase": "^3.29.0" }, "bin": { "tailwind": "lib/cli.js", @@ -453,7 +454,6 @@ }, "node_modules/@babel/parser": { "version": "7.18.9", - "dev": true, "license": "MIT", "bin": { "parser": "bin/babel-parser.js" @@ -665,10 +665,14 @@ "version": "0.16.10", "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.16.10.tgz", "integrity": "sha512-RmJjQTRrO6VwUWDrzTBLmV4OJZTarYsiepLGlF2rYTVB701hSorPywPGvP6d8HCuuRibyXa5JX4s3jN2kHEtjQ==", - "cpu": ["arm"], + "cpu": [ + "arm" + ], "dev": true, "optional": true, - "os": ["android"], + "os": [ + "android" + ], "engines": { "node": ">=12" } @@ -677,10 +681,14 @@ "version": "0.16.10", "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.16.10.tgz", "integrity": "sha512-47Y+NwVKTldTlDhSgJHZ/RpvBQMUDG7eKihqaF/u6g7s0ZPz4J1vy8A3rwnnUOF2CuDn7w7Gj/QcMoWz3U3SJw==", - "cpu": ["arm64"], + "cpu": [ + "arm64" + ], "dev": true, "optional": true, - "os": ["android"], + "os": [ + "android" + ], "engines": { "node": ">=12" } @@ -689,21 +697,29 @@ "version": "0.16.10", "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.16.10.tgz", "integrity": "sha512-C4PfnrBMcuAcOurQzpF1tTtZz94IXO5JmICJJ3NFJRHbXXsQUg9RFG45KvydKqtFfBaFLCHpduUkUfXwIvGnRg==", - "cpu": ["x64"], + "cpu": [ + "x64" + ], "dev": true, "optional": true, - "os": ["android"], + "os": [ + "android" + ], "engines": { "node": ">=12" } }, "node_modules/@esbuild/darwin-arm64": { "version": "0.16.10", - "cpu": ["arm64"], + "cpu": [ + "arm64" + ], "dev": true, "license": "MIT", "optional": true, - "os": ["darwin"], + "os": [ + "darwin" + ], "engines": { "node": ">=12" } @@ -712,10 +728,14 @@ "version": "0.16.10", "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.16.10.tgz", "integrity": "sha512-OXt7ijoLuy+AjDSKQWu+KdDFMBbdeaL6wtgMKtDUXKWHiAMKHan5+R1QAG6HD4+K0nnOvEJXKHeA9QhXNAjOTQ==", - "cpu": ["x64"], + "cpu": [ + "x64" + ], "dev": true, "optional": true, - "os": ["darwin"], + "os": [ + "darwin" + ], "engines": { "node": ">=12" } @@ -724,10 +744,14 @@ "version": "0.16.10", "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.16.10.tgz", "integrity": "sha512-shSQX/3GHuspE3Uxtq5kcFG/zqC+VuMnJkqV7LczO41cIe6CQaXHD3QdMLA4ziRq/m0vZo7JdterlgbmgNIAlQ==", - "cpu": ["arm64"], + "cpu": [ + "arm64" + ], "dev": true, "optional": true, - "os": ["freebsd"], + "os": [ + "freebsd" + ], "engines": { "node": ">=12" } @@ -736,10 +760,14 @@ "version": "0.16.10", "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.16.10.tgz", "integrity": "sha512-5YVc1zdeaJGASijZmTzSO4h6uKzsQGG3pkjI6fuXvolhm3hVRhZwnHJkforaZLmzvNv5Tb7a3QL2FAVmrgySIA==", - "cpu": ["x64"], + "cpu": [ + "x64" + ], "dev": true, "optional": true, - "os": ["freebsd"], + "os": [ + "freebsd" + ], "engines": { "node": ">=12" } @@ -748,10 +776,14 @@ "version": "0.16.10", "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.16.10.tgz", "integrity": "sha512-c360287ZWI2miBnvIj23bPyVctgzeMT2kQKR+x94pVqIN44h3GF8VMEs1SFPH1UgyDr3yBbx3vowDS1SVhyVhA==", - "cpu": ["arm"], + "cpu": [ + "arm" + ], "dev": true, "optional": true, - "os": ["linux"], + "os": [ + "linux" + ], "engines": { "node": ">=12" } @@ -760,10 +792,14 @@ "version": "0.16.10", "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.16.10.tgz", "integrity": "sha512-2aqeNVxIaRfPcIaMZIFoblLh588sWyCbmj1HHCCs9WmeNWm+EIN0SmvsmPvTa/TsNZFKnxTcvkX2eszTcCqIrA==", - "cpu": ["arm64"], + "cpu": [ + "arm64" + ], "dev": true, "optional": true, - "os": ["linux"], + "os": [ + "linux" + ], "engines": { "node": ">=12" } @@ -772,10 +808,14 @@ "version": "0.16.10", "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.16.10.tgz", "integrity": "sha512-sqMIEWeyrLGU7J5RB5fTkLRIFwsgsQ7ieWXlDLEmC2HblPYGb3AucD7inw2OrKFpRPKsec1l+lssiM3+NV5aOw==", - "cpu": ["ia32"], + "cpu": [ + "ia32" + ], "dev": true, "optional": true, - "os": ["linux"], + "os": [ + "linux" + ], "engines": { "node": ">=12" } @@ -784,10 +824,14 @@ "version": "0.16.10", "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.16.10.tgz", "integrity": "sha512-FN8mZOH7531iPHM0kaFhAOqqNHoAb6r/YHW2ZIxNi0a85UBi2DO4Vuyn7t1p4UN8a4LoAnLOT1PqNgHkgBJgbA==", - "cpu": ["mips64el"], + "cpu": [ + "mips64el" + ], "dev": true, "optional": true, - "os": ["linux"], + "os": [ + "linux" + ], "engines": { "node": ">=12" } @@ -796,10 +840,14 @@ "version": "0.16.10", "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.16.10.tgz", "integrity": "sha512-Dg9RiqdvHOAWnOKIOTsIx8dFX9EDlY2IbPEY7YFzchrCiTZmMkD7jWA9UdZbNUygPjdmQBVPRCrLydReFlX9yg==", - "cpu": ["ppc64"], + "cpu": [ + "ppc64" + ], "dev": true, "optional": true, - "os": ["linux"], + "os": [ + "linux" + ], "engines": { "node": ">=12" } @@ -808,10 +856,14 @@ "version": "0.16.10", "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.16.10.tgz", "integrity": "sha512-XMqtpjwzbmlar0BJIxmzu/RZ7EWlfVfH68Vadrva0Wj5UKOdKvqskuev2jY2oPV3aoQUyXwnMbMrFmloO2GfAw==", - "cpu": ["riscv64"], + "cpu": [ + "riscv64" + ], "dev": true, "optional": true, - "os": ["linux"], + "os": [ + "linux" + ], "engines": { "node": ">=12" } @@ -820,10 +872,14 @@ "version": "0.16.10", "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.16.10.tgz", "integrity": "sha512-fu7XtnoeRNFMx8DjK3gPWpFBDM2u5ba+FYwg27SjMJwKvJr4bDyKz5c+FLXLUSSAkMAt/UL+cUbEbra+rYtUgw==", - "cpu": ["s390x"], + "cpu": [ + "s390x" + ], "dev": true, "optional": true, - "os": ["linux"], + "os": [ + "linux" + ], "engines": { "node": ">=12" } @@ -832,10 +888,14 @@ "version": "0.16.10", "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.16.10.tgz", "integrity": "sha512-61lcjVC/RldNNMUzQQdyCWjCxp9YLEQgIxErxU9XluX7juBdGKb0pvddS0vPNuCvotRbzijZ1pzII+26haWzbA==", - "cpu": ["x64"], + "cpu": [ + "x64" + ], "dev": true, "optional": true, - "os": ["linux"], + "os": [ + "linux" + ], "engines": { "node": ">=12" } @@ -844,10 +904,14 @@ "version": "0.16.10", "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.16.10.tgz", "integrity": "sha512-JeZXCX3viSA9j4HqSoygjssdqYdfHd6yCFWyfSekLbz4Ef+D2EjvsN02ZQPwYl5a5gg/ehdHgegHhlfOFP0HCA==", - "cpu": ["x64"], + "cpu": [ + "x64" + ], "dev": true, "optional": true, - "os": ["netbsd"], + "os": [ + "netbsd" + ], "engines": { "node": ">=12" } @@ -856,10 +920,14 @@ "version": "0.16.10", "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.16.10.tgz", "integrity": "sha512-3qpxQKuEVIIg8SebpXsp82OBrqjPV/OwNWmG+TnZDr3VGyChNnGMHccC1xkbxCHDQNnnXjxhMQNyHmdFJbmbRA==", - "cpu": ["x64"], + "cpu": [ + "x64" + ], "dev": true, "optional": true, - "os": ["openbsd"], + "os": [ + "openbsd" + ], "engines": { "node": ">=12" } @@ -868,10 +936,14 @@ "version": "0.16.10", "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.16.10.tgz", "integrity": "sha512-z+q0xZ+et/7etz7WoMyXTHZ1rB8PMSNp/FOqURLJLOPb3GWJ2aj4oCqFCjPwEbW1rsT7JPpxeH/DwGAWk/I1Bg==", - "cpu": ["x64"], + "cpu": [ + "x64" + ], "dev": true, "optional": true, - "os": ["sunos"], + "os": [ + "sunos" + ], "engines": { "node": ">=12" } @@ -880,10 +952,14 @@ "version": "0.16.10", "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.16.10.tgz", "integrity": "sha512-+YYu5sbQ9npkNT9Dec+tn1F/kjg6SMgr6bfi/6FpXYZvCRfu2YFPZGb+3x8K30s8eRxFpoG4sGhiSUkr1xbHEw==", - "cpu": ["arm64"], + "cpu": [ + "arm64" + ], "dev": true, "optional": true, - "os": ["win32"], + "os": [ + "win32" + ], "engines": { "node": ">=12" } @@ -892,10 +968,14 @@ "version": "0.16.10", "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.16.10.tgz", "integrity": "sha512-Aw7Fupk7XNehR1ftHGYwUteyJ2q+em/aE+fVU3YMTBN2V5A7Z4aVCSV+SvCp9HIIHZavPFBpbdP3VfjQpdf6Xg==", - "cpu": ["ia32"], + "cpu": [ + "ia32" + ], "dev": true, "optional": true, - "os": ["win32"], + "os": [ + "win32" + ], "engines": { "node": ">=12" } @@ -904,10 +984,14 @@ "version": "0.16.10", "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.16.10.tgz", "integrity": "sha512-qddWullt3sC1EIpfHvCRBq3H4g3L86DZpD6n8k2XFjFVyp01D++uNbN1hT/JRsHxTbyyemZcpwL5aRlJwc/zFw==", - "cpu": ["x64"], + "cpu": [ + "x64" + ], "dev": true, "optional": true, - "os": ["win32"], + "os": [ + "win32" + ], "engines": { "node": ">=12" } @@ -1672,11 +1756,15 @@ }, "node_modules/@swc/core-darwin-arm64": { "version": "1.3.24", - "cpu": ["arm64"], + "cpu": [ + "arm64" + ], "dev": true, "license": "Apache-2.0 AND MIT", "optional": true, - "os": ["darwin"], + "os": [ + "darwin" + ], "engines": { "node": ">=10" } @@ -1685,10 +1773,14 @@ "version": "1.3.24", "resolved": "https://registry.npmjs.org/@swc/core-darwin-x64/-/core-darwin-x64-1.3.24.tgz", "integrity": "sha512-px+5vkGtgPH0m3FkkTBHynlRdS5rRz+lK+wiXIuBZFJSySWFl6RkKbvwkD+sf0MpazQlqwlv/rTOGJBw6oDffg==", - "cpu": ["x64"], + "cpu": [ + "x64" + ], "dev": true, "optional": true, - "os": ["darwin"], + "os": [ + "darwin" + ], "engines": { "node": ">=10" } @@ -1697,10 +1789,14 @@ "version": "1.3.24", "resolved": "https://registry.npmjs.org/@swc/core-linux-arm-gnueabihf/-/core-linux-arm-gnueabihf-1.3.24.tgz", "integrity": "sha512-jLs8ZOdTV4UW4J12E143QJ4mOMONQtqgAnuhBbRuWFzQ3ny1dfoC3P1jNWAJ2Xi59XdxAIXn0PggPNH4Kh34kw==", - "cpu": ["arm"], + "cpu": [ + "arm" + ], "dev": true, "optional": true, - "os": ["linux"], + "os": [ + "linux" + ], "engines": { "node": ">=10" } @@ -1709,10 +1805,14 @@ "version": "1.3.24", "resolved": "https://registry.npmjs.org/@swc/core-linux-arm64-gnu/-/core-linux-arm64-gnu-1.3.24.tgz", "integrity": "sha512-A/v0h70BekrwGpp1DlzIFGcHQ3QQ2PexXcnnuIBZeMc9gNmHlcZmg3EcwAnaUDiokhNuSUFA/wV94yk1OqmSkw==", - "cpu": ["arm64"], + "cpu": [ + "arm64" + ], "dev": true, "optional": true, - "os": ["linux"], + "os": [ + "linux" + ], "engines": { "node": ">=10" } @@ -1721,10 +1821,14 @@ "version": "1.3.24", "resolved": "https://registry.npmjs.org/@swc/core-linux-arm64-musl/-/core-linux-arm64-musl-1.3.24.tgz", "integrity": "sha512-pbc9eArWPTiMrbpS/pJo0IiQNAKAQBcBIDjWBGP1tcw2iDXYLw4bruwz9kI/VjakbshWb8MoE4T5ClkeuULvSw==", - "cpu": ["arm64"], + "cpu": [ + "arm64" + ], "dev": true, "optional": true, - "os": ["linux"], + "os": [ + "linux" + ], "engines": { "node": ">=10" } @@ -1733,10 +1837,14 @@ "version": "1.3.24", "resolved": "https://registry.npmjs.org/@swc/core-linux-x64-gnu/-/core-linux-x64-gnu-1.3.24.tgz", "integrity": "sha512-pP5pOLlY1xd352qo7rTlpVPUI9/9VhOd4b3Lk+LzfZDq9bTL2NDlGfyrPiwa5DGHMSzrugH56K2J68eutkxYVA==", - "cpu": ["x64"], + "cpu": [ + "x64" + ], "dev": true, "optional": true, - "os": ["linux"], + "os": [ + "linux" + ], "engines": { "node": ">=10" } @@ -1745,10 +1853,14 @@ "version": "1.3.24", "resolved": "https://registry.npmjs.org/@swc/core-linux-x64-musl/-/core-linux-x64-musl-1.3.24.tgz", "integrity": "sha512-phNbP7zGp+Wcyxq1Qxlpe5KkxO7WLT2kVQUC7aDFGlVdCr+xdXsfH1MzheHtnr0kqTVQX1aiM8XXXHfFxR0oNA==", - "cpu": ["x64"], + "cpu": [ + "x64" + ], "dev": true, "optional": true, - "os": ["linux"], + "os": [ + "linux" + ], "engines": { "node": ">=10" } @@ -1757,10 +1869,14 @@ "version": "1.3.24", "resolved": "https://registry.npmjs.org/@swc/core-win32-arm64-msvc/-/core-win32-arm64-msvc-1.3.24.tgz", "integrity": "sha512-qhbiJTWAOqyR+K9xnGmCkOWSz2EmWpDBstEJCEOTc6FZiEdbiTscDmqTcMbCKaTHGu8t+6erVA4t65/Eg6uWPA==", - "cpu": ["arm64"], + "cpu": [ + "arm64" + ], "dev": true, "optional": true, - "os": ["win32"], + "os": [ + "win32" + ], "engines": { "node": ">=10" } @@ -1769,10 +1885,14 @@ "version": "1.3.24", "resolved": "https://registry.npmjs.org/@swc/core-win32-ia32-msvc/-/core-win32-ia32-msvc-1.3.24.tgz", "integrity": "sha512-JfghIlscE4Rz+Lc08lSoDh+R0cWxrISed5biogFfE6vZqhaDnw3E5Qshqw7O3pIaiq8L2u1nmzuyP581ZmpbRA==", - "cpu": ["ia32"], + "cpu": [ + "ia32" + ], "dev": true, "optional": true, - "os": ["win32"], + "os": [ + "win32" + ], "engines": { "node": ">=10" } @@ -1781,10 +1901,14 @@ "version": "1.3.24", "resolved": "https://registry.npmjs.org/@swc/core-win32-x64-msvc/-/core-win32-x64-msvc-1.3.24.tgz", "integrity": "sha512-3AmJRr0hwciwDBbzUNqaftvppzS8v9X/iv/Wl7YaVLBVpPfQvaZzfqLycvNMGLZb5vIKXR/u58txg3dRBGsJtw==", - "cpu": ["x64"], + "cpu": [ + "x64" + ], "dev": true, "optional": true, - "os": ["win32"], + "os": [ + "win32" + ], "engines": { "node": ">=10" } @@ -1822,10 +1946,6 @@ "@swc/core": "^1.0.46" } }, - "node_modules/@tailwindcss/oxide": { - "resolved": "oxide-node-api-shim", - "link": true - }, "node_modules/@trysound/sax": { "version": "0.2.0", "dev": true, @@ -1928,9 +2048,79 @@ "dev": true, "license": "MIT" }, + "node_modules/@typescript-eslint/types": { + "version": "5.55.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.55.0.tgz", + "integrity": "sha512-M4iRh4AG1ChrOL6Y+mETEKGeDnT7Sparn6fhZ5LtVJF1909D5O4uqK+C5NPbLmpfZ0XIIxCdwzKiijpZUOvOug==", + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/typescript-estree": { + "version": "5.55.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.55.0.tgz", + "integrity": "sha512-I7X4A9ovA8gdpWMpr7b1BN9eEbvlEtWhQvpxp/yogt48fy9Lj3iE3ild/1H3jKBBIYj5YYJmS2+9ystVhC7eaQ==", + "dependencies": { + "@typescript-eslint/types": "5.55.0", + "@typescript-eslint/visitor-keys": "5.55.0", + "debug": "^4.3.4", + "globby": "^11.1.0", + "is-glob": "^4.0.3", + "semver": "^7.3.7", + "tsutils": "^3.21.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/typescript-estree/node_modules/semver": { + "version": "7.3.8", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.8.tgz", + "integrity": "sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==", + "dependencies": { + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/@typescript-eslint/visitor-keys": { + "version": "5.55.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.55.0.tgz", + "integrity": "sha512-q2dlHHwWgirKh1D3acnuApXG+VNXpEY5/AwRxDVuEQpxWaB0jCDe0jFMVMALJ3ebSfuOVE8/rMS+9ZOYGg1GWw==", + "dependencies": { + "@typescript-eslint/types": "5.55.0", + "eslint-visitor-keys": "^3.3.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, "node_modules/acorn": { "version": "7.4.1", + "dev": true, "license": "MIT", + "peer": true, "bin": { "acorn": "bin/acorn" }, @@ -1947,22 +2137,6 @@ "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" } }, - "node_modules/acorn-node": { - "version": "1.8.2", - "license": "Apache-2.0", - "dependencies": { - "acorn": "^7.0.0", - "acorn-walk": "^7.0.0", - "xtend": "^4.0.2" - } - }, - "node_modules/acorn-walk": { - "version": "7.2.0", - "license": "MIT", - "engines": { - "node": ">=0.4.0" - } - }, "node_modules/ajv": { "version": "6.12.6", "dev": true, @@ -2025,6 +2199,11 @@ "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, + "node_modules/any-promise": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/any-promise/-/any-promise-1.3.0.tgz", + "integrity": "sha512-7UvmKalWRt1wgjL1RrGxoSJW/0QZFIegpeGvZG9kjp8vrRu55XTHbwnqq2GpXm9uLbcuhxm3IqX9OB4MZR1b2A==" + }, "node_modules/anymatch": { "version": "3.1.2", "license": "ISC", @@ -2086,6 +2265,22 @@ "sprintf-js": "~1.0.2" } }, + "node_modules/array-union": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", + "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", + "engines": { + "node": ">=8" + } + }, + "node_modules/ast-module-types": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ast-module-types/-/ast-module-types-3.0.0.tgz", + "integrity": "sha512-CMxMCOCS+4D+DkOQfuZf+vLrSEmY/7xtORwdxs4wtcC1wVgvk2MqFFTwQCFhvWsI4KPU9lcWXPI8DgRiz+xetQ==", + "engines": { + "node": ">=6.0" + } + }, "node_modules/autoprefixer": { "version": "10.4.13", "dev": true, @@ -2206,7 +2401,6 @@ }, "node_modules/balanced-match": { "version": "1.0.0", - "dev": true, "license": "MIT" }, "node_modules/base64-js": { @@ -2534,7 +2728,6 @@ }, "node_modules/brace-expansion": { "version": "1.1.11", - "dev": true, "license": "MIT", "dependencies": { "balanced-match": "^1.0.0", @@ -2916,7 +3109,6 @@ }, "node_modules/concat-map": { "version": "0.0.1", - "dev": true, "license": "MIT" }, "node_modules/concurrently": { @@ -3180,9 +3372,9 @@ } }, "node_modules/debug": { - "version": "4.3.2", - "dev": true, - "license": "MIT", + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", "dependencies": { "ms": "2.1.2" }, @@ -3392,10 +3584,6 @@ "node": ">=0.10.0" } }, - "node_modules/defined": { - "version": "1.0.0", - "license": "MIT" - }, "node_modules/detect-libc": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-1.0.3.tgz", @@ -3416,19 +3604,18 @@ "node": ">=8" } }, - "node_modules/detective": { - "version": "5.2.1", - "license": "MIT", + "node_modules/detective-typescript": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/detective-typescript/-/detective-typescript-9.0.0.tgz", + "integrity": "sha512-lR78AugfUSBojwlSRZBeEqQ1l8LI7rbxOl1qTUnGLcjZQDjZmrZCb7R46rK8U8B5WzFvJrxa7fEBA8FoD/n5fA==", "dependencies": { - "acorn-node": "^1.8.2", - "defined": "^1.0.0", - "minimist": "^1.2.6" - }, - "bin": { - "detective": "bin/detective.js" + "@typescript-eslint/typescript-estree": "^5.13.0", + "ast-module-types": "^3.0.0", + "node-source-walk": "^5.0.0", + "typescript": "^4.5.5" }, "engines": { - "node": ">=0.8.0" + "node": "^12.20.0 || ^14.14.0 || >=16.0.0" } }, "node_modules/didyoumean": { @@ -3443,6 +3630,17 @@ "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" } }, + "node_modules/dir-glob": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", + "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", + "dependencies": { + "path-type": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/dlv": { "version": "1.1.3", "license": "MIT" @@ -3648,10 +3846,14 @@ "version": "0.16.10", "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.16.10.tgz", "integrity": "sha512-O7Pd5hLEtTg37NC73pfhUOGTjx/+aXu5YoSq3ahCxcN7Bcr2F47mv+kG5t840thnsEzrv0oB70+LJu3gUgchvg==", - "cpu": ["loong64"], + "cpu": [ + "loong64" + ], "dev": true, "optional": true, - "os": ["linux"], + "os": [ + "linux" + ], "engines": { "node": ">=12" } @@ -3805,7 +4007,6 @@ "version": "3.3.0", "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.3.0.tgz", "integrity": "sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA==", - "dev": true, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" } @@ -4215,14 +4416,15 @@ }, "node_modules/fs.realpath": { "version": "1.0.0", - "dev": true, "license": "ISC" }, "node_modules/fsevents": { "version": "2.3.2", "license": "MIT", "optional": true, - "os": ["darwin"], + "os": [ + "darwin" + ], "engines": { "node": "^8.16.0 || ^10.6.0 || >=11.0.0" } @@ -4279,7 +4481,6 @@ }, "node_modules/glob": { "version": "7.1.6", - "dev": true, "license": "ISC", "dependencies": { "fs.realpath": "^1.0.0", @@ -4314,6 +4515,25 @@ "node": ">=4" } }, + "node_modules/globby": { + "version": "11.1.0", + "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", + "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==", + "dependencies": { + "array-union": "^2.1.0", + "dir-glob": "^3.0.1", + "fast-glob": "^3.2.9", + "ignore": "^5.2.0", + "merge2": "^1.4.1", + "slash": "^3.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/got": { "version": "8.3.2", "dev": true, @@ -4443,7 +4663,6 @@ }, "node_modules/ignore": { "version": "5.2.4", - "dev": true, "license": "MIT", "engines": { "node": ">= 4" @@ -4508,7 +4727,6 @@ }, "node_modules/inflight": { "version": "1.0.6", - "dev": true, "license": "ISC", "dependencies": { "once": "^1.3.0", @@ -4517,7 +4735,6 @@ }, "node_modules/inherits": { "version": "2.0.4", - "dev": true, "license": "ISC" }, "node_modules/ini": { @@ -5636,6 +5853,14 @@ "@types/yargs-parser": "*" } }, + "node_modules/jiti": { + "version": "1.17.2", + "resolved": "https://registry.npmjs.org/jiti/-/jiti-1.17.2.tgz", + "integrity": "sha512-Xf0nU8+8wuiQpLcqdb2HRyHqYwGk2Pd+F7kstyp20ZuqTyCmB9dqpX2NxaxFc1kovraa2bG6c1RL3W7XfapiZg==", + "bin": { + "jiti": "bin/jiti.js" + } + }, "node_modules/js-sdsl": { "version": "4.1.4", "dev": true, @@ -5790,10 +6015,14 @@ "version": "1.18.0", "resolved": "https://registry.npmjs.org/lightningcss-darwin-arm64/-/lightningcss-darwin-arm64-1.18.0.tgz", "integrity": "sha512-OqjydwtiNPgdH1ByIjA1YzqvDG/OMR6L3LPN6wRl1729LB0y4Mik7L06kmZaTb+pvUHr+NmDd2KCwnlrQ4zO3w==", - "cpu": ["arm64"], + "cpu": [ + "arm64" + ], "dev": true, "optional": true, - "os": ["darwin"], + "os": [ + "darwin" + ], "engines": { "node": ">= 12.0.0" }, @@ -5806,10 +6035,14 @@ "version": "1.18.0", "resolved": "https://registry.npmjs.org/lightningcss-darwin-x64/-/lightningcss-darwin-x64-1.18.0.tgz", "integrity": "sha512-mNiuPHj89/JHZmJMp+5H8EZSt6EL5DZRWJ31O6k3DrLLnRIQjXuXdDdN8kP7LoIkeWI5xvyD60CsReJm+YWYAw==", - "cpu": ["x64"], + "cpu": [ + "x64" + ], "dev": true, "optional": true, - "os": ["darwin"], + "os": [ + "darwin" + ], "engines": { "node": ">= 12.0.0" }, @@ -5822,10 +6055,14 @@ "version": "1.18.0", "resolved": "https://registry.npmjs.org/lightningcss-linux-arm-gnueabihf/-/lightningcss-linux-arm-gnueabihf-1.18.0.tgz", "integrity": "sha512-S+25JjI6601HiAVoTDXW6SqH+E94a+FHA7WQqseyNHunOgVWKcAkNEc2LJvVxgwTq6z41sDIb9/M3Z9wa9lk4A==", - "cpu": ["arm"], + "cpu": [ + "arm" + ], "dev": true, "optional": true, - "os": ["linux"], + "os": [ + "linux" + ], "engines": { "node": ">= 12.0.0" }, @@ -5838,10 +6075,14 @@ "version": "1.18.0", "resolved": "https://registry.npmjs.org/lightningcss-linux-arm64-gnu/-/lightningcss-linux-arm64-gnu-1.18.0.tgz", "integrity": "sha512-JSqh4+21dCgBecIQUet35dtE4PhhSEMyqe3y0ZNQrAJQ5kyUPSQHiw81WXnPJcOSTTpG0TyMLiC8K//+BsFGQA==", - "cpu": ["arm64"], + "cpu": [ + "arm64" + ], "dev": true, "optional": true, - "os": ["linux"], + "os": [ + "linux" + ], "engines": { "node": ">= 12.0.0" }, @@ -5854,10 +6095,14 @@ "version": "1.18.0", "resolved": "https://registry.npmjs.org/lightningcss-linux-arm64-musl/-/lightningcss-linux-arm64-musl-1.18.0.tgz", "integrity": "sha512-2FWHa8iUhShnZnqhn2wfIcK5adJat9hAAaX7etNsoXJymlliDIOFuBQEsba2KBAZSM4QqfQtvRdR7m8i0I7ybQ==", - "cpu": ["arm64"], + "cpu": [ + "arm64" + ], "dev": true, "optional": true, - "os": ["linux"], + "os": [ + "linux" + ], "engines": { "node": ">= 12.0.0" }, @@ -5870,10 +6115,14 @@ "version": "1.18.0", "resolved": "https://registry.npmjs.org/lightningcss-linux-x64-gnu/-/lightningcss-linux-x64-gnu-1.18.0.tgz", "integrity": "sha512-plCPGQJtDZHcLVKVRLnQVF2XRsIC32WvuJhQ7fJ7F6BV98b/VZX0OlX05qUaOESD9dCDHjYSfxsgcvOKgCWh7A==", - "cpu": ["x64"], + "cpu": [ + "x64" + ], "dev": true, "optional": true, - "os": ["linux"], + "os": [ + "linux" + ], "engines": { "node": ">= 12.0.0" }, @@ -5886,10 +6135,14 @@ "version": "1.18.0", "resolved": "https://registry.npmjs.org/lightningcss-linux-x64-musl/-/lightningcss-linux-x64-musl-1.18.0.tgz", "integrity": "sha512-na+BGtVU6fpZvOHKhnlA0XHeibkT3/46nj6vLluG3kzdJYoBKU6dIl7DSOk++8jv4ybZyFJ0aOFMMSc8g2h58A==", - "cpu": ["x64"], + "cpu": [ + "x64" + ], "dev": true, "optional": true, - "os": ["linux"], + "os": [ + "linux" + ], "engines": { "node": ">= 12.0.0" }, @@ -5902,10 +6155,14 @@ "version": "1.18.0", "resolved": "https://registry.npmjs.org/lightningcss-win32-x64-msvc/-/lightningcss-win32-x64-msvc-1.18.0.tgz", "integrity": "sha512-5qeAH4RMNy2yMNEl7e5TI6upt/7xD2ZpHWH4RkT8iJ7/6POS5mjHbXWUO9Q1hhDhqkdzGa76uAdMzEouIeCyNw==", - "cpu": ["x64"], + "cpu": [ + "x64" + ], "dev": true, "optional": true, - "os": ["win32"], + "os": [ + "win32" + ], "engines": { "node": ">= 12.0.0" }, @@ -5923,7 +6180,6 @@ }, "node_modules/lines-and-columns": { "version": "1.2.4", - "dev": true, "license": "MIT" }, "node_modules/locate-path": { @@ -5972,7 +6228,6 @@ }, "node_modules/lru-cache": { "version": "6.0.0", - "dev": true, "license": "ISC", "dependencies": { "yallist": "^4.0.0" @@ -6094,7 +6349,6 @@ }, "node_modules/minimatch": { "version": "3.1.2", - "dev": true, "license": "ISC", "dependencies": { "brace-expansion": "^1.1.7" @@ -6103,15 +6357,20 @@ "node": "*" } }, - "node_modules/minimist": { - "version": "1.2.6", - "license": "MIT" - }, "node_modules/ms": { "version": "2.1.2", - "dev": true, "license": "MIT" }, + "node_modules/mz": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/mz/-/mz-2.7.0.tgz", + "integrity": "sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q==", + "dependencies": { + "any-promise": "^1.0.0", + "object-assign": "^4.0.1", + "thenify-all": "^1.0.0" + } + }, "node_modules/nanoid": { "version": "3.3.4", "license": "MIT", @@ -6142,6 +6401,17 @@ "dev": true, "license": "MIT" }, + "node_modules/node-source-walk": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/node-source-walk/-/node-source-walk-5.0.0.tgz", + "integrity": "sha512-58APXoMXpmmU+oVBJFajhTCoD8d/OGtngnVAWzIo2A8yn0IXwBzvIVIsTzoie/SrA37u+1hnpNz2HMWx/VIqlw==", + "dependencies": { + "@babel/parser": "^7.0.0" + }, + "engines": { + "node": ">=12" + } + }, "node_modules/normalize-path": { "version": "3.0.0", "license": "MIT", @@ -6212,7 +6482,6 @@ }, "node_modules/object-assign": { "version": "4.1.1", - "dev": true, "license": "MIT", "engines": { "node": ">=0.10.0" @@ -6227,7 +6496,6 @@ }, "node_modules/once": { "version": "1.4.0", - "dev": true, "license": "ISC", "dependencies": { "wrappy": "1" @@ -6424,7 +6692,6 @@ }, "node_modules/path-is-absolute": { "version": "1.0.1", - "dev": true, "license": "MIT", "engines": { "node": ">=0.10.0" @@ -6442,6 +6709,14 @@ "version": "1.0.7", "license": "MIT" }, + "node_modules/path-type": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", + "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", + "engines": { + "node": ">=8" + } + }, "node_modules/pend": { "version": "1.2.0", "dev": true, @@ -6489,7 +6764,6 @@ }, "node_modules/pirates": { "version": "4.0.4", - "dev": true, "license": "MIT", "engines": { "node": ">= 6" @@ -7393,7 +7667,6 @@ }, "node_modules/slash": { "version": "3.0.0", - "dev": true, "license": "MIT", "engines": { "node": ">=8" @@ -7609,6 +7882,34 @@ "postcss": "^8.2.15" } }, + "node_modules/sucrase": { + "version": "3.29.0", + "resolved": "https://registry.npmjs.org/sucrase/-/sucrase-3.29.0.tgz", + "integrity": "sha512-bZPAuGA5SdFHuzqIhTAqt9fvNEo9rESqXIG3oiKdF8K4UmkQxC4KlNL3lVyAErXp+mPvUqZ5l13qx6TrDIGf3A==", + "dependencies": { + "commander": "^4.0.0", + "glob": "7.1.6", + "lines-and-columns": "^1.1.6", + "mz": "^2.7.0", + "pirates": "^4.0.1", + "ts-interface-checker": "^0.1.9" + }, + "bin": { + "sucrase": "bin/sucrase", + "sucrase-node": "bin/sucrase-node" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/sucrase/node_modules/commander": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/commander/-/commander-4.1.1.tgz", + "integrity": "sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA==", + "engines": { + "node": ">= 6" + } + }, "node_modules/supports-color": { "version": "7.2.0", "dev": true, @@ -7712,6 +8013,25 @@ "dev": true, "license": "MIT" }, + "node_modules/thenify": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/thenify/-/thenify-3.3.1.tgz", + "integrity": "sha512-RVZSIV5IG10Hk3enotrhvz0T9em6cyHBLkH/YAZuKqd8hRkKhSfCGIcP2KUY0EPxndzANBmNllzWPwak+bheSw==", + "dependencies": { + "any-promise": "^1.0.0" + } + }, + "node_modules/thenify-all": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/thenify-all/-/thenify-all-1.6.0.tgz", + "integrity": "sha512-RNxQH/qI8/t3thXJDwcstUO4zeqo64+Uy/+sNVRBx4Xn2OX+OZ9oP+iJnNFqplFra2ZUVeKCSa2oVWi3T4uVmA==", + "dependencies": { + "thenify": ">= 3.1.0 < 4" + }, + "engines": { + "node": ">=0.8" + } + }, "node_modules/through": { "version": "2.3.8", "dev": true, @@ -7770,11 +8090,35 @@ "node": ">=0.8.0" } }, + "node_modules/ts-interface-checker": { + "version": "0.1.13", + "resolved": "https://registry.npmjs.org/ts-interface-checker/-/ts-interface-checker-0.1.13.tgz", + "integrity": "sha512-Y/arvbn+rrz3JCKl9C4kVNfTfSm2/mEp5FSz5EsZSANGPSlQrpRI5M4PKF+mJnE52jOO90PnPSc3Ur3bTQw0gA==" + }, "node_modules/tslib": { "version": "2.4.1", "dev": true, "license": "0BSD" }, + "node_modules/tsutils": { + "version": "3.21.0", + "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-3.21.0.tgz", + "integrity": "sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==", + "dependencies": { + "tslib": "^1.8.1" + }, + "engines": { + "node": ">= 6" + }, + "peerDependencies": { + "typescript": ">=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta" + } + }, + "node_modules/tsutils/node_modules/tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==" + }, "node_modules/tunnel-agent": { "version": "0.6.0", "dev": true, @@ -7808,55 +8152,79 @@ "version": "1.6.3", "resolved": "https://registry.npmjs.org/turbo-darwin-64/-/turbo-darwin-64-1.6.3.tgz", "integrity": "sha512-QmDIX0Yh1wYQl0bUS0gGWwNxpJwrzZU2GIAYt3aOKoirWA2ecnyb3R6ludcS1znfNV2MfunP+l8E3ncxUHwtjA==", - "cpu": ["x64"], + "cpu": [ + "x64" + ], "dev": true, "optional": true, - "os": ["darwin"] + "os": [ + "darwin" + ] }, "node_modules/turbo-darwin-arm64": { "version": "1.6.3", "resolved": "https://registry.npmjs.org/turbo-darwin-arm64/-/turbo-darwin-arm64-1.6.3.tgz", "integrity": "sha512-75DXhFpwE7CinBbtxTxH08EcWrxYSPFow3NaeFwsG8aymkWXF+U2aukYHJA6I12n9/dGqf7yRXzkF0S/9UtdyQ==", - "cpu": ["arm64"], + "cpu": [ + "arm64" + ], "dev": true, "optional": true, - "os": ["darwin"] + "os": [ + "darwin" + ] }, "node_modules/turbo-linux-64": { "version": "1.6.3", "resolved": "https://registry.npmjs.org/turbo-linux-64/-/turbo-linux-64-1.6.3.tgz", "integrity": "sha512-O9uc6J0yoRPWdPg9THRQi69K6E2iZ98cRHNvus05lZbcPzZTxJYkYGb5iagCmCW/pq6fL4T4oLWAd6evg2LGQA==", - "cpu": ["x64"], + "cpu": [ + "x64" + ], "dev": true, "optional": true, - "os": ["linux"] + "os": [ + "linux" + ] }, "node_modules/turbo-linux-arm64": { "version": "1.6.3", "resolved": "https://registry.npmjs.org/turbo-linux-arm64/-/turbo-linux-arm64-1.6.3.tgz", "integrity": "sha512-dCy667qqEtZIhulsRTe8hhWQNCJO0i20uHXv7KjLHuFZGCeMbWxB8rsneRoY+blf8+QNqGuXQJxak7ayjHLxiA==", - "cpu": ["arm64"], + "cpu": [ + "arm64" + ], "dev": true, "optional": true, - "os": ["linux"] + "os": [ + "linux" + ] }, "node_modules/turbo-windows-64": { "version": "1.6.3", "resolved": "https://registry.npmjs.org/turbo-windows-64/-/turbo-windows-64-1.6.3.tgz", "integrity": "sha512-lKRqwL3mrVF09b9KySSaOwetehmGknV9EcQTF7d2dxngGYYX1WXoQLjFP9YYH8ZV07oPm+RUOAKSCQuDuMNhiA==", - "cpu": ["x64"], + "cpu": [ + "x64" + ], "dev": true, "optional": true, - "os": ["win32"] + "os": [ + "win32" + ] }, "node_modules/turbo-windows-arm64": { "version": "1.6.3", "resolved": "https://registry.npmjs.org/turbo-windows-arm64/-/turbo-windows-arm64-1.6.3.tgz", "integrity": "sha512-BXY1sDPEA1DgPwuENvDCD8B7Hb0toscjus941WpL8CVd10hg9pk/MWn9CNgwDO5Q9ks0mw+liDv2EMnleEjeNA==", - "cpu": ["arm64"], + "cpu": [ + "arm64" + ], "dev": true, "optional": true, - "os": ["win32"] + "os": [ + "win32" + ] }, "node_modules/type-detect": { "version": "4.0.8", @@ -7877,6 +8245,18 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/typescript": { + "version": "4.9.5", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz", + "integrity": "sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==", + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=4.2.0" + } + }, "node_modules/unbzip2-stream": { "version": "1.4.3", "dev": true, @@ -8003,7 +8383,6 @@ }, "node_modules/wrappy": { "version": "1.0.2", - "dev": true, "license": "ISC" }, "node_modules/write-file-atomic": { @@ -8020,6 +8399,7 @@ }, "node_modules/xtend": { "version": "4.0.2", + "dev": true, "license": "MIT", "engines": { "node": ">=0.4" @@ -8035,7 +8415,6 @@ }, "node_modules/yallist": { "version": "4.0.0", - "dev": true, "license": "ISC" }, "node_modules/yaml": { @@ -8095,10 +8474,13 @@ "version": "0.1.0", "extraneous": true, "license": "MIT", - "workspaces": ["node"] + "workspaces": [ + "node" + ] }, "oxide-node-api-shim": { "name": "@tailwindcss/oxide-shim", + "extraneous": true, "license": "MIT" }, "oxide/crates/node": { @@ -8325,8 +8707,7 @@ } }, "@babel/parser": { - "version": "7.18.9", - "dev": true + "version": "7.18.9" }, "@babel/plugin-syntax-async-generators": { "version": "7.8.4", @@ -9244,9 +9625,6 @@ "source-map-support": "^0.5.13" } }, - "@tailwindcss/oxide": { - "version": "file:oxide-node-api-shim" - }, "@trysound/sax": { "version": "0.2.0", "dev": true @@ -9332,8 +9710,48 @@ "version": "20.2.1", "dev": true }, + "@typescript-eslint/types": { + "version": "5.55.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.55.0.tgz", + "integrity": "sha512-M4iRh4AG1ChrOL6Y+mETEKGeDnT7Sparn6fhZ5LtVJF1909D5O4uqK+C5NPbLmpfZ0XIIxCdwzKiijpZUOvOug==" + }, + "@typescript-eslint/typescript-estree": { + "version": "5.55.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.55.0.tgz", + "integrity": "sha512-I7X4A9ovA8gdpWMpr7b1BN9eEbvlEtWhQvpxp/yogt48fy9Lj3iE3ild/1H3jKBBIYj5YYJmS2+9ystVhC7eaQ==", + "requires": { + "@typescript-eslint/types": "5.55.0", + "@typescript-eslint/visitor-keys": "5.55.0", + "debug": "^4.3.4", + "globby": "^11.1.0", + "is-glob": "^4.0.3", + "semver": "^7.3.7", + "tsutils": "^3.21.0" + }, + "dependencies": { + "semver": { + "version": "7.3.8", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.8.tgz", + "integrity": "sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==", + "requires": { + "lru-cache": "^6.0.0" + } + } + } + }, + "@typescript-eslint/visitor-keys": { + "version": "5.55.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.55.0.tgz", + "integrity": "sha512-q2dlHHwWgirKh1D3acnuApXG+VNXpEY5/AwRxDVuEQpxWaB0jCDe0jFMVMALJ3ebSfuOVE8/rMS+9ZOYGg1GWw==", + "requires": { + "@typescript-eslint/types": "5.55.0", + "eslint-visitor-keys": "^3.3.0" + } + }, "acorn": { - "version": "7.4.1" + "version": "7.4.1", + "dev": true, + "peer": true }, "acorn-jsx": { "version": "5.3.2", @@ -9342,17 +9760,6 @@ "dev": true, "requires": {} }, - "acorn-node": { - "version": "1.8.2", - "requires": { - "acorn": "^7.0.0", - "acorn-walk": "^7.0.0", - "xtend": "^4.0.2" - } - }, - "acorn-walk": { - "version": "7.2.0" - }, "ajv": { "version": "6.12.6", "dev": true, @@ -9387,6 +9794,11 @@ "color-convert": "^2.0.1" } }, + "any-promise": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/any-promise/-/any-promise-1.3.0.tgz", + "integrity": "sha512-7UvmKalWRt1wgjL1RrGxoSJW/0QZFIegpeGvZG9kjp8vrRu55XTHbwnqq2GpXm9uLbcuhxm3IqX9OB4MZR1b2A==" + }, "anymatch": { "version": "3.1.2", "requires": { @@ -9421,6 +9833,16 @@ "sprintf-js": "~1.0.2" } }, + "array-union": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", + "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==" + }, + "ast-module-types": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ast-module-types/-/ast-module-types-3.0.0.tgz", + "integrity": "sha512-CMxMCOCS+4D+DkOQfuZf+vLrSEmY/7xtORwdxs4wtcC1wVgvk2MqFFTwQCFhvWsI4KPU9lcWXPI8DgRiz+xetQ==" + }, "autoprefixer": { "version": "10.4.13", "dev": true, @@ -9494,8 +9916,7 @@ } }, "balanced-match": { - "version": "1.0.0", - "dev": true + "version": "1.0.0" }, "base64-js": { "version": "1.5.1", @@ -9710,7 +10131,6 @@ }, "brace-expansion": { "version": "1.1.11", - "dev": true, "requires": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -9946,8 +10366,7 @@ "dev": true }, "concat-map": { - "version": "0.0.1", - "dev": true + "version": "0.0.1" }, "concurrently": { "version": "7.5.0", @@ -10106,8 +10525,9 @@ "dev": true }, "debug": { - "version": "4.3.2", - "dev": true, + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", "requires": { "ms": "2.1.2" } @@ -10247,9 +10667,6 @@ "version": "4.2.2", "dev": true }, - "defined": { - "version": "1.0.0" - }, "detect-libc": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-1.0.3.tgz", @@ -10260,12 +10677,15 @@ "version": "3.1.0", "dev": true }, - "detective": { - "version": "5.2.1", + "detective-typescript": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/detective-typescript/-/detective-typescript-9.0.0.tgz", + "integrity": "sha512-lR78AugfUSBojwlSRZBeEqQ1l8LI7rbxOl1qTUnGLcjZQDjZmrZCb7R46rK8U8B5WzFvJrxa7fEBA8FoD/n5fA==", "requires": { - "acorn-node": "^1.8.2", - "defined": "^1.0.0", - "minimist": "^1.2.6" + "@typescript-eslint/typescript-estree": "^5.13.0", + "ast-module-types": "^3.0.0", + "node-source-walk": "^5.0.0", + "typescript": "^4.5.5" } }, "didyoumean": { @@ -10275,6 +10695,14 @@ "version": "28.1.1", "dev": true }, + "dir-glob": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", + "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", + "requires": { + "path-type": "^4.0.0" + } + }, "dlv": { "version": "1.1.3" }, @@ -10555,8 +10983,7 @@ "eslint-visitor-keys": { "version": "3.3.0", "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.3.0.tgz", - "integrity": "sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA==", - "dev": true + "integrity": "sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA==" }, "espree": { "version": "9.4.1", @@ -10777,8 +11204,7 @@ "dev": true }, "fs.realpath": { - "version": "1.0.0", - "dev": true + "version": "1.0.0" }, "fsevents": { "version": "2.3.2", @@ -10812,7 +11238,6 @@ }, "glob": { "version": "7.1.6", - "dev": true, "requires": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", @@ -10832,6 +11257,19 @@ "version": "11.12.0", "dev": true }, + "globby": { + "version": "11.1.0", + "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", + "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==", + "requires": { + "array-union": "^2.1.0", + "dir-glob": "^3.0.1", + "fast-glob": "^3.2.9", + "ignore": "^5.2.0", + "merge2": "^1.4.1", + "slash": "^3.0.0" + } + }, "got": { "version": "8.3.2", "dev": true, @@ -10911,8 +11349,7 @@ "dev": true }, "ignore": { - "version": "5.2.4", - "dev": true + "version": "5.2.4" }, "import-fresh": { "version": "3.3.0", @@ -10946,15 +11383,13 @@ }, "inflight": { "version": "1.0.6", - "dev": true, "requires": { "once": "^1.3.0", "wrappy": "1" } }, "inherits": { - "version": "2.0.4", - "dev": true + "version": "2.0.4" }, "ini": { "version": "1.3.8", @@ -11780,6 +12215,11 @@ } } }, + "jiti": { + "version": "1.17.2", + "resolved": "https://registry.npmjs.org/jiti/-/jiti-1.17.2.tgz", + "integrity": "sha512-Xf0nU8+8wuiQpLcqdb2HRyHqYwGk2Pd+F7kstyp20ZuqTyCmB9dqpX2NxaxFc1kovraa2bG6c1RL3W7XfapiZg==" + }, "js-sdsl": { "version": "4.1.4", "dev": true @@ -11937,8 +12377,7 @@ "version": "2.0.6" }, "lines-and-columns": { - "version": "1.2.4", - "dev": true + "version": "1.2.4" }, "locate-path": { "version": "5.0.0", @@ -11973,7 +12412,6 @@ }, "lru-cache": { "version": "6.0.0", - "dev": true, "requires": { "yallist": "^4.0.0" } @@ -12047,17 +12485,22 @@ }, "minimatch": { "version": "3.1.2", - "dev": true, "requires": { "brace-expansion": "^1.1.7" } }, - "minimist": { - "version": "1.2.6" - }, "ms": { - "version": "2.1.2", - "dev": true + "version": "2.1.2" + }, + "mz": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/mz/-/mz-2.7.0.tgz", + "integrity": "sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q==", + "requires": { + "any-promise": "^1.0.0", + "object-assign": "^4.0.1", + "thenify-all": "^1.0.0" + } }, "nanoid": { "version": "3.3.4" @@ -12078,6 +12521,14 @@ "version": "2.0.6", "dev": true }, + "node-source-walk": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/node-source-walk/-/node-source-walk-5.0.0.tgz", + "integrity": "sha512-58APXoMXpmmU+oVBJFajhTCoD8d/OGtngnVAWzIo2A8yn0IXwBzvIVIsTzoie/SrA37u+1hnpNz2HMWx/VIqlw==", + "requires": { + "@babel/parser": "^7.0.0" + } + }, "normalize-path": { "version": "3.0.0" }, @@ -12118,15 +12569,13 @@ } }, "object-assign": { - "version": "4.1.1", - "dev": true + "version": "4.1.1" }, "object-hash": { "version": "3.0.0" }, "once": { "version": "1.4.0", - "dev": true, "requires": { "wrappy": "1" } @@ -12245,8 +12694,7 @@ "dev": true }, "path-is-absolute": { - "version": "1.0.1", - "dev": true + "version": "1.0.1" }, "path-key": { "version": "3.1.1", @@ -12255,6 +12703,11 @@ "path-parse": { "version": "1.0.7" }, + "path-type": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", + "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==" + }, "pend": { "version": "1.2.0", "dev": true @@ -12280,8 +12733,7 @@ } }, "pirates": { - "version": "4.0.4", - "dev": true + "version": "4.0.4" }, "pkg-dir": { "version": "4.2.0", @@ -12764,8 +13216,7 @@ "dev": true }, "slash": { - "version": "3.0.0", - "dev": true + "version": "3.0.0" }, "sort-keys": { "version": "1.1.2", @@ -12902,6 +13353,26 @@ "postcss-selector-parser": "^6.0.4" } }, + "sucrase": { + "version": "3.29.0", + "resolved": "https://registry.npmjs.org/sucrase/-/sucrase-3.29.0.tgz", + "integrity": "sha512-bZPAuGA5SdFHuzqIhTAqt9fvNEo9rESqXIG3oiKdF8K4UmkQxC4KlNL3lVyAErXp+mPvUqZ5l13qx6TrDIGf3A==", + "requires": { + "commander": "^4.0.0", + "glob": "7.1.6", + "lines-and-columns": "^1.1.6", + "mz": "^2.7.0", + "pirates": "^4.0.1", + "ts-interface-checker": "^0.1.9" + }, + "dependencies": { + "commander": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/commander/-/commander-4.1.1.tgz", + "integrity": "sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA==" + } + } + }, "supports-color": { "version": "7.2.0", "dev": true, @@ -12967,6 +13438,22 @@ "version": "0.2.0", "dev": true }, + "thenify": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/thenify/-/thenify-3.3.1.tgz", + "integrity": "sha512-RVZSIV5IG10Hk3enotrhvz0T9em6cyHBLkH/YAZuKqd8hRkKhSfCGIcP2KUY0EPxndzANBmNllzWPwak+bheSw==", + "requires": { + "any-promise": "^1.0.0" + } + }, + "thenify-all": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/thenify-all/-/thenify-all-1.6.0.tgz", + "integrity": "sha512-RNxQH/qI8/t3thXJDwcstUO4zeqo64+Uy/+sNVRBx4Xn2OX+OZ9oP+iJnNFqplFra2ZUVeKCSa2oVWi3T4uVmA==", + "requires": { + "thenify": ">= 3.1.0 < 4" + } + }, "through": { "version": "2.3.8", "dev": true @@ -13004,10 +13491,30 @@ } } }, + "ts-interface-checker": { + "version": "0.1.13", + "resolved": "https://registry.npmjs.org/ts-interface-checker/-/ts-interface-checker-0.1.13.tgz", + "integrity": "sha512-Y/arvbn+rrz3JCKl9C4kVNfTfSm2/mEp5FSz5EsZSANGPSlQrpRI5M4PKF+mJnE52jOO90PnPSc3Ur3bTQw0gA==" + }, "tslib": { "version": "2.4.1", "dev": true }, + "tsutils": { + "version": "3.21.0", + "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-3.21.0.tgz", + "integrity": "sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==", + "requires": { + "tslib": "^1.8.1" + }, + "dependencies": { + "tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==" + } + } + }, "tunnel-agent": { "version": "0.6.0", "dev": true, @@ -13079,6 +13586,11 @@ "version": "0.20.2", "dev": true }, + "typescript": { + "version": "4.9.5", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz", + "integrity": "sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==" + }, "unbzip2-stream": { "version": "1.4.3", "dev": true, @@ -13153,8 +13665,7 @@ } }, "wrappy": { - "version": "1.0.2", - "dev": true + "version": "1.0.2" }, "write-file-atomic": { "version": "4.0.1", @@ -13165,15 +13676,15 @@ } }, "xtend": { - "version": "4.0.2" + "version": "4.0.2", + "dev": true }, "y18n": { "version": "5.0.8", "dev": true }, "yallist": { - "version": "4.0.0", - "dev": true + "version": "4.0.0" }, "yaml": { "version": "1.10.2" diff --git a/package.json b/package.json index 3cd2133c8160..a6a806406909 100644 --- a/package.json +++ b/package.json @@ -40,7 +40,7 @@ "lib/*", "peers/*", "scripts/*.js", - "stubs/*.stub.js", + "stubs/*.{js,ts,cjs}", "nesting/*", "types/**/*", "*.d.ts", @@ -75,12 +75,13 @@ "browserslist": "^4.21.5", "chokidar": "^3.5.3", "color-name": "^1.1.4", - "detective": "^5.2.1", + "detective-typescript": "^9.0.0", "didyoumean": "^1.2.2", "dlv": "^1.1.3", "fast-glob": "^3.2.12", "glob-parent": "^6.0.2", "is-glob": "^4.0.3", + "jiti": "^1.17.2", "lightningcss": "^1.18.0", "lilconfig": "^2.1.0", "micromatch": "^4.0.5", @@ -95,7 +96,8 @@ "postcss-selector-parser": "^6.0.11", "postcss-value-parser": "^4.2.0", "quick-lru": "^5.1.1", - "resolve": "^1.22.1" + "resolve": "^1.22.1", + "sucrase": "^3.29.0" }, "browserslist": [ "> 1%", diff --git a/package.stable.json b/package.stable.json index 3c2efc25fd19..0f40e61ca4d4 100644 --- a/package.stable.json +++ b/package.stable.json @@ -73,12 +73,13 @@ "arg": "^5.0.2", "chokidar": "^3.5.3", "color-name": "^1.1.4", - "detective": "^5.2.1", + "detective-typescript": "^9.0.0", "didyoumean": "^1.2.2", "dlv": "^1.1.3", "fast-glob": "^3.2.12", "glob-parent": "^6.0.2", "is-glob": "^4.0.3", + "jiti": "^1.17.2", "lilconfig": "^2.0.6", "micromatch": "^4.0.5", "normalize-path": "^3.0.0", @@ -92,19 +93,29 @@ "postcss-selector-parser": "^6.0.11", "postcss-value-parser": "^4.2.0", "quick-lru": "^5.1.1", - "resolve": "^1.22.1" + "resolve": "^1.22.1", + "sucrase": "^3.29.0" }, - "browserslist": ["> 1%", "not edge <= 18", "not ie 11", "not op_mini all"], + "browserslist": [ + "> 1%", + "not edge <= 18", + "not ie 11", + "not op_mini all" + ], "jest": { "testTimeout": 30000, - "setupFilesAfterEnv": ["/jest/customMatchers.js"], + "setupFilesAfterEnv": [ + "/jest/customMatchers.js" + ], "testPathIgnorePatterns": [ "/node_modules/", "/integrations/", "/standalone-cli/", "\\.test\\.skip\\.js$" ], - "transformIgnorePatterns": ["node_modules/(?!lightningcss)"], + "transformIgnorePatterns": [ + "node_modules/(?!lightningcss)" + ], "transform": { "\\.js$": "@swc/jest", "\\.ts$": "@swc/jest" diff --git a/src/cli/build/index.js b/src/cli/build/index.js index ebb4aa38b6bf..62c020e59f1a 100644 --- a/src/cli/build/index.js +++ b/src/cli/build/index.js @@ -2,9 +2,10 @@ import fs from 'fs' import path from 'path' +import { resolveDefaultConfigPath } from '../../util/resolveConfigPath.js' import { createProcessor } from './plugin.js' -export async function build(args, configs) { +export async function build(args) { let input = args['--input'] let shouldWatch = args['--watch'] @@ -25,11 +26,7 @@ export async function build(args, configs) { } // TODO: Reference the @config path here if exists - let configPath = args['--config'] - ? args['--config'] - : ((defaultPath) => (fs.existsSync(defaultPath) ? defaultPath : null))( - path.resolve(`./${configs.tailwind}`) - ) + let configPath = args['--config'] ? args['--config'] : resolveDefaultConfigPath() let processor = await createProcessor(args, configPath) diff --git a/src/cli/build/plugin.js b/src/cli/build/plugin.js index 893a8c955c6f..5705326c988a 100644 --- a/src/cli/build/plugin.js +++ b/src/cli/build/plugin.js @@ -12,12 +12,13 @@ import { loadAutoprefixer, loadCssNano, loadPostcss, loadPostcssImport } from '. import { formatNodes, drainStdin, outputFile } from './utils' import { env } from '../../lib/sharedState' import resolveConfig from '../../../resolveConfig.js' -import getModuleDependencies from '../../lib/getModuleDependencies.js' import { parseCandidateFiles } from '../../lib/content.js' import { createWatcher } from './watching.js' import fastGlob from 'fast-glob' import { findAtConfigPath } from '../../lib/findAtConfigPath.js' import log from '../../util/log' +import { loadConfig } from '../../lib/load-config' +import getModuleDependencies from '../../lib/getModuleDependencies' /** * @@ -117,7 +118,9 @@ let state = { /** @type {{content: string, extension: string}[]} */ changedContent: [], - configDependencies: new Set(), + /** @type {ReturnType | null} */ + configBag: null, + contextDependencies: new Set(), /** @type {import('../../lib/content.js').ContentPath[]} */ @@ -142,37 +145,35 @@ let state = { loadConfig(configPath, content) { if (this.watcher && configPath) { - this.refreshConfigDependencies(configPath) + this.refreshConfigDependencies() } - let config = configPath ? require(configPath) : {} + let config = loadConfig(configPath) + let dependencies = getModuleDependencies(configPath) + this.configBag = { + config, + dependencies, + dispose() { + for (let file of dependencies) { + delete require.cache[require.resolve(file)] + } + }, + } // @ts-ignore - config = resolveConfig(config, { content: { files: [] } }) + this.configBag.config = resolveConfig(this.configBag.config, { content: { files: [] } }) // Override content files if `--content` has been passed explicitly if (content?.length > 0) { - config.content.files = content + this.configBag.config.content.files = content } - return config + return this.configBag.config }, - refreshConfigDependencies(configPath) { + refreshConfigDependencies() { env.DEBUG && console.time('Module dependencies') - - for (let file of this.configDependencies) { - delete require.cache[require.resolve(file)] - } - - if (configPath) { - let deps = getModuleDependencies(configPath).map(({ file }) => file) - - for (let dependency of deps) { - this.configDependencies.add(dependency) - } - } - + this.configBag?.dispose() env.DEBUG && console.timeEnd('Module dependencies') }, @@ -420,7 +421,7 @@ export async function createProcessor(args, cliConfigPath) { async rebuild(changes) { let needsNewContext = changes.some((change) => { return ( - state.configDependencies.has(change.file) || + state.configBag?.dependencies.has(change.file) || state.contextDependencies.has(change.file) ) }) diff --git a/src/cli/build/watching.js b/src/cli/build/watching.js index ffbfd1ac096a..7a3724348f50 100644 --- a/src/cli/build/watching.js +++ b/src/cli/build/watching.js @@ -220,7 +220,7 @@ export function createWatcher(args, { state, rebuild }) { refreshWatchedFiles() { watcher.add(Array.from(state.contextDependencies)) - watcher.add(Array.from(state.configDependencies)) + watcher.add(Array.from(state.configBag.dependencies)) watcher.add(state.contentPatterns.all) }, } diff --git a/src/cli/index.js b/src/cli/index.js index 14e387250a49..fc1497f6272e 100644 --- a/src/cli/index.js +++ b/src/cli/index.js @@ -8,29 +8,6 @@ import { build } from './build' import { help } from './help' import { init } from './init' -function isESM() { - const pkgPath = path.resolve('./package.json') - - try { - let pkg = JSON.parse(fs.readFileSync(pkgPath, 'utf8')) - return pkg.type && pkg.type === 'module' - } catch (err) { - return false - } -} - -let configs = isESM() - ? { - tailwind: 'tailwind.config.cjs', - postcss: 'postcss.config.cjs', - } - : { - tailwind: 'tailwind.config.js', - postcss: 'postcss.config.js', - } - -// --- - function oneOf(...options) { return Object.assign( (value = true) => { @@ -51,8 +28,13 @@ let commands = { init: { run: init, args: { - '--full': { type: Boolean, description: `Initialize a full \`${configs.tailwind}\` file` }, - '--postcss': { type: Boolean, description: `Initialize a \`${configs.postcss}\` file` }, + '--esm': { type: Boolean, description: `Initialize configuration file as ESM` }, + '--ts': { type: Boolean, description: `Initialize configuration file as TypeScript` }, + '--postcss': { type: Boolean, description: `Initialize a \`postcss.config.js\` file` }, + '--full': { + type: Boolean, + description: `Include the default values for all options in the generated configuration file`, + }, '-f': '--full', '-p': '--postcss', }, @@ -231,4 +213,4 @@ if (args['--help']) { process.exit(0) } -run(args, configs) +run(args) diff --git a/src/cli/init/index.js b/src/cli/init/index.js index 470680318fa6..6bd7e41e2ced 100644 --- a/src/cli/init/index.js +++ b/src/cli/init/index.js @@ -3,22 +3,49 @@ import fs from 'fs' import path from 'path' -export function init(args, configs) { +function isESM() { + const pkgPath = path.resolve('./package.json') + + try { + let pkg = JSON.parse(fs.readFileSync(pkgPath, 'utf8')) + return pkg.type && pkg.type === 'module' + } catch (err) { + return false + } +} + +export function init(args) { let messages = [] - let tailwindConfigLocation = path.resolve(args['_'][1] ?? `./${configs.tailwind}`) + let isProjectESM = args['--ts'] || args['--esm'] || isESM() + let syntax = args['--ts'] ? 'ts' : isProjectESM ? 'js' : 'cjs' + let extension = args['--ts'] ? 'ts' : 'js' + + let tailwindConfigLocation = path.resolve(args['_'][1] ?? `./tailwind.config.${extension}`) + if (fs.existsSync(tailwindConfigLocation)) { messages.push(`${path.basename(tailwindConfigLocation)} already exists.`) } else { - let stubFile = fs.readFileSync( + let stubContentsFile = fs.readFileSync( args['--full'] - ? path.resolve(__dirname, '../../../stubs/defaultConfig.stub.js') - : path.resolve(__dirname, '../../../stubs/simpleConfig.stub.js'), + ? path.resolve(__dirname, '../../../stubs/config.full.js') + : path.resolve(__dirname, '../../../stubs/config.simple.js'), + 'utf8' + ) + + let stubFile = fs.readFileSync( + path.resolve(__dirname, `../../../stubs/tailwind.config.${syntax}`), 'utf8' ) // Change colors import - stubFile = stubFile.replace('../colors', 'tailwindcss/colors') + stubContentsFile = stubContentsFile.replace('../colors', 'tailwindcss/colors') + + // Replace contents of {ts,js,cjs} file with the stub {simple,full}. + stubFile = + stubFile + .replace('__CONFIG__', stubContentsFile.replace('module.exports =', '').trim()) + .trim() + '\n\n' fs.writeFileSync(tailwindConfigLocation, stubFile, 'utf8') @@ -26,12 +53,14 @@ export function init(args, configs) { } if (args['--postcss']) { - let postcssConfigLocation = path.resolve(`./${configs.postcss}`) + let postcssConfigLocation = path.resolve('./postcss.config.js') if (fs.existsSync(postcssConfigLocation)) { messages.push(`${path.basename(postcssConfigLocation)} already exists.`) } else { let stubFile = fs.readFileSync( - path.resolve(__dirname, '../../../stubs/defaultPostCssConfig.stub.js'), + isProjectESM + ? path.resolve(__dirname, '../../../stubs/postcss.config.js') + : path.resolve(__dirname, '../../../stubs/postcss.config.cjs'), 'utf8' ) diff --git a/src/constants.js b/src/constants.js deleted file mode 100644 index 4d6e08c07616..000000000000 --- a/src/constants.js +++ /dev/null @@ -1,17 +0,0 @@ -import path from 'path' - -export const cli = 'tailwind' -export const defaultConfigFile = './tailwind.config.js' -export const defaultPostCssConfigFile = './postcss.config.js' -export const cjsConfigFile = './tailwind.config.cjs' -export const cjsPostCssConfigFile = './postcss.config.cjs' - -export const supportedConfigFiles = [cjsConfigFile, defaultConfigFile] -export const supportedPostCssConfigFile = [cjsPostCssConfigFile, defaultPostCssConfigFile] - -export const defaultConfigStubFile = path.resolve(__dirname, '../stubs/defaultConfig.stub.js') -export const simpleConfigStubFile = path.resolve(__dirname, '../stubs/simpleConfig.stub.js') -export const defaultPostCssConfigStubFile = path.resolve( - __dirname, - '../stubs/defaultPostCssConfig.stub.js' -) diff --git a/src/lib/getModuleDependencies.js b/src/lib/getModuleDependencies.js index 92ba78f1e626..c8192bc69adc 100644 --- a/src/lib/getModuleDependencies.js +++ b/src/lib/getModuleDependencies.js @@ -1,39 +1,40 @@ import fs from 'fs' import path from 'path' import resolve from 'resolve' -import detective from 'detective' +import detective from 'detective-typescript' function createModule(file) { - const source = fs.readFileSync(file, 'utf-8') - const requires = detective(source) - - return { file, requires } + let source = fs.readFileSync(file, 'utf-8') + return { file, requires: detective(source, { mixedImports: true }) } } -export default function getModuleDependencies(entryFile) { - const rootModule = createModule(entryFile) - const modules = [rootModule] +function* _getModuleDependencies(entryFile) { + yield entryFile + + let mod = createModule(entryFile) + + let ext = path.extname(entryFile) + let isTypeScript = ext === '.ts' || ext === '.cts' || ext === '.mts' + let extensions = [...(isTypeScript ? ['.ts', '.cts', '.mts'] : []), '.js', '.cjs', '.mjs'] // Iterate over the modules, even when new // ones are being added - for (const mdl of modules) { - mdl.requires - .filter((dep) => { - // Only track local modules, not node_modules - return dep.startsWith('./') || dep.startsWith('../') - }) - .forEach((dep) => { - try { - const basedir = path.dirname(mdl.file) - const depPath = resolve.sync(dep, { basedir }) - const depModule = createModule(depPath) + for (let dep of mod.requires) { + // Only track local modules, not node_modules + if (!dep.startsWith('./') && !dep.startsWith('../')) { + continue + } - modules.push(depModule) - } catch (_err) { - // eslint-disable-next-line no-empty - } - }) + try { + let basedir = path.dirname(mod.file) + let depPath = resolve.sync(dep, { basedir, extensions }) + yield* _getModuleDependencies(depPath) + } catch (_err) { + // eslint-disable-next-line no-empty + } } +} - return modules +export default function getModuleDependencies(entryFile) { + return new Set(_getModuleDependencies(entryFile)) } diff --git a/src/lib/load-config.ts b/src/lib/load-config.ts new file mode 100644 index 000000000000..89ce3a368d0b --- /dev/null +++ b/src/lib/load-config.ts @@ -0,0 +1,27 @@ +import jitiFactory from 'jiti' +import { transform } from 'sucrase' + +import { Config } from '../../types/config' + +let jiti: ReturnType | null = null +function lazyJiti() { + return ( + jiti ?? + (jiti = jitiFactory(__filename, { + interopDefault: true, + transform: (opts) => { + return transform(opts.source, { + transforms: ['typescript', 'imports'], + }) + }, + })) + ) +} + +export function loadConfig(path: string): Config { + try { + return path ? require(path) : {} + } catch { + return lazyJiti()(path) + } +} diff --git a/src/lib/setupTrackingContext.js b/src/lib/setupTrackingContext.js index a6a7659bbd13..5abf05170298 100644 --- a/src/lib/setupTrackingContext.js +++ b/src/lib/setupTrackingContext.js @@ -4,13 +4,14 @@ import fs from 'fs' import LRU from 'quick-lru' import hash from '../util/hashConfig' -import getModuleDependencies from '../lib/getModuleDependencies' import resolveConfig from '../public/resolve-config' import resolveConfigPath from '../util/resolveConfigPath' import { getContext, getFileModifiedMap } from './setupContextUtils' import parseDependency from '../util/parseDependency' import { validateConfig } from '../util/validateConfig.js' import { parseCandidateFiles, resolvedChangedContent } from './content.js' +import { loadConfig } from '../lib/load-config' +import getModuleDependencies from './getModuleDependencies' let configPathCache = new LRU({ maxSize: 100 }) @@ -34,7 +35,7 @@ function getTailwindConfig(configOrPath) { let [prevConfig, prevConfigHash, prevDeps, prevModified] = configPathCache.get(userConfigPath) || [] - let newDeps = getModuleDependencies(userConfigPath).map((dep) => dep.file) + let newDeps = getModuleDependencies(userConfigPath) let modified = false let newModified = new Map() @@ -55,8 +56,7 @@ function getTailwindConfig(configOrPath) { for (let file of newDeps) { delete require.cache[file] } - let newConfig = resolveConfig(require(userConfigPath)) - newConfig = validateConfig(newConfig) + let newConfig = validateConfig(resolveConfig(loadConfig(userConfigPath))) let newHash = hash(newConfig) configPathCache.set(userConfigPath, [newConfig, newHash, newDeps, newModified]) return [newConfig, userConfigPath, newHash, newDeps] diff --git a/src/oxide/cli/build/index.ts b/src/oxide/cli/build/index.ts index b7fb2d93294b..ba7c87459603 100644 --- a/src/oxide/cli/build/index.ts +++ b/src/oxide/cli/build/index.ts @@ -1,8 +1,9 @@ import fs from 'fs' import path from 'path' +import { resolveDefaultConfigPath } from '../../../util/resolveConfigPath' import { createProcessor } from './plugin' -export async function build(args, configs) { +export async function build(args) { let input = args['--input'] let shouldWatch = args['--watch'] @@ -23,11 +24,7 @@ export async function build(args, configs) { } // TODO: Reference the @config path here if exists - let configPath = args['--config'] - ? args['--config'] - : ((defaultPath) => (fs.existsSync(defaultPath) ? defaultPath : null))( - path.resolve(`./${configs.tailwind}`) - ) + let configPath = args['--config'] ? args['--config'] : resolveDefaultConfigPath() let processor = await createProcessor(args, configPath) diff --git a/src/oxide/cli/build/plugin.ts b/src/oxide/cli/build/plugin.ts index bea85a09c838..078820c85c9a 100644 --- a/src/oxide/cli/build/plugin.ts +++ b/src/oxide/cli/build/plugin.ts @@ -10,12 +10,14 @@ import { loadPostcss, loadPostcssImport, lightningcss } from './deps' import { formatNodes, drainStdin, outputFile } from './utils' import { env } from '../../../lib/sharedState' import resolveConfig from '../../../../resolveConfig' -import getModuleDependencies from '../../../lib/getModuleDependencies' import { parseCandidateFiles } from '../../../lib/content' import { createWatcher } from './watching' import fastGlob from 'fast-glob' import { findAtConfigPath } from '../../../lib/findAtConfigPath' import log from '../../../util/log' +import { loadConfig } from '../../../lib/load-config' +import getModuleDependencies from '../../../lib/getModuleDependencies' +import type { Config } from '../../../../types' /** * @@ -115,7 +117,9 @@ let state = { /** @type {{content: string, extension: string}[]} */ changedContent: [], - configDependencies: new Set(), + /** @type {{config: Config, dependencies: Set, dispose: Function } | null} */ + configBag: null, + contextDependencies: new Set(), /** @type {import('../../lib/content.js').ContentPath[]} */ @@ -140,37 +144,35 @@ let state = { loadConfig(configPath, content) { if (this.watcher && configPath) { - this.refreshConfigDependencies(configPath) + this.refreshConfigDependencies() } - let config = configPath ? require(configPath) : {} + let config = loadConfig(configPath) + let dependencies = getModuleDependencies(configPath) + this.configBag = { + config, + dependencies, + dispose() { + for (let file of dependencies) { + delete require.cache[require.resolve(file)] + } + }, + } // @ts-ignore - config = resolveConfig(config, { content: { files: [] } }) + this.configBag.config = resolveConfig(this.configBag.config, { content: { files: [] } }) // Override content files if `--content` has been passed explicitly if (content?.length > 0) { - config.content.files = content + this.configBag.config.content.files = content } - return config + return this.configBag.config }, refreshConfigDependencies(configPath) { env.DEBUG && console.time('Module dependencies') - - for (let file of this.configDependencies) { - delete require.cache[require.resolve(file)] - } - - if (configPath) { - let deps = getModuleDependencies(configPath).map(({ file }) => file) - - for (let dependency of deps) { - this.configDependencies.add(dependency) - } - } - + this.configBag?.dispose() env.DEBUG && console.timeEnd('Module dependencies') }, @@ -417,7 +419,7 @@ export async function createProcessor(args, cliConfigPath) { async rebuild(changes) { let needsNewContext = changes.some((change) => { return ( - state.configDependencies.has(change.file) || + state.configBag?.dependencies.has(change.file) || state.contextDependencies.has(change.file) ) }) diff --git a/src/oxide/cli/build/watching.ts b/src/oxide/cli/build/watching.ts index 2d7b12a08c9b..9d5680a16300 100644 --- a/src/oxide/cli/build/watching.ts +++ b/src/oxide/cli/build/watching.ts @@ -218,7 +218,7 @@ export function createWatcher(args, { state, rebuild }) { refreshWatchedFiles() { watcher.add(Array.from(state.contextDependencies)) - watcher.add(Array.from(state.configDependencies)) + watcher.add(Array.from(state.configBag.dependencies)) watcher.add(state.contentPatterns.all) }, } diff --git a/src/oxide/cli/index.ts b/src/oxide/cli/index.ts index ca6b9263ca4f..96b284db9393 100644 --- a/src/oxide/cli/index.ts +++ b/src/oxide/cli/index.ts @@ -8,19 +8,6 @@ import { build } from './build' import { help } from './help' import { init } from './init' -function isESM() { - const pkgPath = path.resolve('./package.json') - - try { - let pkg = JSON.parse(fs.readFileSync(pkgPath, 'utf8')) - return pkg.type && pkg.type === 'module' - } catch (err) { - return false - } -} - -let configs = isESM() ? { tailwind: 'tailwind.config.cjs' } : { tailwind: 'tailwind.config.js' } - // --- function oneOf(...options) { @@ -43,7 +30,12 @@ let commands = { init: { run: init, args: { - '--full': { type: Boolean, description: `Initialize a full \`${configs.tailwind}\` file` }, + '--esm': { type: Boolean, description: `Initialize configuration file as ESM` }, + '--ts': { type: Boolean, description: `Initialize configuration file as TypeScript` }, + '--full': { + type: Boolean, + description: `Include the default values for all options in the generated configuration file`, + }, '-f': '--full', }, }, @@ -209,4 +201,4 @@ if (args['--help']) { process.exit(0) } -run(args, configs) +run(args) diff --git a/src/oxide/cli/init/index.ts b/src/oxide/cli/init/index.ts index 5bf8af2709fc..abc93cdc1351 100644 --- a/src/oxide/cli/init/index.ts +++ b/src/oxide/cli/init/index.ts @@ -1,22 +1,49 @@ import fs from 'fs' import path from 'path' -export function init(args, configs) { - let messages = [] +function isESM() { + const pkgPath = path.resolve('./package.json') + + try { + let pkg = JSON.parse(fs.readFileSync(pkgPath, 'utf8')) + return pkg.type && pkg.type === 'module' + } catch (err) { + return false + } +} + +export function init(args) { + let messages: string[] = [] + + let isProjectESM = args['--ts'] || args['--esm'] || isESM() + let syntax = args['--ts'] ? 'ts' : isProjectESM ? 'js' : 'cjs' + let extension = args['--ts'] ? 'ts' : 'js' + + let tailwindConfigLocation = path.resolve(args['_'][1] ?? `./tailwind.config.${extension}`) - let tailwindConfigLocation = path.resolve(args['_'][1] ?? `./${configs.tailwind}`) if (fs.existsSync(tailwindConfigLocation)) { messages.push(`${path.basename(tailwindConfigLocation)} already exists.`) } else { - let stubFile = fs.readFileSync( + let stubContentsFile = fs.readFileSync( args['--full'] - ? path.resolve(__dirname, '../../../../stubs/defaultConfig.stub.js') - : path.resolve(__dirname, '../../../../stubs/simpleConfig.stub.js'), + ? path.resolve(__dirname, '../../../../stubs/config.full.js') + : path.resolve(__dirname, '../../../../stubs/config.simple.js'), + 'utf8' + ) + + let stubFile = fs.readFileSync( + path.resolve(__dirname, `../../../../stubs/tailwind.config.${syntax}`), 'utf8' ) // Change colors import - stubFile = stubFile.replace('../colors', 'tailwindcss/colors') + stubContentsFile = stubContentsFile.replace('../colors', 'tailwindcss/colors') + + // Replace contents of {ts,js,cjs} file with the stub {simple,full}. + stubFile = + stubFile + .replace('__CONFIG__', stubContentsFile.replace('module.exports =', '').trim()) + .trim() + '\n\n' fs.writeFileSync(tailwindConfigLocation, stubFile, 'utf8') diff --git a/src/public/default-config.js b/src/public/default-config.js index 78dc69c14780..4c7e90712959 100644 --- a/src/public/default-config.js +++ b/src/public/default-config.js @@ -1,4 +1,4 @@ import { cloneDeep } from '../util/cloneDeep' -import defaultConfig from '../../stubs/defaultConfig.stub' +import defaultConfig from '../../stubs/config.full' export default cloneDeep(defaultConfig) diff --git a/src/public/default-theme.js b/src/public/default-theme.js index dc2400c31288..582edc303e5e 100644 --- a/src/public/default-theme.js +++ b/src/public/default-theme.js @@ -1,4 +1,4 @@ import { cloneDeep } from '../util/cloneDeep' -import defaultConfig from '../../stubs/defaultConfig.stub' +import defaultFullConfig from '../../stubs/config.full' -export default cloneDeep(defaultConfig.theme) +export default cloneDeep(defaultFullConfig.theme) diff --git a/src/public/load-config.js b/src/public/load-config.js new file mode 100644 index 000000000000..d5d371271324 --- /dev/null +++ b/src/public/load-config.js @@ -0,0 +1,2 @@ +import { loadConfig } from '../lib/load-config' +export default loadConfig diff --git a/src/util/getAllConfigs.js b/src/util/getAllConfigs.js index ebf28e172e3a..ce3665b977d0 100644 --- a/src/util/getAllConfigs.js +++ b/src/util/getAllConfigs.js @@ -1,8 +1,8 @@ -import defaultConfig from '../../stubs/defaultConfig.stub.js' +import defaultFullConfig from '../../stubs/config.full.js' import { flagEnabled } from '../featureFlags' export default function getAllConfigs(config) { - const configs = (config?.presets ?? [defaultConfig]) + const configs = (config?.presets ?? [defaultFullConfig]) .slice() .reverse() .flatMap((preset) => getAllConfigs(preset instanceof Function ? preset() : preset)) diff --git a/src/util/resolveConfigPath.js b/src/util/resolveConfigPath.js index 646a46fd4255..2b5078949761 100644 --- a/src/util/resolveConfigPath.js +++ b/src/util/resolveConfigPath.js @@ -1,6 +1,13 @@ import fs from 'fs' import path from 'path' +const defaultConfigFiles = [ + './tailwind.config.js', + './tailwind.config.cjs', + './tailwind.config.mjs', + './tailwind.config.ts', +] + function isObject(value) { return typeof value === 'object' && value !== null } @@ -43,7 +50,11 @@ export default function resolveConfigPath(pathOrConfig) { } // require('tailwindcss') - for (const configFile of ['./tailwind.config.js', './tailwind.config.cjs']) { + return resolveDefaultConfigPath() +} + +export function resolveDefaultConfigPath() { + for (const configFile of defaultConfigFiles) { try { const configPath = path.resolve(configFile) fs.accessSync(configPath) diff --git a/stubs/.gitignore b/stubs/.gitignore new file mode 100644 index 000000000000..f9be8dfe0908 --- /dev/null +++ b/stubs/.gitignore @@ -0,0 +1 @@ +!* diff --git a/stubs/defaultConfig.stub.js b/stubs/config.full.js similarity index 99% rename from stubs/defaultConfig.stub.js rename to stubs/config.full.js index b29eb4cf479d..d2c9526390fe 100644 --- a/stubs/defaultConfig.stub.js +++ b/stubs/config.full.js @@ -1,4 +1,3 @@ -/** @type {import('tailwindcss').Config} */ module.exports = { content: [], presets: [], diff --git a/stubs/config.simple.js b/stubs/config.simple.js new file mode 100644 index 000000000000..9843c05570a6 --- /dev/null +++ b/stubs/config.simple.js @@ -0,0 +1,7 @@ +module.exports = { + content: [], + theme: { + extend: {}, + }, + plugins: [], +} diff --git a/stubs/defaultPostCssConfig.stub.js b/stubs/postcss.config.cjs similarity index 100% rename from stubs/defaultPostCssConfig.stub.js rename to stubs/postcss.config.cjs diff --git a/stubs/postcss.config.js b/stubs/postcss.config.js new file mode 100644 index 000000000000..2e7af2b7f1a6 --- /dev/null +++ b/stubs/postcss.config.js @@ -0,0 +1,6 @@ +export default { + plugins: { + tailwindcss: {}, + autoprefixer: {}, + }, +} diff --git a/stubs/tailwind.config.cjs b/stubs/tailwind.config.cjs new file mode 100644 index 000000000000..48b702b09916 --- /dev/null +++ b/stubs/tailwind.config.cjs @@ -0,0 +1,2 @@ +/** @type {import('tailwindcss').Config} */ +module.exports = __CONFIG__ diff --git a/stubs/tailwind.config.js b/stubs/tailwind.config.js new file mode 100644 index 000000000000..c5f54b450048 --- /dev/null +++ b/stubs/tailwind.config.js @@ -0,0 +1,2 @@ +/** @type {import('tailwindcss').Config} */ +export default __CONFIG__ diff --git a/stubs/tailwind.config.ts b/stubs/tailwind.config.ts new file mode 100644 index 000000000000..d9ea7111ea76 --- /dev/null +++ b/stubs/tailwind.config.ts @@ -0,0 +1,3 @@ +import type { Config } from 'tailwindcss' + +export default __CONFIG__ satisfies Config diff --git a/tests/customConfig.test.js b/tests/customConfig.test.js index 7c5a9ead28d7..5b83f9f2e81f 100644 --- a/tests/customConfig.test.js +++ b/tests/customConfig.test.js @@ -1,10 +1,12 @@ import fs from 'fs' import path from 'path' -import { cjsConfigFile, defaultConfigFile } from '../src/constants' import inTempDirectory from '../jest/runInTempDirectory' import { crosscheck, run, html, css, javascript } from './util/run' +const defaultConfigFile = 'tailwind.config.js' +const cjsConfigFile = 'tailwind.config.cjs' + crosscheck(() => { test('it uses the values from the custom config file', () => { let config = require(path.resolve(`${__dirname}/fixtures/custom-config.js`)) diff --git a/tests/defaultConfig.test.js b/tests/defaultConfig.test.js index b98251d8513d..4e7ca558b14f 100644 --- a/tests/defaultConfig.test.js +++ b/tests/defaultConfig.test.js @@ -1,5 +1,5 @@ import config from '../src/public/default-config' -import configStub from '../stubs/defaultConfig.stub.js' +import configStub from '../stubs/config.full' test.todo('remove mutation from these tests so we can run against both engines') diff --git a/tests/defaultTheme.test.js b/tests/defaultTheme.test.js index d618bcfafde1..c6356b89acdd 100644 --- a/tests/defaultTheme.test.js +++ b/tests/defaultTheme.test.js @@ -1,5 +1,5 @@ import theme from '../src/public/default-theme' -import configStub from '../stubs/defaultConfig.stub.js' +import configStub from '../stubs/config.full.js' test.todo('remove mutation from these tests so we can run against both engines') diff --git a/tests/screenAtRule.test.js b/tests/screenAtRule.test.js index 42ed22e0bed4..6352fcde09bd 100644 --- a/tests/screenAtRule.test.js +++ b/tests/screenAtRule.test.js @@ -1,6 +1,6 @@ import postcss from 'postcss' import plugin from '../src/lib/substituteScreenAtRules' -import config from '../stubs/defaultConfig.stub.js' +import config from '../stubs/config.full.js' import { crosscheck, css } from './util/run' function run(input, opts = config) {