pax_global_header00006660000000000000000000000064146424021500014510gustar00rootroot0000000000000052 comment=6b06ef8595560b8567ab2401f7a36a72296d22d4 isaacs-tshy-bded619/000077500000000000000000000000001464240215000144405ustar00rootroot00000000000000isaacs-tshy-bded619/.github/000077500000000000000000000000001464240215000160005ustar00rootroot00000000000000isaacs-tshy-bded619/.github/workflows/000077500000000000000000000000001464240215000200355ustar00rootroot00000000000000isaacs-tshy-bded619/.github/workflows/ci.yml000066400000000000000000000013401464240215000211510ustar00rootroot00000000000000name: CI on: [push, pull_request] jobs: build: strategy: matrix: node-version: [18.x, 20.x] platform: - os: ubuntu-latest shell: bash - os: macos-latest shell: bash fail-fast: false runs-on: ${{ matrix.platform.os }} defaults: run: shell: ${{ matrix.platform.shell }} steps: - name: Checkout Repository uses: actions/checkout@v4 - name: Use Nodejs ${{ matrix.node-version }} uses: actions/setup-node@v3 with: node-version: ${{ matrix.node-version }} cache: npm - name: Install dependencies run: npm install - name: Run Tests run: npm test -- -c -t0 isaacs-tshy-bded619/.github/workflows/typedoc.yml000066400000000000000000000024141464240215000222300ustar00rootroot00000000000000# Simple workflow for deploying static content to GitHub Pages name: Deploy static content to Pages on: # Runs on pushes targeting the default branch push: branches: ["main"] # Allows you to run this workflow manually from the Actions tab workflow_dispatch: # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages permissions: contents: read pages: write id-token: write # Allow one concurrent deployment concurrency: group: "pages" cancel-in-progress: true jobs: # Single deploy job since we're just deploying deploy: environment: name: github-pages url: ${{ steps.deployment.outputs.page_url }} runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v3 - name: Use Nodejs ${{ matrix.node-version }} uses: actions/setup-node@v3 with: node-version: 18.x - name: Install dependencies run: npm install - name: Generate typedocs run: npm run typedoc - name: Setup Pages uses: actions/configure-pages@v3 - name: Upload artifact uses: actions/upload-pages-artifact@v1 with: path: './docs' - name: Deploy to GitHub Pages id: deployment uses: actions/deploy-pages@v1 isaacs-tshy-bded619/.gitignore000066400000000000000000000000551464240215000164300ustar00rootroot00000000000000/.tshy-build /node_modules /dist /docs /.tap isaacs-tshy-bded619/.prettierignore000066400000000000000000000002441464240215000175030ustar00rootroot00000000000000/.* /package*.json /node_modules /example /.github /.tshy /.tsh-build /dist /tap-snapshots /.nyc_output /coverage /benchmark /.tap /docs /LICENSE.md /test/fixtures isaacs-tshy-bded619/.tshy/000077500000000000000000000000001464240215000155055ustar00rootroot00000000000000isaacs-tshy-bded619/.tshy/build.json000066400000000000000000000002261464240215000174770ustar00rootroot00000000000000{ "extends": "../tsconfig.json", "compilerOptions": { "rootDir": "../src", "module": "nodenext", "moduleResolution": "nodenext" } } isaacs-tshy-bded619/.tshy/esm.json000066400000000000000000000003741464240215000171700ustar00rootroot00000000000000{ "extends": "./build.json", "include": [ "../src/**/*.ts", "../src/**/*.mts", "../src/**/*.tsx", "../src/**/*.json" ], "exclude": [ "../src/package.json" ], "compilerOptions": { "outDir": "../.tshy-build/esm" } } isaacs-tshy-bded619/CHANGELOG.md000066400000000000000000000037001464240215000162510ustar00rootroot00000000000000# 1.18 - Add `sourceDialects` # 1.17 - Add `module` field if a top-level `esm` export exists for subpath `"."`, and `tshy.module` is not set to false. # 1.16 - Upgrade to TypeScript 5.5 # 1.15 - Add `liveDev` option - Add `"source"` export condition # 1.14 - Do not fail if sourcemaps are not generated - Support glob patterns in `tshy.exports` - Add support for TypeScript 5.4 # 1.13 - Take `target` from `tsconfig.json` if present, rather than hard-coding in the `build.json` config. - Find `tsc` where pnpm hides it. # 1.12 - Respect `package.json` type field if set to `"commonjs"` - Ignore `package.json` changes in `tshy --watch` if the data itself did not change. # 1.11 - Add support for TypeScript 5.3 - Preserve indentation/newlines in `package.json` files # 1.10 - Exclude sources from all builds via the `exclude` config setting. # 1.9 - Set a custom tsconfig file via the `project` config setting. # 1.8 - Support `"incremental": true` tsconfig option, making the build directory persistent if there are `*.tsbuildinfo` files present. - Rename build directory from '.tshy-build-tmp' to '.tshy-build', since it's not temporary if incremental builds are used. - Make the `selfLink` best-effort if not explicitly true or false. # 1.7 - Prevent `verbatimModuleSyntax` ts config if building for both ESM and CommonJS, as it's fundamentally incompatible - Add `--watch` option - Add `--help` option # 1.6 - put all imports in top-level imports field (2023-10-19) # 1.5 - Add `tshy.imports` config # 1.4 - Add `tshy.esmDialects` and `tshy.commonjsDialects` configs - Use more complete package/import/export types defined by the `resolve-import` package # 1.3 - Default `tshy.main = true` if a `'.'` CommonJS export is present # 1.2 - Initial experimental support for `tshy.main` - Add `tshy.selfLink` config to suppress the internal symlink # 1.1 - Add support for local package imports/exports # 1.0 - Initial version isaacs-tshy-bded619/LICENSE.md000066400000000000000000000033441464240215000160500ustar00rootroot00000000000000All packages under `src/` are licensed according to the terms in their respective `LICENSE` or `LICENSE.md` files. The remainder of this project is licensed under the Blue Oak Model License, as follows: ----- # Blue Oak Model License Version 1.0.0 ## Purpose This license gives everyone as much permission to work with this software as possible, while protecting contributors from liability. ## Acceptance In order to receive this license, you must agree to its rules. The rules of this license are both obligations under that agreement and conditions to your license. You must not do anything with this software that triggers a rule that you cannot or will not follow. ## Copyright Each contributor licenses you to do everything with this software that would otherwise infringe that contributor's copyright in it. ## Notices You must ensure that everyone who gets a copy of any part of this software from you, with or without changes, also gets the text of this license or a link to . ## Excuse If anyone notifies you in writing that you have not complied with [Notices](#notices), you can keep your license by taking all practical steps to comply within 30 days after the notice. If you do not do so, your license ends immediately. ## Patent Each contributor licenses you to do everything with this software that would otherwise infringe any patent claims they can license or become able to license. ## Reliability No contributor can revoke this license. ## No Liability ***As far as the law allows, this software comes as is, without any warranty or condition, and no contributor will be liable to anyone for any damages related to this software or this license, under any kind of legal claim.*** isaacs-tshy-bded619/README.md000066400000000000000000000731121464240215000157230ustar00rootroot00000000000000# tshy - TypeScript HYbridizer Hybrid (CommonJS/ESM) TypeScript node package builder. Write modules that Just Work in ESM and CommonJS, in easy mode. This tool manages the `exports` in your package.json file, and builds your TypeScript program using `tsc` 5.2+, emitting both ESM and CommonJS variants, [providing the full strength of TypeScript’s checking for both output formats](https://twitter.com/atcb/status/1702069237710479608). ## USAGE Install tshy: ``` npm i -D tshy ``` Put this in your package.json to use it with the default configs: ```json { "files": ["dist"], "scripts": { "prepare": "tshy" } } ``` Put your source code in `./src`. The built files will end up in `./dist/esm` (ESM) and `./dist/commonjs` (CommonJS). Your `exports` will be edited to reflect the correct module entry points. ## Dual Package Hazards If you are exporting both CommonJS and ESM forms of a package, then it is possible for both versions to be loaded at run-time. However, the CommonJS build is a different module from the ESM build, and thus a _different thing_ from the point of view of the JavaScript interpreter in Node.js. Consider this contrived example: ```js // import the class from ESM import { SomeClass } from 'module-built-by-tshy' import { createRequire } from 'node:module' const require = createRequire(import.meta.url) // create an object using the commonjs version function getObject() { const { SomeClass } = require('module-built-by-tshy') return new SomeClass() } const obj = getObject() console.log(obj instanceof SomeClass) // false!! ``` In a real program, this might happen because one part of the code loads the package using `require()` and another loads it using `import`. The Node.js documentation [recommends](https://nodejs.org/api/packages.html#dual-package-hazard) exporting an ESM wrapper that re-exports the CommonJS code, or isolating state into a single module used by both CommonJS and ESM. While these strategies do work, they are not what tshy does. ### What Does tshy Do Instead? It builds your program twice, into two separate folders, and sets up exports. By default, the ESM and CommonJS forms live in separate universes, unaware of one another, and treats the "Dual Module Hazard" as a simple fact of life. Which it is. ### "Dual Module Hazard" is a fact of life anyway Since the advent of npm, circa 2010, module in node have been potentially duplicated in the dependency graph. Node's nested `node_modules` resolution algorithm, added in Node 0.4, made this even easier to leverage, and more likely to occur. So: **as a package author, you cannot safely rely on there being exactly one copy of your library loaded at run-time.** This doesn't mean you shouldn't care about it. It means that you _should_ take it into consideration always, whether you are using a hybrid build or not. If you need to ensure that exactly one copy of something exists at run-time, whether using a hybrid build or not, you need to guard this with a check that is not dependent on the dependency graph, such as a global variable. ```js const ThereCanBeOnlyOne = Symbol.for('there can be only one') const g = globalThis as typeof globalThis & { [ThereCanBeOnlyOne]?: Thing } import { Thing } from './thing.js' g[ThereCanBeOnlyOne] ??= new Thing export const thing = g[ThereCanBeOnlyOne] ``` If you find yourself doing this, it's a good idea to pause and consider if you would be better off with a type check function or something other than relying on `instanceof`. There are certainly cases where it's unavoidable, but it can be tricky to work with. ### Module Local State There are some cases where you need something to be the _same value_ whether loaded with CommonJS or ESM, but not necessarily unique to the entire program. For example, say that there is some package-local set of data, and it needs to be updated and accessible whether the user is accessing your package via `import` or `require`. In this case, we can use a dialect polyfill that pulls in the state module from a single dialect. In Node, it's easy for ESM to load CommonJS, but since ESM cannot be loaded synchronously by CommonJS, I recommend putting the state in the polyfill, and having the "normal" module access it from that location. For example: ```js // src/index.ts import { state } from './state.js' export const setValue = (key: string, value: any) => { state[key] = value } export const getValue = (key: string) => state[key] ``` ```js // src/state-cjs.cts // this is the actual "thing" export const state: Record = {} ``` ```js // src/state.ts // this is what will end up in the esm build // need a ts-ignore because this is a hack. //@ts-ignore import cjsState from '../commonjs/state.js' export const { state } = cjsState as { state: Record } ``` If you need a provide an ESM dialect that _doesn't_ support CommonJS (eg, deno, browser, etc), then you can do this: ```js // src/state-deno.mts // can't load the CJS version, so no dual package hazard export const state: Record = {} ``` See below for more on using dialect specific polyfills. ## Handling Default Exports `export default` is the bane of hybrid TypeScript modules. When compiled as CommonJS, this results in creating an export named `default`, which is not the same as setting `module.exports`. ```js // esm, beautiful and clean import foo from 'foo' // commonjs, unnecessarily ugly and confusing // even if you like it for some reason, it's not "the same" const { default: foo } = require('foo') ``` You can tell TypeScript to do a true default export for CommonJS by using `export = `. However: - This is not compatible with an ESM build. - You cannot export types along with it. In general, when publishing TypeScript packages as both CommonJS and ESM, it is a good idea to avoid default exports for any public interfaces. - No need to polyfill anything. - Can export types alongside the values. However, if you are publishing something that _does_ need to provide a default export (for example, porting a project to hybrid and/or TypeScript, and want to keep the interface consistent), you can do it with a CommonJS polyfill. ```ts // index.ts // the thing that gets exported for ESM import { thing } from './main.ts' import type { SomeType } from './main.ts' export default thing export type { SomeType } ``` ```ts // index-cjs.cts // the polyfill for CommonJS import * as items from './main.ts' declare global { namespace mything { export type SomeType = items.SomeType } } export = items.thing ``` Then, CommonJS users will get the appropriate thing when they `import 'mything'`, and can access the type via the global namespace like `mything.SomeType`. But in almost all cases, it's much simpler to just use named exports exclusively. ## Configuration Mostly, this just uses opinionated convention, and so there is very little to configure. Source must be in `./src`. Builds are in `./dist/commonjs` for CommonJS and `./dist/esm` for ESM. There is very little configuration for this, but a lot of things _can_ be configured. ### `exports` By default, if there is a `src/index.ts` file, then that will be set as the `"."` export, and the `package.json` file will be exported as `"./package.json"`, because that's just convenient to expose. You can set other entry points by putting something like this in your `package.json` file: ```json { "tshy": { "exports": { "./foo": "./src/foo.ts", "./bar": "./src/bar.ts", ".": "./src/something-other-than-index.ts", "./package.json": "./package.json" } } } ``` Any exports pointing to files in `./src` will be updated to their appropriate build target locations, like: ```json { "exports": { "./foo": { "import": { "source": "./src/foo.ts", "types": "./dist/esm/foo.d.ts", "default": "./dist/esm/foo.js" }, "require": { "source": "./src/foo.ts", "types": "./dist/commonjs/foo.d.ts", "default": "./dist/commonjs/foo.js" } } } } ``` Any exports that are not within `./src` will not be built, and can be anything supported by package.json `exports`, as they will just be passed through as-is. ```json { "tshy": { "exports": { ".": "./src/my-built-module.ts", "./package.json": "./package.json" "./thing": { "import": "./lib/thing.mjs", "require": "./lib/thing.cjs", "types": "./lib/thing.d.ts" }, "./arraystyle": [ { "import": "./no-op.js" }, { "browser": "./browser-thing.js" }, { "require": [{ "types": "./using-require.d.ts" }, "./using-require.js"]}, { "types": "./blah.d.ts" }, "./etc.js" ] } } } ``` ### Glob Exports You can also specify one or more [glob](http://npm.im/glob) patterns to define your exported modules. This is handy if you want to export several things as subpath exports to avoid "bucket modules". Anything named `src/index.*` that is matched in this way will be used as the main `"."` export. Anything else will have the `./src` stripped from the front, and the file extension removed from the end. `./package.json` will always be exported, and any pattern matches outside of the `./src` folder will be ignored. ```json { "tshy": { "exports": "./src/**" } } ``` If you use this config, and you have files at `./src/index.ts` and `./src/component/foo.tsx`, then the resulting exports will be: ```json { "exports": { ".": { "require": { "source": "./src/index.ts", "types": "./dist/commonjs/index.d.ts", "default": "./dist/commonjs/index.js" }, "import": { "source": "./src/index.ts", "types": "./dist/esm/index.d.ts", "default": "./dist/esm/index.js" } }, "./component/foo": { "require": { "source": "./src/component/foo.ts", "types": "./dist/commonjs/component/foo.d.ts", "default": "./dist/commonjs/component/foo.js" }, "import": { "source": "./src/component/foo.ts", "types": "./dist/esm/component/foo.d.ts", "default": "./dist/esm/component/foo.js" } }, "./package.json": "./package.json" } } ``` You may also specify an array of glob exports, like so: ```json { "tshy": { "exports": ["./src/*.ts", "./src/utils/*.ts"] } } ``` This would export a file at `./src/foo.ts` as `./foo`, and a file at `./src/utils/bar.ts` as `./utils/bar`, but would ignore a file at `./internal/private.ts`. ### Live Dev Set `"liveDev": true` in the tshy config in `package.json` to build in link mode. In this mode, the files are hard-linked into place in the `dist` folder, so that edits are immediately visible. This is particularly beneficial in monorepo projects, where workspaces may be edited in parallel, and so it's handy to have changes reflected in real time without a rebuild. Of course, tools that can't handle TypeScript will have a problem with this, so any generic `node` program will not be able to run your code. For this reason: - `liveDev` is always disabled when the `npm_command` environment variable is `'publish'` or `'pack'`. In these situations, your code is being built for public consumption, and must be compiled. - Code in dist will not be able to be loaded in the node repl unless you run it with a loader, such as `node --import=tsx`. - Because it links files into place, a rebuild _is_ required when a file is added or removed. **Note**: If a package uses Node.js `Worker` scripts or bins that are written in TS and need to be compiled, then `liveDev` will not work, and should not be used. Additionally, any dependencies of those modules also cannot use `liveDev`, unless a loader such as `tsx` is used when run. See also: "Loading from Source", below. ### Package `#imports` You can use `"imports"` in your package.json, and it will be handled in the following ways. Any `"imports"` that resolve to a file built as part of your program must be a non-conditional string value pointing to the file in `./src/`. For example: ```json { "imports": { "#name": "./src/path/to/name.ts", "#utils/*": "./src/path/to/utils/*.ts" } } ``` In the ESM build, `import * from '#name'` will resolve to `./dist/esm/path/to/name.js`, and will be built for ESM. In the CommonJS build, `require('#name')` will resolve to `./dist/commonjs/path/to/name.js` and will be built for CommonJS.
tl;dr how this works and why it can't be conditional In the built `dist/{dialect}/package.json` files, the `./src` will be stripped from the path and their file extension changed from `ts` to `js` (`cts` to `cjs` and `mts` to `mjs`). It shouldn't be conditional, because the condition is already implicit in the build. In the CommonJS build, they should be required, and in the ESM builds, they should be imported, and there's only one thing that it can resolve to from any given build.
If there are any `"imports"` that resolve to something _not_ built by tshy, then tshy will set `scripts.preinstall` to set up symbolic links at install time to make it work. This just means that you can't use `scripts.preinstall` for anything else if you have `"imports"` that aren't managed by tshy. For example: ```json { "imports": { "#dep": "@scope/dep/submodule", "#conditional": { "types": "./vendor/blah.d.ts", "require": "./vendor/blah.cjs", "import": "./vendor/blah.mjs" } } } ```
tl;dr explanation The `"imports"` field in package.json allows you to set local package imports, which have the same kind of conditional import logic as `"exports"`. This is especially useful when you have a vendored dependency with `require` and `import` variants, modules that have to be bundled in different ways for different environments, or different dependencies for different environments. These package imports are _always_ resolved against the nearest `package.json` file, and tshy uses generated package.json files to set the module dialect to `"type":"module"` in `dist/esm` and `"type":"commonjs"` in `dist/commonjs`, and it swaps the `src/package.json` file between this during the `tsc` builds. Furthermore, local package imports may not be relative files outside the package folder. They may only be local files within the local package, or dependencies resolved in `node_modules`. To support this, tshy copies the `imports` field from the project's package.json into these dialect-setting generated package.json files, and creates symlinks into the appropriate places so that they resolve to the same files on disk. Because symlinks may not be included in npm packages (and even if they are included, they won't be unpacked at install time), the symlinks it places in `./dist` wouldn't do much good. In order to work around _this_ restriction, tshy creates a node program at `dist/.tshy-link-imports.mjs`, which generates the symlinks at install time via the `preinstall` script.
_If a `tshy.imports` is present (a previous iteration of this behavior), it will be merged into the top-level `"imports"` and deleted from the `tshy` section._ ### Making Noise On failure, all logs will be printed. To print error logs and a `success!` message at the end, set `TSHY_VERBOSE=1` in the environment. To print debugging and other extra information, set `TSHY_VERBOSE=2` in the environment. ### Selecting Dialects You can tell tshy which dialect you're building for by setting the `dialects` config to an array of strings: ```json { "tshy": { "dialects": ["esm", "commonjs"] } } ``` The default is `["esm", "commonjs"]` (ie, both of them). If you set it to just one, then only that dialect will be built and exported. ### Suppressing the self-link See below about **Local Package `exports`** for an explanation of what this is. Suppress the symlink to the project folder into a `node_modules` folder in `dist` and `src` by doing this: ```json { "tshy": { "selfLink": false } } ``` If the `selfLink` config is not explicitly set, and creating the symlink fails (common on Windows systems where `fs.symlink()` may require elevated permissions), then the error will be ignored. ### Old Style Exports (top-level `main`, `module`, `types`) Versions of node prior to 12.10.0, published in early to mid 2016, did not have support for `exports` as a means for defining package entry points. Unfortunately, even 7 years later at the time of this writing, some projects are still using outdated tools that are not capable of understanding this interface. If there is a `commonjs` export of the `"."` subpath, and the `tshy.main` field in package.json is not set to `false`, then tshy will use that to set the `main` and `types` fields, for compatibility with these tools. Similarly, some tools rely on a top-level `module` field, which is the ESM equivalent to `"main"`. If there is an `esm` export of the `"."` subpath, and the `tshy.module` field in package.json is not set to `false`, then tshy will use that to set the `module` field, for compatibility with these tools. **Warning: relying on top-level main/types will likely cause incorrect types to be loaded in some scenarios.** Use with extreme caution. It's almost always better to _not_ define top-level `main` and `types` fields if you are shipping a hybrid module. Users will need to update their `module` and `moduleResolution` tsconfigs appropriately. **That is a good thing, and will save them future headaches.** If the `commonjs` dialect is not built, or if a `"."` export is not created, or if the `"."` export does not support the `commonjs` dialect, and `main` is explicitly set to `true`, then the build will fail. If the `esm` dialect is not built, or if a `"."` export is not created, or if the `"."` export does not support the `esm` dialect, and `module` is explicitly set to `true`, then the build will fail. For example, this config: ```json { "tshy": { "exports": { ".": "./src/index.ts" } } } ``` will produce: ```json { "main": "./dist/commonjs/index.js", "module": "./dist/esm/index.js", "types": "./dist/commonjs/index.d.ts", "type": "module", "exports": { ".": { "require": { "source": "./src/index.js", "types": "./dist/commonjs/index.d.ts", "default": "./dist/commonjs/index.js" }, "import": { "source": "./src/index.ts", "types": "./dist/esm/index.d.ts", "default": "./dist/esm/index.js" } } } } ``` ## CommonJS Dialect Polyfills Sometimes you have to do something in different ways depending on the JS dialect in use. For example, maybe you have to use `import.meta.url` in ESM, but polyfill with `pathToFileURL(__filename)` in CommonJS. To do this, create a polyfill file with the CommonJS code in `-cjs.cts`. (The `cts` extension matters.) ```js // src/source-dir-cjs.cts // ^^^^^^^^^^--------- matching name // ^^^^----- "-cjs" tag // ^^^^- ".cts" filename suffix // this one has a -cjs.cts suffix, so it will override the // module at src/source-dir.ts in the CJS build, // and be excluded from the esm build. import { pathToFileURL } from 'node:url' //@ts-ignore - Have to ignore because TSC thinks this is ESM export const sourceDir = pathToFileURL(__dirname) ``` Then put the "real" ESM code in `.ts` (not `.mts`!) You will generally have to `//@ts-ignore` a bunch of stuff to get the CommonJS build to ignore it, so it's best to keep the polyfill surface as small as possible. ```js // src/source-dir.ts // This is the ESM version of the module //@ts-ignore export const sourceDir = new URL('.', import.meta.url) ``` Then in your code, you can just `import { sourceDir } from './source-dir.js'` and it'll work in both builds. ## Excluding from a build using `.cts` and `.mts` files Files named `*.mts` will be excluded from the CommonJS build. Files named `*.cts` will be excluded from the ESM build. If you need to do something one way for CommonJS and another way for esm, use the "Dialect Switching" trick, with the ESM code living in `src/.ts` and the CommonJS polyfill living in `src/-cjs.cts`. ## Excluding Files Entirely From All Builds If you want to keep some files from being processed by tshy's builds entirely, you can add an `exclude` `string[]` field to the `tshy` object in `package.json`. For example: ```json { "tshy": { "exclude": ["src/**/*.test.ts"] } } ``` ## Other Targets: `browser`, `deno`, etc. If you have any other dialects that you'd like to support, you can list them as either `commonjsDialects` or `esmDialects`, depending on whether you want them to be built as CommonJS or ESM. Note that each added dialect you create will result in another build in the `./dist` folder, so you may wish to use sparingly if shipping a large project. For example: ```json { "tshy": { "exports": { ".": "./src/index.ts" }, "esmDialects": ["deno", "browser"], "commonjsDialects": ["webpack"] } } ``` Will result in: ```json { "exports": { ".": { "deno": { "source": "./src/index.ts", "types": "./dist/deno/index.d.ts", "default": "./dist/deno/index.js" }, "browser": { "types": "./dist/browser/index.d.ts", "default": "./src/index.ts", "default": "./dist/browser/index.js" }, "webpack": { "source": "./src/index.ts", "types": "./dist/webpack/index.d.ts", "default": "./dist/webpack/index.js" }, "require": { "source": "./src/index.ts", "types": "./dist/commonjs/index.d.ts", "default": "./dist/commonjs/index.js" }, "import": { "source": "./src/index.ts", "types": "./dist/esm/index.d.ts", "default": "./dist/esm/index.js" } } } } ``` In each of these, you can use the same kind of dialect override that works for CommonJS polyfills described above. For `commonjsDialects` types, create a file named `-.cts`, and for `esmDialects` types, create a file named `-.mts`. For example, to provide deno, browser, and webpack overrides in the setup above, the following files would be relevant: ``` src/index.ts # normal esm/cjs version src/index-cjs.cts # cjs variant for default commonjs src/index-browser.mts # esm variant for the browser src/index-deno.mts # esm variant for deno src/index-webpack.cts # cjs variant for webpack ``` If dialect overrides are used, then the `"source"` export condition will refer to the original source for the override. For example: ```json { "exports": { ".": { "deno": { "source": "./src/index-deno.mts", "types": "./dist/deno/index.d.ts", "default": "./dist/deno/index.js" }, "browser": { "source": "./src/index-browser.mts", "types": "./dist/browser/index.d.ts", "default": "./dist/browser/index.js" }, "webpack": { "source": "./src/index-webpack.cts", "types": "./dist/webpack/index.d.ts", "default": "./dist/webpack/index.js" }, "require": { "source": "./src/index-cjs.cts", "types": "./dist/commonjs/index.d.ts", "default": "./dist/commonjs/index.js" }, "import": { "source": "./src/index.ts", "types": "./dist/esm/index.d.ts", "default": "./dist/esm/index.js" } } } } ``` Note that the `commonjs` override uses the abbreviated `cjs` name (historical reasons, it was originally the only override supported), and that the file extension must be `cts` or `mts` depending on the dialect type that it is. ## Atomic Builds Code is built in `./.tshy-build` and then copied over only if the build succeeds. This makes it work in monorepo cases where you may have packages that depend on one another and are all being built in parallel (as long as they've been built one time, of course). If you use `"incremental": true` in your tsconfig, then this folder will persist, so that TSC can benefit from the `.tsbuildinfo` files it creates in there. ## Exports Management The `exports` field in your package.json file will be updated based on the `tshy.exports` configuration, as described above. If you don't provide that config, then the default is: ```json { "tshy": { "exports": { ".": "./src/index.ts", "./package.json": "./package.json" } } } ``` ## TSConfigs Put whatever configuration you want in `tsconfig.json`, with the following caveats: - `include` - will be overridden based on build, best omitted - `exclude` - will be overridden based on build, best omitted - compilerOptions: - `outDir` - will be overridden based on build, best omitted - `rootDir` - will be set to `./src` in the build, can only cause annoying errors otherwise. - `target` - will be set to `es2022` if not specified - `module` - will be set to `NodeNext` - `moduleResolution` - will be set to `NodeNext` If you don't have a `tsconfig.json` file, then one will be provided for you. Then the `tsconfig.json` file will be used as the default project for code hints in VSCode, neovim, tests, etc. ### Loading from Source To facilitate jumping directly to source definitions in some tools, you can define custom `"sourceDialects"` which will be resolved to the original TypeScript source. These custom dialects can then be configured to allow build tools (such as tsc) and editors (such as VS Code and neovim/CoC) to jump directly to source definitions. For example, in editors such as VS Code and neovim/CoC that use the TypeScript language services, you can give them a `tsconfig` that contains this: ```json { "compilerOptions": { "customConditions": ["@my-project/source"] } } ``` And then add this to your `package.json` file: ```json { "tshy": { "sourceDialects": ["@my-project/source"] } } ``` If you are loading your program with a custom Node.js importer like [`tsx`](https://npm.im/tsx) that can load TypeScript directly, you can specify it like this: ```bash node --import=tsx --conditions=@my-project/source ./script.ts ``` Other TypeScript-aware tools may have other mechanisms for specifying export conditions. Refer to their documentation for more information. See also: "Live Dev", above. #### Why not just use `"source"` as the target? Tshy always builds the `"source"` target referencing the location of the TypeScript file that was built. However, this can cause problems if tools use this to resolve into dependencies, which may not ship their TypeScript source. But if you can configure your tools to _only_ use this import condition outside of `node_modules`, then it's safe to use. ### Custom `project` Configure `tshy.project` if you want tshy to extend from a custom tsconfig file. This is often useful when you have multiple `tsconfig` files for different tools: - A default `tsconfig.json` for typechecking and type-aware `typescript-eslint`, specifying `"noEmit": true` and `"include": ["**/*.ts"]` - A `tsconfig.build.json` for compilation, with `"noEmit": false`. Note that the [caveats](#tsconfigs) above still apply. ```json { "tshy": { "project": "./tsconfig.build.json" } } ``` ## `src/package.json` As of TypeScript 5.2, the only way to emit JavaScript to ESM or cjs, and also import packages using node-style `"exports"`-aware module resolution, is to set the `type` field in the `package.json` file closest to the TypeScript source code. During the build, `tshy` will create a file at `src/package.json` for this purpose, and then delete it afterwards. If that file exists and _wasn't_ put there by `tshy`, then it will be destroyed. ## Local Package `exports` In order to facilitate local package exports, tshy will create a symlink to the current package temporarily in `./src/node_modules` and permanently in `./dist/node_modules`. If you rely on this feature, you may need to add a `paths` section to your `tsconfig.json` so that you don't get nagged constantly by your editor about missing type references. You can suppress the self-linking by putting this config in `package.json` but be advised this means that you won't be able to import from local package exports: ```json { "tshy": { "selfLink": false } } ```
tl;dr explanation Similar to local module imports, Node supports importing the `exports` of the current package as if it was a dependency of itself. The generated `package.json` files mess with this similar to `imports`, but it's much easier to work around. For example, if you had this in your package.json: ```json { "name": "@my/package", "exports": { "./foo": { "import": "./lib/foo.mjs", "require": "./lib/foo.cjs" } } } ``` Then any module in the package could do `import('@my/package/foo')` or `require('@my/package/foo')` to pull in the appropriate file. In order to make this wort, tshy links the current project directory into `./src/node_modules/` during the builds, and removes the link afterwards, so that TypeScript knows what those things refer to. The link is also created in the `dist` folder, but it's only relevant if your tests load the code from `./dist` rather than from `./src`. In the install, there's no need to re-create this link, because the package will be in a `node_modules` folder already. If you use this feature, you can put something like this in your `tsconfig.json` file so that your editor knows what those things refer to: ```json { "compilerOptions": { "paths": { "@my/package/foo": ["./src/foo.js"], "@my/package/bar": ["./src/bar.js"] } } } ``` Note the `.js` extension, rather than `.ts`. Add this for each submodule path that you use in this way, or use a wildcard if you prefer, though this might result in failing to catch errors if you use a submodule identifier that isn't actually exported: ```json { "compilerOptions": { "paths": { "@my/package/*": ["./src/*.js"] } } } ```
isaacs-tshy-bded619/map.js000066400000000000000000000000551464240215000155530ustar00rootroot00000000000000export default s => s.replace(/test/, 'src') isaacs-tshy-bded619/package-lock.json000066400000000000000000004547751464240215000177020ustar00rootroot00000000000000{ "name": "tshy", "version": "1.18.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "tshy", "version": "1.18.0", "license": "BlueOak-1.0.0", "dependencies": { "chalk": "^5.3.0", "chokidar": "^3.6.0", "foreground-child": "^3.1.1", "minimatch": "^9.0.4", "mkdirp": "^3.0.1", "polite-json": "^5.0.0", "resolve-import": "^1.4.5", "rimraf": "^5.0.1", "sync-content": "^1.0.2", "typescript": "5", "walk-up-path": "^3.0.1" }, "bin": { "tshy": "dist/esm/index.js" }, "devDependencies": { "@types/node": "^20.12.7", "prettier": "^3.3.2", "tap": "^19.2.1", "typedoc": "^0.26.2" }, "engines": { "node": "16 >=16.17 || 18 >=18.15.0 || >=20.6.1" } }, "node_modules/@alcalzone/ansi-tokenize": { "version": "0.1.3", "resolved": "https://registry.npmjs.org/@alcalzone/ansi-tokenize/-/ansi-tokenize-0.1.3.tgz", "integrity": "sha512-3yWxPTq3UQ/FY9p1ErPxIyfT64elWaMvM9lIHnaqpyft63tkxodF5aUElYHrdisWve5cETkh1+KBw1yJuW0aRw==", "dev": true, "dependencies": { "ansi-styles": "^6.2.1", "is-fullwidth-code-point": "^4.0.0" }, "engines": { "node": ">=14.13.1" } }, "node_modules/@alcalzone/ansi-tokenize/node_modules/is-fullwidth-code-point": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-4.0.0.tgz", "integrity": "sha512-O4L094N2/dZ7xqVdrXhh9r1KODPJpFms8B5sGdJLPy664AgvXsreZUyCQQNItZRDlYug4xStLjNp/sz3HvBowQ==", "dev": true, "engines": { "node": ">=12" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/@base2/pretty-print-object": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/@base2/pretty-print-object/-/pretty-print-object-1.0.1.tgz", "integrity": "sha512-4iri8i1AqYHJE2DstZYkyEprg6Pq6sKx3xn5FpySk9sNhH7qN2LLlHJCfDTZRILNwQNPD7mATWM0TBui7uC1pA==", "dev": true }, "node_modules/@bcoe/v8-coverage": { "version": "0.2.3", "resolved": "https://registry.npmjs.org/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz", "integrity": "sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==", "dev": true }, "node_modules/@cspotcode/source-map-support": { "version": "0.8.1", "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz", "integrity": "sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==", "dev": true, "dependencies": { "@jridgewell/trace-mapping": "0.3.9" }, "engines": { "node": ">=12" } }, "node_modules/@isaacs/cliui": { "version": "8.0.2", "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz", "integrity": "sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==", "dependencies": { "string-width": "^5.1.2", "string-width-cjs": "npm:string-width@^4.2.0", "strip-ansi": "^7.0.1", "strip-ansi-cjs": "npm:strip-ansi@^6.0.1", "wrap-ansi": "^8.1.0", "wrap-ansi-cjs": "npm:wrap-ansi@^7.0.0" }, "engines": { "node": ">=12" } }, "node_modules/@isaacs/ts-node-temp-fork-for-pr-2009": { "version": "10.9.7", "resolved": "https://registry.npmjs.org/@isaacs/ts-node-temp-fork-for-pr-2009/-/ts-node-temp-fork-for-pr-2009-10.9.7.tgz", "integrity": "sha512-9f0bhUr9TnwwpgUhEpr3FjxSaH/OHaARkE2F9fM0lS4nIs2GNerrvGwQz493dk0JKlTaGYVrKbq36vA/whZ34g==", "dev": true, "dependencies": { "@cspotcode/source-map-support": "^0.8.0", "@tsconfig/node14": "*", "@tsconfig/node16": "*", "@tsconfig/node18": "*", "@tsconfig/node20": "*", "acorn": "^8.4.1", "acorn-walk": "^8.1.1", "arg": "^4.1.0", "diff": "^4.0.1", "make-error": "^1.1.1", "v8-compile-cache-lib": "^3.0.1" }, "bin": { "ts-node": "dist/bin.js", "ts-node-cwd": "dist/bin-cwd.js", "ts-node-esm": "dist/bin-esm.js", "ts-node-script": "dist/bin-script.js", "ts-node-transpile-only": "dist/bin-transpile.js" }, "peerDependencies": { "@swc/core": ">=1.2.50", "@swc/wasm": ">=1.2.50", "@types/node": "*", "typescript": ">=4.2" }, "peerDependenciesMeta": { "@swc/core": { "optional": true }, "@swc/wasm": { "optional": true } } }, "node_modules/@isaacs/ts-node-temp-fork-for-pr-2009/node_modules/diff": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", "dev": true, "engines": { "node": ">=0.3.1" } }, "node_modules/@istanbuljs/schema": { "version": "0.1.3", "resolved": "https://registry.npmjs.org/@istanbuljs/schema/-/schema-0.1.3.tgz", "integrity": "sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA==", "dev": true, "engines": { "node": ">=8" } }, "node_modules/@jridgewell/resolve-uri": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", "dev": true, "engines": { "node": ">=6.0.0" } }, "node_modules/@jridgewell/sourcemap-codec": { "version": "1.4.15", "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz", "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==", "dev": true }, "node_modules/@jridgewell/trace-mapping": { "version": "0.3.9", "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz", "integrity": "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==", "dev": true, "dependencies": { "@jridgewell/resolve-uri": "^3.0.3", "@jridgewell/sourcemap-codec": "^1.4.10" } }, "node_modules/@npmcli/agent": { "version": "2.2.2", "resolved": "https://registry.npmjs.org/@npmcli/agent/-/agent-2.2.2.tgz", "integrity": "sha512-OrcNPXdpSl9UX7qPVRWbmWMCSXrcDa2M9DvrbOTj7ao1S4PlqVFYv9/yLKMkrJKZ/V5A/kDBC690or307i26Og==", "dev": true, "dependencies": { "agent-base": "^7.1.0", "http-proxy-agent": "^7.0.0", "https-proxy-agent": "^7.0.1", "lru-cache": "^10.0.1", "socks-proxy-agent": "^8.0.3" }, "engines": { "node": "^16.14.0 || >=18.0.0" } }, "node_modules/@npmcli/fs": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/@npmcli/fs/-/fs-3.1.1.tgz", "integrity": "sha512-q9CRWjpHCMIh5sVyefoD1cA7PkvILqCZsnSOEUUivORLjxCO/Irmue2DprETiNgEqktDBZaM1Bi+jrarx1XdCg==", "dev": true, "dependencies": { "semver": "^7.3.5" }, "engines": { "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, "node_modules/@npmcli/git": { "version": "5.0.7", "resolved": "https://registry.npmjs.org/@npmcli/git/-/git-5.0.7.tgz", "integrity": "sha512-WaOVvto604d5IpdCRV2KjQu8PzkfE96d50CQGKgywXh2GxXmDeUO5EWcBC4V57uFyrNqx83+MewuJh3WTR3xPA==", "dev": true, "dependencies": { "@npmcli/promise-spawn": "^7.0.0", "lru-cache": "^10.0.1", "npm-pick-manifest": "^9.0.0", "proc-log": "^4.0.0", "promise-inflight": "^1.0.1", "promise-retry": "^2.0.1", "semver": "^7.3.5", "which": "^4.0.0" }, "engines": { "node": "^16.14.0 || >=18.0.0" } }, "node_modules/@npmcli/git/node_modules/isexe": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/isexe/-/isexe-3.1.1.tgz", "integrity": "sha512-LpB/54B+/2J5hqQ7imZHfdU31OlgQqx7ZicVlkm9kzg9/w8GKLEcFfJl/t7DCEDueOyBAD6zCCwTO6Fzs0NoEQ==", "dev": true, "engines": { "node": ">=16" } }, "node_modules/@npmcli/git/node_modules/which": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/which/-/which-4.0.0.tgz", "integrity": "sha512-GlaYyEb07DPxYCKhKzplCWBJtvxZcZMrL+4UkrTSJHHPyZU4mYYTv3qaOe77H7EODLSSopAUFAc6W8U4yqvscg==", "dev": true, "dependencies": { "isexe": "^3.1.1" }, "bin": { "node-which": "bin/which.js" }, "engines": { "node": "^16.13.0 || >=18.0.0" } }, "node_modules/@npmcli/installed-package-contents": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/@npmcli/installed-package-contents/-/installed-package-contents-2.1.0.tgz", "integrity": "sha512-c8UuGLeZpm69BryRykLuKRyKFZYJsZSCT4aVY5ds4omyZqJ172ApzgfKJ5eV/r3HgLdUYgFVe54KSFVjKoe27w==", "dev": true, "dependencies": { "npm-bundled": "^3.0.0", "npm-normalize-package-bin": "^3.0.0" }, "bin": { "installed-package-contents": "bin/index.js" }, "engines": { "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, "node_modules/@npmcli/node-gyp": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/@npmcli/node-gyp/-/node-gyp-3.0.0.tgz", "integrity": "sha512-gp8pRXC2oOxu0DUE1/M3bYtb1b3/DbJ5aM113+XJBgfXdussRAsX0YOrOhdd8WvnAR6auDBvJomGAkLKA5ydxA==", "dev": true, "engines": { "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, "node_modules/@npmcli/package-json": { "version": "5.2.0", "resolved": "https://registry.npmjs.org/@npmcli/package-json/-/package-json-5.2.0.tgz", "integrity": "sha512-qe/kiqqkW0AGtvBjL8TJKZk/eBBSpnJkUWvHdQ9jM2lKHXRYYJuyNpJPlJw3c8QjC2ow6NZYiLExhUaeJelbxQ==", "dev": true, "dependencies": { "@npmcli/git": "^5.0.0", "glob": "^10.2.2", "hosted-git-info": "^7.0.0", "json-parse-even-better-errors": "^3.0.0", "normalize-package-data": "^6.0.0", "proc-log": "^4.0.0", "semver": "^7.5.3" }, "engines": { "node": "^16.14.0 || >=18.0.0" } }, "node_modules/@npmcli/promise-spawn": { "version": "7.0.2", "resolved": "https://registry.npmjs.org/@npmcli/promise-spawn/-/promise-spawn-7.0.2.tgz", "integrity": "sha512-xhfYPXoV5Dy4UkY0D+v2KkwvnDfiA/8Mt3sWCGI/hM03NsYIH8ZaG6QzS9x7pje5vHZBZJ2v6VRFVTWACnqcmQ==", "dev": true, "dependencies": { "which": "^4.0.0" }, "engines": { "node": "^16.14.0 || >=18.0.0" } }, "node_modules/@npmcli/promise-spawn/node_modules/isexe": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/isexe/-/isexe-3.1.1.tgz", "integrity": "sha512-LpB/54B+/2J5hqQ7imZHfdU31OlgQqx7ZicVlkm9kzg9/w8GKLEcFfJl/t7DCEDueOyBAD6zCCwTO6Fzs0NoEQ==", "dev": true, "engines": { "node": ">=16" } }, "node_modules/@npmcli/promise-spawn/node_modules/which": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/which/-/which-4.0.0.tgz", "integrity": "sha512-GlaYyEb07DPxYCKhKzplCWBJtvxZcZMrL+4UkrTSJHHPyZU4mYYTv3qaOe77H7EODLSSopAUFAc6W8U4yqvscg==", "dev": true, "dependencies": { "isexe": "^3.1.1" }, "bin": { "node-which": "bin/which.js" }, "engines": { "node": "^16.13.0 || >=18.0.0" } }, "node_modules/@npmcli/redact": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/@npmcli/redact/-/redact-1.1.0.tgz", "integrity": "sha512-PfnWuOkQgu7gCbnSsAisaX7hKOdZ4wSAhAzH3/ph5dSGau52kCRrMMGbiSQLwyTZpgldkZ49b0brkOr1AzGBHQ==", "dev": true, "engines": { "node": "^16.14.0 || >=18.0.0" } }, "node_modules/@npmcli/run-script": { "version": "7.0.4", "resolved": "https://registry.npmjs.org/@npmcli/run-script/-/run-script-7.0.4.tgz", "integrity": "sha512-9ApYM/3+rBt9V80aYg6tZfzj3UWdiYyCt7gJUD1VJKvWF5nwKDSICXbYIQbspFTq6TOpbsEtIC0LArB8d9PFmg==", "dev": true, "dependencies": { "@npmcli/node-gyp": "^3.0.0", "@npmcli/package-json": "^5.0.0", "@npmcli/promise-spawn": "^7.0.0", "node-gyp": "^10.0.0", "which": "^4.0.0" }, "engines": { "node": "^16.14.0 || >=18.0.0" } }, "node_modules/@npmcli/run-script/node_modules/isexe": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/isexe/-/isexe-3.1.1.tgz", "integrity": "sha512-LpB/54B+/2J5hqQ7imZHfdU31OlgQqx7ZicVlkm9kzg9/w8GKLEcFfJl/t7DCEDueOyBAD6zCCwTO6Fzs0NoEQ==", "dev": true, "engines": { "node": ">=16" } }, "node_modules/@npmcli/run-script/node_modules/which": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/which/-/which-4.0.0.tgz", "integrity": "sha512-GlaYyEb07DPxYCKhKzplCWBJtvxZcZMrL+4UkrTSJHHPyZU4mYYTv3qaOe77H7EODLSSopAUFAc6W8U4yqvscg==", "dev": true, "dependencies": { "isexe": "^3.1.1" }, "bin": { "node-which": "bin/which.js" }, "engines": { "node": "^16.13.0 || >=18.0.0" } }, "node_modules/@pkgjs/parseargs": { "version": "0.11.0", "resolved": "https://registry.npmjs.org/@pkgjs/parseargs/-/parseargs-0.11.0.tgz", "integrity": "sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==", "optional": true, "engines": { "node": ">=14" } }, "node_modules/@shikijs/core": { "version": "1.9.0", "resolved": "https://registry.npmjs.org/@shikijs/core/-/core-1.9.0.tgz", "integrity": "sha512-cbSoY8P/jgGByG8UOl3jnP/CWg/Qk+1q+eAKWtcrU3pNoILF8wTsLB0jT44qUBV8Ce1SvA9uqcM9Xf+u3fJFBw==", "dev": true }, "node_modules/@sigstore/bundle": { "version": "2.3.2", "resolved": "https://registry.npmjs.org/@sigstore/bundle/-/bundle-2.3.2.tgz", "integrity": "sha512-wueKWDk70QixNLB363yHc2D2ItTgYiMTdPwK8D9dKQMR3ZQ0c35IxP5xnwQ8cNLoCgCRcHf14kE+CLIvNX1zmA==", "dev": true, "dependencies": { "@sigstore/protobuf-specs": "^0.3.2" }, "engines": { "node": "^16.14.0 || >=18.0.0" } }, "node_modules/@sigstore/core": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/@sigstore/core/-/core-1.1.0.tgz", "integrity": "sha512-JzBqdVIyqm2FRQCulY6nbQzMpJJpSiJ8XXWMhtOX9eKgaXXpfNOF53lzQEjIydlStnd/eFtuC1dW4VYdD93oRg==", "dev": true, "engines": { "node": "^16.14.0 || >=18.0.0" } }, "node_modules/@sigstore/protobuf-specs": { "version": "0.3.2", "resolved": "https://registry.npmjs.org/@sigstore/protobuf-specs/-/protobuf-specs-0.3.2.tgz", "integrity": "sha512-c6B0ehIWxMI8wiS/bj6rHMPqeFvngFV7cDU/MY+B16P9Z3Mp9k8L93eYZ7BYzSickzuqAQqAq0V956b3Ju6mLw==", "dev": true, "engines": { "node": "^16.14.0 || >=18.0.0" } }, "node_modules/@sigstore/sign": { "version": "2.3.2", "resolved": "https://registry.npmjs.org/@sigstore/sign/-/sign-2.3.2.tgz", "integrity": "sha512-5Vz5dPVuunIIvC5vBb0APwo7qKA4G9yM48kPWJT+OEERs40md5GoUR1yedwpekWZ4m0Hhw44m6zU+ObsON+iDA==", "dev": true, "dependencies": { "@sigstore/bundle": "^2.3.2", "@sigstore/core": "^1.0.0", "@sigstore/protobuf-specs": "^0.3.2", "make-fetch-happen": "^13.0.1", "proc-log": "^4.2.0", "promise-retry": "^2.0.1" }, "engines": { "node": "^16.14.0 || >=18.0.0" } }, "node_modules/@sigstore/tuf": { "version": "2.3.4", "resolved": "https://registry.npmjs.org/@sigstore/tuf/-/tuf-2.3.4.tgz", "integrity": "sha512-44vtsveTPUpqhm9NCrbU8CWLe3Vck2HO1PNLw7RIajbB7xhtn5RBPm1VNSCMwqGYHhDsBJG8gDF0q4lgydsJvw==", "dev": true, "dependencies": { "@sigstore/protobuf-specs": "^0.3.2", "tuf-js": "^2.2.1" }, "engines": { "node": "^16.14.0 || >=18.0.0" } }, "node_modules/@sigstore/verify": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/@sigstore/verify/-/verify-1.2.1.tgz", "integrity": "sha512-8iKx79/F73DKbGfRf7+t4dqrc0bRr0thdPrxAtCKWRm/F0tG71i6O1rvlnScncJLLBZHn3h8M3c1BSUAb9yu8g==", "dev": true, "dependencies": { "@sigstore/bundle": "^2.3.2", "@sigstore/core": "^1.1.0", "@sigstore/protobuf-specs": "^0.3.2" }, "engines": { "node": "^16.14.0 || >=18.0.0" } }, "node_modules/@tapjs/after": { "version": "1.1.31", "resolved": "https://registry.npmjs.org/@tapjs/after/-/after-1.1.31.tgz", "integrity": "sha512-531NkYOls9PvqfnLsEDRzIWwjynoFRbUVq7pTYuA3PRIw4Ka7jA9uUjILeUurcWjaHrQNzUua0jj/Yu94f6YYw==", "dev": true, "dependencies": { "is-actual-promise": "^1.0.1" }, "engines": { "node": "16 >=16.17.0 || 18 >= 18.6.0 || >=20" }, "peerDependencies": { "@tapjs/core": "2.1.6" } }, "node_modules/@tapjs/after-each": { "version": "2.0.8", "resolved": "https://registry.npmjs.org/@tapjs/after-each/-/after-each-2.0.8.tgz", "integrity": "sha512-btkpQ/BhmRyG50rezduxEZb3pMJblECvTQa41+U2ln2te1prDTlllHlpq4lOjceUksl8KFF1avDqcBqIqPzneQ==", "dev": true, "dependencies": { "function-loop": "^4.0.0" }, "engines": { "node": "16 >=16.17.0 || 18 >= 18.6.0 || >=20" }, "peerDependencies": { "@tapjs/core": "2.1.6" } }, "node_modules/@tapjs/asserts": { "version": "2.0.8", "resolved": "https://registry.npmjs.org/@tapjs/asserts/-/asserts-2.0.8.tgz", "integrity": "sha512-57VrI0p2kAqfgHHUwowDvd31eTfDHw3HO4FSSVUCvngPGWa96R6eH9gXa9fNig4qIp4Dup+nI7gJlJfU0R80SA==", "dev": true, "dependencies": { "@tapjs/stack": "2.0.1", "is-actual-promise": "^1.0.1", "tcompare": "7.0.1", "trivial-deferred": "^2.0.0" }, "engines": { "node": "16 >=16.17.0 || 18 >= 18.6.0 || >=20" }, "funding": { "url": "https://github.com/sponsors/isaacs" }, "peerDependencies": { "@tapjs/core": "2.1.6" } }, "node_modules/@tapjs/before": { "version": "2.0.8", "resolved": "https://registry.npmjs.org/@tapjs/before/-/before-2.0.8.tgz", "integrity": "sha512-22ZdGSn/zOKf8J8cb3yfw5R4I/ozdHEDKL8lBWon/zsxxMMvaRTgOtFXEjb4RE+5SDrqQ4NM7ZRYPGhE7T97dw==", "dev": true, "dependencies": { "is-actual-promise": "^1.0.1" }, "engines": { "node": "16 >=16.17.0 || 18 >= 18.6.0 || >=20" }, "peerDependencies": { "@tapjs/core": "2.1.6" } }, "node_modules/@tapjs/before-each": { "version": "2.0.8", "resolved": "https://registry.npmjs.org/@tapjs/before-each/-/before-each-2.0.8.tgz", "integrity": "sha512-Xjgk8/fuP7iFa5CYjFDl05p5PZGRe//VyHJNuYNzWpF1K9PNMtVdlmwplfpFmbrNrw/bIPq7R6LuiPmTBgzuOw==", "dev": true, "dependencies": { "function-loop": "^4.0.0" }, "engines": { "node": "16 >=16.17.0 || 18 >= 18.6.0 || >=20" }, "peerDependencies": { "@tapjs/core": "2.1.6" } }, "node_modules/@tapjs/chdir": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/@tapjs/chdir/-/chdir-1.1.4.tgz", "integrity": "sha512-axXkT5kWp2/X8l6inKyrqzUhqgvsgrWI8/0xLAdmirpFZ8H6gFxrl763Ozdm27EAmkLnnnWgFITPqUQCuB/tMA==", "dev": true, "engines": { "node": "16 >=16.17.0 || 18 >= 18.6.0 || >=20" }, "peerDependencies": { "@tapjs/core": "2.1.6" } }, "node_modules/@tapjs/config": { "version": "3.1.6", "resolved": "https://registry.npmjs.org/@tapjs/config/-/config-3.1.6.tgz", "integrity": "sha512-5gkDMSLXL5798bbCdX4RdLpB4OUQeu9TXftzKmL1+1T2xbcd4q7zfDnCfOB9zTk50x2f04+4h6Q7Z1NcSKIspg==", "dev": true, "dependencies": { "@tapjs/core": "2.1.6", "@tapjs/test": "2.2.4", "chalk": "^5.2.0", "jackspeak": "^3.1.2", "polite-json": "^4.0.1", "tap-yaml": "2.2.2", "walk-up-path": "^3.0.1" }, "engines": { "node": "16 >=16.17.0 || 18 >= 18.6.0 || >=20" }, "funding": { "url": "https://github.com/sponsors/isaacs" }, "peerDependencies": { "@tapjs/core": "2.1.6", "@tapjs/test": "2.2.4" } }, "node_modules/@tapjs/config/node_modules/polite-json": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/polite-json/-/polite-json-4.0.1.tgz", "integrity": "sha512-8LI5ZeCPBEb4uBbcYKNVwk4jgqNx1yHReWoW4H4uUihWlSqZsUDfSITrRhjliuPgxsNPFhNSudGO2Zu4cbWinQ==", "dev": true, "engines": { "node": "^14.17.0 || ^16.13.0 || >=18.0.0" }, "funding": { "url": "https://github.com/sponsors/isaacs" } }, "node_modules/@tapjs/core": { "version": "2.1.6", "resolved": "https://registry.npmjs.org/@tapjs/core/-/core-2.1.6.tgz", "integrity": "sha512-NYMp0bl52DxXfcLmivMKvOIE14aaB9qJjdHeUbs6GZ9yxgD5w0yeiOT+gWEL+1PzZgGWRxSFEpghID1YfXAc4w==", "dev": true, "dependencies": { "@tapjs/processinfo": "^3.1.8", "@tapjs/stack": "2.0.1", "@tapjs/test": "2.2.4", "async-hook-domain": "^4.0.1", "diff": "^5.2.0", "is-actual-promise": "^1.0.1", "minipass": "^7.0.4", "signal-exit": "4.1", "tap-parser": "16.0.1", "tap-yaml": "2.2.2", "tcompare": "7.0.1", "trivial-deferred": "^2.0.0" }, "engines": { "node": "16 >=16.17.0 || 18 >= 18.6.0 || >=20" } }, "node_modules/@tapjs/error-serdes": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/@tapjs/error-serdes/-/error-serdes-2.0.1.tgz", "integrity": "sha512-P+M4rtcfkDsUveKKmoRNF+07xpbPnRY5KrstIUOnyn483clQ7BJhsnWr162yYNCsyOj4zEfZmAJI1f8Bi7h/ZA==", "dev": true, "dependencies": { "minipass": "^7.0.4" }, "engines": { "node": "16 >=16.17.0 || 18 >= 18.6.0 || >=20" }, "funding": { "url": "https://github.com/sponsors/isaacs" } }, "node_modules/@tapjs/filter": { "version": "2.0.8", "resolved": "https://registry.npmjs.org/@tapjs/filter/-/filter-2.0.8.tgz", "integrity": "sha512-/ps6nOS3CTh1WLfCjJnU7tS4PH4KFgEasFSVPCIFN+BasyoqDapzj4JKIlzQvppZOGTQadKH3wUakafZl7uz8w==", "dev": true, "engines": { "node": "16 >=16.17.0 || 18 >= 18.6.0 || >=20" }, "funding": { "url": "https://github.com/sponsors/isaacs" }, "peerDependencies": { "@tapjs/core": "2.1.6" } }, "node_modules/@tapjs/fixture": { "version": "2.0.8", "resolved": "https://registry.npmjs.org/@tapjs/fixture/-/fixture-2.0.8.tgz", "integrity": "sha512-LJnjeAMSozPFXzu+wQw2HJsjA9djHbTcyeMnsgiRL/Q8ffcLqAawV3SN6XKdDLdWYUg3e1fXhHspnbsouZj+xA==", "dev": true, "dependencies": { "mkdirp": "^3.0.0", "rimraf": "^5.0.5" }, "engines": { "node": "16 >=16.17.0 || 18 >= 18.6.0 || >=20" }, "funding": { "url": "https://github.com/sponsors/isaacs" }, "peerDependencies": { "@tapjs/core": "2.1.6" } }, "node_modules/@tapjs/intercept": { "version": "2.0.8", "resolved": "https://registry.npmjs.org/@tapjs/intercept/-/intercept-2.0.8.tgz", "integrity": "sha512-OF2Q35jtZ20bwV4hRNoca7vqIrzPFR3JR25G2rGru+fgPmq4heN0RLoh0d1O34AbrtXqra2lXkacMB/DPgb01A==", "dev": true, "dependencies": { "@tapjs/after": "1.1.31", "@tapjs/stack": "2.0.1" }, "engines": { "node": "16 >=16.17.0 || 18 >= 18.6.0 || >=20" }, "peerDependencies": { "@tapjs/core": "2.1.6" } }, "node_modules/@tapjs/mock": { "version": "2.1.6", "resolved": "https://registry.npmjs.org/@tapjs/mock/-/mock-2.1.6.tgz", "integrity": "sha512-bNXKrjg/r+i/gfKij5Oo/5Md2DvGNHPSRCHQmjz3VQjpyxqK7S1FGcR0kyqJ8Nof6Wc8yIhpNOCuibj19200IQ==", "dev": true, "dependencies": { "@tapjs/after": "1.1.31", "@tapjs/stack": "2.0.1", "resolve-import": "^1.4.5", "walk-up-path": "^3.0.1" }, "engines": { "node": "16 >=16.17.0 || 18 >= 18.6.0 || >=20" }, "funding": { "url": "https://github.com/sponsors/isaacs" }, "peerDependencies": { "@tapjs/core": "2.1.6" } }, "node_modules/@tapjs/node-serialize": { "version": "2.0.8", "resolved": "https://registry.npmjs.org/@tapjs/node-serialize/-/node-serialize-2.0.8.tgz", "integrity": "sha512-92oqhkmIz5wr0yRs1CPQfim5JSwHPSmoDWnQmJlYUZsY1OYgYouQm3ifnPkqK/9hJpVYzlZEQmefxehxbs2WNQ==", "dev": true, "dependencies": { "@tapjs/error-serdes": "2.0.1", "@tapjs/stack": "2.0.1", "tap-parser": "16.0.1" }, "engines": { "node": "16 >=16.17.0 || 18 >= 18.6.0 || >=20" }, "funding": { "url": "https://github.com/sponsors/isaacs" }, "peerDependencies": { "@tapjs/core": "2.1.6" } }, "node_modules/@tapjs/processinfo": { "version": "3.1.8", "resolved": "https://registry.npmjs.org/@tapjs/processinfo/-/processinfo-3.1.8.tgz", "integrity": "sha512-FIriEB+qqArPhmVYc1PZwRHD99myRdl7C9Oe/uts04Q2LOxQ5MEmqP9XOP8vVYzpDOYwmL8OmL6eOYt9eZlQKQ==", "dev": true, "dependencies": { "pirates": "^4.0.5", "process-on-spawn": "^1.0.0", "signal-exit": "^4.0.2", "uuid": "^8.3.2" }, "engines": { "node": ">=16.17" } }, "node_modules/@tapjs/reporter": { "version": "2.0.8", "resolved": "https://registry.npmjs.org/@tapjs/reporter/-/reporter-2.0.8.tgz", "integrity": "sha512-tZn5ZHIrFwjbi59djtdXHBwgSIZSBXdJpz2i9CZ9HEC1nFhWtIr2Jczvrz4ScfixUgA0GNFirz+q+9iA4IFMvw==", "dev": true, "dependencies": { "@tapjs/config": "3.1.6", "@tapjs/stack": "2.0.1", "chalk": "^5.2.0", "ink": "^4.4.1", "minipass": "^7.0.4", "ms": "^2.1.3", "patch-console": "^2.0.0", "prismjs-terminal": "^1.2.3", "react": "^18.2.0", "string-length": "^6.0.0", "tap-parser": "16.0.1", "tap-yaml": "2.2.2", "tcompare": "7.0.1" }, "engines": { "node": "16 >=16.17.0 || 18 >= 18.6.0 || >=20" }, "funding": { "url": "https://github.com/sponsors/isaacs" }, "peerDependencies": { "@tapjs/core": "2.1.6" } }, "node_modules/@tapjs/run": { "version": "2.1.7", "resolved": "https://registry.npmjs.org/@tapjs/run/-/run-2.1.7.tgz", "integrity": "sha512-Hk41E68f1x4eLBm6Rrxx4ARzZzrjwaLbKThb16+f3bGYiajmqAvBdeyNEoQpEWmW+Sv2HSlueOk2SS2P4fyetg==", "dev": true, "dependencies": { "@tapjs/after": "1.1.31", "@tapjs/before": "2.0.8", "@tapjs/config": "3.1.6", "@tapjs/processinfo": "^3.1.8", "@tapjs/reporter": "2.0.8", "@tapjs/spawn": "2.0.8", "@tapjs/stdin": "2.0.8", "@tapjs/test": "2.2.4", "c8": "^9.1.0", "chalk": "^5.3.0", "chokidar": "^3.6.0", "foreground-child": "^3.1.1", "glob": "^10.3.16", "minipass": "^7.0.4", "mkdirp": "^3.0.1", "opener": "^1.5.2", "pacote": "^17.0.6", "resolve-import": "^1.4.5", "rimraf": "^5.0.5", "semver": "^7.6.0", "signal-exit": "^4.1.0", "tap-parser": "16.0.1", "tap-yaml": "2.2.2", "tcompare": "7.0.1", "trivial-deferred": "^2.0.0", "which": "^4.0.0" }, "bin": { "tap-run": "dist/esm/index.js" }, "engines": { "node": "16 >=16.17.0 || 18 >= 18.6.0 || >=20" }, "funding": { "url": "https://github.com/sponsors/isaacs" }, "peerDependencies": { "@tapjs/core": "2.1.6" } }, "node_modules/@tapjs/run/node_modules/isexe": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/isexe/-/isexe-3.1.1.tgz", "integrity": "sha512-LpB/54B+/2J5hqQ7imZHfdU31OlgQqx7ZicVlkm9kzg9/w8GKLEcFfJl/t7DCEDueOyBAD6zCCwTO6Fzs0NoEQ==", "dev": true, "engines": { "node": ">=16" } }, "node_modules/@tapjs/run/node_modules/which": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/which/-/which-4.0.0.tgz", "integrity": "sha512-GlaYyEb07DPxYCKhKzplCWBJtvxZcZMrL+4UkrTSJHHPyZU4mYYTv3qaOe77H7EODLSSopAUFAc6W8U4yqvscg==", "dev": true, "dependencies": { "isexe": "^3.1.1" }, "bin": { "node-which": "bin/which.js" }, "engines": { "node": "^16.13.0 || >=18.0.0" } }, "node_modules/@tapjs/snapshot": { "version": "2.0.8", "resolved": "https://registry.npmjs.org/@tapjs/snapshot/-/snapshot-2.0.8.tgz", "integrity": "sha512-L0vtqWKkgnQt/XNQkvHOme9Np7ffteCNf1P0F9mz2YiJion4er1nv6pZuJoKVxXFQsbNd2k+LGyx0Iw+bIzwFg==", "dev": true, "dependencies": { "is-actual-promise": "^1.0.1", "tcompare": "7.0.1", "trivial-deferred": "^2.0.0" }, "engines": { "node": "16 >=16.17.0 || 18 >= 18.6.0 || >=20" }, "funding": { "url": "https://github.com/sponsors/isaacs" }, "peerDependencies": { "@tapjs/core": "2.1.6" } }, "node_modules/@tapjs/spawn": { "version": "2.0.8", "resolved": "https://registry.npmjs.org/@tapjs/spawn/-/spawn-2.0.8.tgz", "integrity": "sha512-vCYwynIYJNijY87uHFANe+gCu9rdGoe4GOBmghl6kwDy7eISmcN/FW5TlmrjePMNhTvrDMeYqOIAzqh3WRYmPA==", "dev": true, "engines": { "node": "16 >=16.17.0 || 18 >= 18.6.0 || >=20" }, "peerDependencies": { "@tapjs/core": "2.1.6" } }, "node_modules/@tapjs/stack": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/@tapjs/stack/-/stack-2.0.1.tgz", "integrity": "sha512-3rKbZkRkLeJl9ilV/6b80YfI4C4+OYf7iEz5/d0MIVhmVvxv0ttIy5JnZutAc4Gy9eRp5Ne5UTAIFOVY5k36cg==", "dev": true, "engines": { "node": "16 >=16.17.0 || 18 >= 18.6.0 || >=20" }, "funding": { "url": "https://github.com/sponsors/isaacs" } }, "node_modules/@tapjs/stdin": { "version": "2.0.8", "resolved": "https://registry.npmjs.org/@tapjs/stdin/-/stdin-2.0.8.tgz", "integrity": "sha512-tW/exLXuDqjtH2wjptiPHXBahkdSyoppxDY56l9MG4tiz66dMN6NTCZFvQxp7+3t+lsQKqJp/74z8T/ayp+vZA==", "dev": true, "engines": { "node": "16 >=16.17.0 || 18 >= 18.6.0 || >=20" }, "peerDependencies": { "@tapjs/core": "2.1.6" } }, "node_modules/@tapjs/test": { "version": "2.2.4", "resolved": "https://registry.npmjs.org/@tapjs/test/-/test-2.2.4.tgz", "integrity": "sha512-QIgq2BhMpwO9SN8I0qlwZYXAllO4xWCfJ0MgAGhc+J7p69B5p9dDNPmyOreHeXWMmk6VlNj3oWveoXb5Zn9xZQ==", "dev": true, "dependencies": { "@isaacs/ts-node-temp-fork-for-pr-2009": "^10.9.7", "@tapjs/after": "1.1.31", "@tapjs/after-each": "2.0.8", "@tapjs/asserts": "2.0.8", "@tapjs/before": "2.0.8", "@tapjs/before-each": "2.0.8", "@tapjs/chdir": "1.1.4", "@tapjs/filter": "2.0.8", "@tapjs/fixture": "2.0.8", "@tapjs/intercept": "2.0.8", "@tapjs/mock": "2.1.6", "@tapjs/node-serialize": "2.0.8", "@tapjs/snapshot": "2.0.8", "@tapjs/spawn": "2.0.8", "@tapjs/stdin": "2.0.8", "@tapjs/typescript": "1.4.13", "@tapjs/worker": "2.0.8", "glob": "^10.3.16", "jackspeak": "^3.1.2", "mkdirp": "^3.0.0", "package-json-from-dist": "^1.0.0", "resolve-import": "^1.4.5", "rimraf": "^5.0.5", "sync-content": "^1.0.1", "tap-parser": "16.0.1", "tshy": "^1.14.0", "typescript": "5.4", "walk-up-path": "^3.0.1" }, "bin": { "generate-tap-test-class": "dist/esm/build.mjs" }, "engines": { "node": "16 >=16.17.0 || 18 >= 18.6.0 || >=20" }, "peerDependencies": { "@tapjs/core": "2.1.6" } }, "node_modules/@tapjs/test/node_modules/typescript": { "version": "5.4.5", "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.4.5.tgz", "integrity": "sha512-vcI4UpRgg81oIRUFwR0WSIHKt11nJ7SAVlYNIu+QpqeyXP+gpQJy/Z4+F0aGxSE4MqwjyXvW/TzgkLAx2AGHwQ==", "dev": true, "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" }, "engines": { "node": ">=14.17" } }, "node_modules/@tapjs/typescript": { "version": "1.4.13", "resolved": "https://registry.npmjs.org/@tapjs/typescript/-/typescript-1.4.13.tgz", "integrity": "sha512-MNs7zlhM6G3pNUIjkKXDxgNCwCGZt2bUCGtVunSTDVIrKiUlHAl4QSjQ1oTjumHlCi9gFIWiwFAvpHekzFti0w==", "dev": true, "dependencies": { "@isaacs/ts-node-temp-fork-for-pr-2009": "^10.9.7" }, "engines": { "node": "16 >=16.17.0 || 18 >= 18.6.0 || >=20" }, "peerDependencies": { "@tapjs/core": "2.1.6" } }, "node_modules/@tapjs/worker": { "version": "2.0.8", "resolved": "https://registry.npmjs.org/@tapjs/worker/-/worker-2.0.8.tgz", "integrity": "sha512-AySf2kV6OHvwgD3DrLdT2az2g4hRdoRtKsFCLdZo3jOoKte+ft/IQJEnOW7CPT0RYUskS3elv6eabYgSyTH4tg==", "dev": true, "engines": { "node": "16 >=16.17.0 || 18 >= 18.6.0 || >=20" }, "peerDependencies": { "@tapjs/core": "2.1.6" } }, "node_modules/@tsconfig/node14": { "version": "14.1.2", "resolved": "https://registry.npmjs.org/@tsconfig/node14/-/node14-14.1.2.tgz", "integrity": "sha512-1vncsbfCZ3TBLPxesRYz02Rn7SNJfbLoDVkcZ7F/ixOV6nwxwgdhD1mdPcc5YQ413qBJ8CvMxXMFfJ7oawjo7Q==", "dev": true }, "node_modules/@tsconfig/node16": { "version": "16.1.3", "resolved": "https://registry.npmjs.org/@tsconfig/node16/-/node16-16.1.3.tgz", "integrity": "sha512-9nTOUBn+EMKO6rtSZJk+DcqsfgtlERGT9XPJ5PRj/HNENPCBY1yu/JEj5wT6GLtbCLBO2k46SeXDaY0pjMqypw==", "dev": true }, "node_modules/@tsconfig/node18": { "version": "18.2.4", "resolved": "https://registry.npmjs.org/@tsconfig/node18/-/node18-18.2.4.tgz", "integrity": "sha512-5xxU8vVs9/FNcvm3gE07fPbn9tl6tqGGWA9tSlwsUEkBxtRnTsNmwrV8gasZ9F/EobaSv9+nu8AxUKccw77JpQ==", "dev": true }, "node_modules/@tsconfig/node20": { "version": "20.1.4", "resolved": "https://registry.npmjs.org/@tsconfig/node20/-/node20-20.1.4.tgz", "integrity": "sha512-sqgsT69YFeLWf5NtJ4Xq/xAF8p4ZQHlmGW74Nu2tD4+g5fAsposc4ZfaaPixVu4y01BEiDCWLRDCvDM5JOsRxg==", "dev": true }, "node_modules/@tufjs/canonical-json": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/@tufjs/canonical-json/-/canonical-json-2.0.0.tgz", "integrity": "sha512-yVtV8zsdo8qFHe+/3kw81dSLyF7D576A5cCFCi4X7B39tWT7SekaEFUnvnWJHz+9qO7qJTah1JbrDjWKqFtdWA==", "dev": true, "engines": { "node": "^16.14.0 || >=18.0.0" } }, "node_modules/@tufjs/models": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/@tufjs/models/-/models-2.0.1.tgz", "integrity": "sha512-92F7/SFyufn4DXsha9+QfKnN03JGqtMFMXgSHbZOo8JG59WkTni7UzAouNQDf7AuP9OAMxVOPQcqG3sB7w+kkg==", "dev": true, "dependencies": { "@tufjs/canonical-json": "2.0.0", "minimatch": "^9.0.4" }, "engines": { "node": "^16.14.0 || >=18.0.0" } }, "node_modules/@types/istanbul-lib-coverage": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.6.tgz", "integrity": "sha512-2QF/t/auWm0lsy8XtKVPG19v3sSOQlJe/YHZgfjb/KBBHOGSV+J2q/S671rcq9uTBrLAXmZpqJiaQbMT+zNU1w==", "dev": true }, "node_modules/@types/node": { "version": "20.14.8", "resolved": "https://registry.npmjs.org/@types/node/-/node-20.14.8.tgz", "integrity": "sha512-DO+2/jZinXfROG7j7WKFn/3C6nFwxy2lLpgLjEXJz+0XKphZlTLJ14mo8Vfg8X5BWN6XjyESXq+LcYdT7tR3bA==", "dev": true, "dependencies": { "undici-types": "~5.26.4" } }, "node_modules/abbrev": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-2.0.0.tgz", "integrity": "sha512-6/mh1E2u2YgEsCHdY0Yx5oW+61gZU+1vXaoiHHrpKeuRNNgFvS+/jrwHiQhB5apAf5oB7UB7E19ol2R2LKH8hQ==", "dev": true, "engines": { "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, "node_modules/acorn": { "version": "8.12.0", "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.12.0.tgz", "integrity": "sha512-RTvkC4w+KNXrM39/lWCUaG0IbRkWdCv7W/IOW9oU6SawyxulvkQy5HQPVTKxEjczcUvapcrw3cFx/60VN/NRNw==", "dev": true, "bin": { "acorn": "bin/acorn" }, "engines": { "node": ">=0.4.0" } }, "node_modules/acorn-walk": { "version": "8.3.3", "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.3.3.tgz", "integrity": "sha512-MxXdReSRhGO7VlFe1bRG/oI7/mdLV9B9JJT0N8vZOhF7gFRR5l3M8W9G8JxmKV+JC5mGqJ0QvqfSOLsCPa4nUw==", "dev": true, "dependencies": { "acorn": "^8.11.0" }, "engines": { "node": ">=0.4.0" } }, "node_modules/agent-base": { "version": "7.1.1", "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.1.tgz", "integrity": "sha512-H0TSyFNDMomMNJQBn8wFV5YC/2eJ+VXECwOadZJT554xP6cODZHPX3H9QMQECxvrgiSOP1pHjy1sMWQVYJOUOA==", "dev": true, "dependencies": { "debug": "^4.3.4" }, "engines": { "node": ">= 14" } }, "node_modules/aggregate-error": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/aggregate-error/-/aggregate-error-3.1.0.tgz", "integrity": "sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA==", "dev": true, "dependencies": { "clean-stack": "^2.0.0", "indent-string": "^4.0.0" }, "engines": { "node": ">=8" } }, "node_modules/aggregate-error/node_modules/indent-string": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-4.0.0.tgz", "integrity": "sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==", "dev": true, "engines": { "node": ">=8" } }, "node_modules/ansi-escapes": { "version": "6.2.1", "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-6.2.1.tgz", "integrity": "sha512-4nJ3yixlEthEJ9Rk4vPcdBRkZvQZlYyu8j4/Mqz5sgIkddmEnH2Yj2ZrnP9S3tQOvSNRUIgVNF/1yPpRAGNRig==", "dev": true, "engines": { "node": ">=14.16" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/ansi-regex": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz", "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==", "engines": { "node": ">=12" }, "funding": { "url": "https://github.com/chalk/ansi-regex?sponsor=1" } }, "node_modules/ansi-styles": { "version": "6.2.1", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", "engines": { "node": ">=12" }, "funding": { "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, "node_modules/anymatch": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", "dependencies": { "normalize-path": "^3.0.0", "picomatch": "^2.0.4" }, "engines": { "node": ">= 8" } }, "node_modules/arg": { "version": "4.1.3", "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz", "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==", "dev": true }, "node_modules/argparse": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", "dev": true }, "node_modules/async-hook-domain": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/async-hook-domain/-/async-hook-domain-4.0.1.tgz", "integrity": "sha512-bSktexGodAjfHWIrSrrqxqWzf1hWBZBpmPNZv+TYUMyWa2eoefFc6q6H1+KtdHYSz35lrhWdmXt/XK9wNEZvww==", "dev": true, "engines": { "node": ">=16" } }, "node_modules/auto-bind": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/auto-bind/-/auto-bind-5.0.1.tgz", "integrity": "sha512-ooviqdwwgfIfNmDwo94wlshcdzfO64XV0Cg6oDsDYBJfITDz1EngD2z7DkbvCWn+XIMsIqW27sEVF6qcpJrRcg==", "dev": true, "engines": { "node": "^12.20.0 || ^14.13.1 || >=16.0.0" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/balanced-match": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" }, "node_modules/binary-extensions": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.3.0.tgz", "integrity": "sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==", "engines": { "node": ">=8" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/brace-expansion": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", "dependencies": { "balanced-match": "^1.0.0" } }, "node_modules/braces": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", "dependencies": { "fill-range": "^7.1.1" }, "engines": { "node": ">=8" } }, "node_modules/c8": { "version": "9.1.0", "resolved": "https://registry.npmjs.org/c8/-/c8-9.1.0.tgz", "integrity": "sha512-mBWcT5iqNir1zIkzSPyI3NCR9EZCVI3WUD+AVO17MVWTSFNyUueXE82qTeampNtTr+ilN/5Ua3j24LgbCKjDVg==", "dev": true, "dependencies": { "@bcoe/v8-coverage": "^0.2.3", "@istanbuljs/schema": "^0.1.3", "find-up": "^5.0.0", "foreground-child": "^3.1.1", "istanbul-lib-coverage": "^3.2.0", "istanbul-lib-report": "^3.0.1", "istanbul-reports": "^3.1.6", "test-exclude": "^6.0.0", "v8-to-istanbul": "^9.0.0", "yargs": "^17.7.2", "yargs-parser": "^21.1.1" }, "bin": { "c8": "bin/c8.js" }, "engines": { "node": ">=14.14.0" } }, "node_modules/cacache": { "version": "18.0.3", "resolved": "https://registry.npmjs.org/cacache/-/cacache-18.0.3.tgz", "integrity": "sha512-qXCd4rh6I07cnDqh8V48/94Tc/WSfj+o3Gn6NZ0aZovS255bUx8O13uKxRFd2eWG0xgsco7+YItQNPaa5E85hg==", "dev": true, "dependencies": { "@npmcli/fs": "^3.1.0", "fs-minipass": "^3.0.0", "glob": "^10.2.2", "lru-cache": "^10.0.1", "minipass": "^7.0.3", "minipass-collect": "^2.0.1", "minipass-flush": "^1.0.5", "minipass-pipeline": "^1.2.4", "p-map": "^4.0.0", "ssri": "^10.0.0", "tar": "^6.1.11", "unique-filename": "^3.0.0" }, "engines": { "node": "^16.14.0 || >=18.0.0" } }, "node_modules/chalk": { "version": "5.3.0", "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.3.0.tgz", "integrity": "sha512-dLitG79d+GV1Nb/VYcCDFivJeK1hiukt9QjRNVOsUtTy1rR1YJsmpGGTZ3qJos+uw7WmWF4wUwBd9jxjocFC2w==", "engines": { "node": "^12.17.0 || ^14.13 || >=16.0.0" }, "funding": { "url": "https://github.com/chalk/chalk?sponsor=1" } }, "node_modules/chokidar": { "version": "3.6.0", "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz", "integrity": "sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==", "dependencies": { "anymatch": "~3.1.2", "braces": "~3.0.2", "glob-parent": "~5.1.2", "is-binary-path": "~2.1.0", "is-glob": "~4.0.1", "normalize-path": "~3.0.0", "readdirp": "~3.6.0" }, "engines": { "node": ">= 8.10.0" }, "funding": { "url": "https://paulmillr.com/funding/" }, "optionalDependencies": { "fsevents": "~2.3.2" } }, "node_modules/chownr": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/chownr/-/chownr-2.0.0.tgz", "integrity": "sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ==", "dev": true, "engines": { "node": ">=10" } }, "node_modules/ci-info": { "version": "3.9.0", "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.9.0.tgz", "integrity": "sha512-NIxF55hv4nSqQswkAeiOi1r83xy8JldOFDTWiug55KBu9Jnblncd2U6ViHmYgHf01TPZS77NJBhBMKdWj9HQMQ==", "dev": true, "funding": [ { "type": "github", "url": "https://github.com/sponsors/sibiraj-s" } ], "engines": { "node": ">=8" } }, "node_modules/clean-stack": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-2.2.0.tgz", "integrity": "sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==", "dev": true, "engines": { "node": ">=6" } }, "node_modules/cli-boxes": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/cli-boxes/-/cli-boxes-3.0.0.tgz", "integrity": "sha512-/lzGpEWL/8PfI0BmBOPRwp0c/wFNX1RdUML3jK/RcSBA9T8mZDdQpqYBKtCFTOfQbwPqWEOpjqW+Fnayc0969g==", "dev": true, "engines": { "node": ">=10" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/cli-cursor": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-4.0.0.tgz", "integrity": "sha512-VGtlMu3x/4DOtIUwEkRezxUZ2lBacNJCHash0N0WeZDBS+7Ux1dm3XWAgWYxLJFMMdOeXMHXorshEFhbMSGelg==", "dev": true, "dependencies": { "restore-cursor": "^4.0.0" }, "engines": { "node": "^12.20.0 || ^14.13.1 || >=16.0.0" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/cli-truncate": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/cli-truncate/-/cli-truncate-3.1.0.tgz", "integrity": "sha512-wfOBkjXteqSnI59oPcJkcPl/ZmwvMMOj340qUIY1SKZCv0B9Cf4D4fAucRkIKQmsIuYK3x1rrgU7MeGRruiuiA==", "dev": true, "dependencies": { "slice-ansi": "^5.0.0", "string-width": "^5.0.0" }, "engines": { "node": "^12.20.0 || ^14.13.1 || >=16.0.0" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/cli-truncate/node_modules/is-fullwidth-code-point": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-4.0.0.tgz", "integrity": "sha512-O4L094N2/dZ7xqVdrXhh9r1KODPJpFms8B5sGdJLPy664AgvXsreZUyCQQNItZRDlYug4xStLjNp/sz3HvBowQ==", "dev": true, "engines": { "node": ">=12" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/cli-truncate/node_modules/slice-ansi": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-5.0.0.tgz", "integrity": "sha512-FC+lgizVPfie0kkhqUScwRu1O/lF6NOgJmlCgK+/LYxDCTk8sGelYaHDhFcDN+Sn3Cv+3VSa4Byeo+IMCzpMgQ==", "dev": true, "dependencies": { "ansi-styles": "^6.0.0", "is-fullwidth-code-point": "^4.0.0" }, "engines": { "node": ">=12" }, "funding": { "url": "https://github.com/chalk/slice-ansi?sponsor=1" } }, "node_modules/cliui": { "version": "8.0.1", "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", "dev": true, "dependencies": { "string-width": "^4.2.0", "strip-ansi": "^6.0.1", "wrap-ansi": "^7.0.0" }, "engines": { "node": ">=12" } }, "node_modules/cliui/node_modules/ansi-regex": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", "dev": true, "engines": { "node": ">=8" } }, "node_modules/cliui/node_modules/ansi-styles": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "dev": true, "dependencies": { "color-convert": "^2.0.1" }, "engines": { "node": ">=8" }, "funding": { "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, "node_modules/cliui/node_modules/emoji-regex": { "version": "8.0.0", "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", "dev": true }, "node_modules/cliui/node_modules/string-width": { "version": "4.2.3", "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", "dev": true, "dependencies": { "emoji-regex": "^8.0.0", "is-fullwidth-code-point": "^3.0.0", "strip-ansi": "^6.0.1" }, "engines": { "node": ">=8" } }, "node_modules/cliui/node_modules/strip-ansi": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", "dev": true, "dependencies": { "ansi-regex": "^5.0.1" }, "engines": { "node": ">=8" } }, "node_modules/cliui/node_modules/wrap-ansi": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", "dev": true, "dependencies": { "ansi-styles": "^4.0.0", "string-width": "^4.1.0", "strip-ansi": "^6.0.0" }, "engines": { "node": ">=10" }, "funding": { "url": "https://github.com/chalk/wrap-ansi?sponsor=1" } }, "node_modules/code-excerpt": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/code-excerpt/-/code-excerpt-4.0.0.tgz", "integrity": "sha512-xxodCmBen3iy2i0WtAK8FlFNrRzjUqjRsMfho58xT/wvZU1YTM3fCnRjcy1gJPMepaRlgm/0e6w8SpWHpn3/cA==", "dev": true, "dependencies": { "convert-to-spaces": "^2.0.1" }, "engines": { "node": "^12.20.0 || ^14.13.1 || >=16.0.0" } }, "node_modules/color-convert": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", "dependencies": { "color-name": "~1.1.4" }, "engines": { "node": ">=7.0.0" } }, "node_modules/color-name": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" }, "node_modules/concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", "dev": true }, "node_modules/convert-source-map": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==", "dev": true }, "node_modules/convert-to-spaces": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/convert-to-spaces/-/convert-to-spaces-2.0.1.tgz", "integrity": "sha512-rcQ1bsQO9799wq24uE5AM2tAILy4gXGIK/njFWcVQkGNZ96edlpY+A7bjwvzjYvLDyzmG1MmMLZhpcsb+klNMQ==", "dev": true, "engines": { "node": "^12.20.0 || ^14.13.1 || >=16.0.0" } }, "node_modules/cross-spawn": { "version": "7.0.3", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", "dependencies": { "path-key": "^3.1.0", "shebang-command": "^2.0.0", "which": "^2.0.1" }, "engines": { "node": ">= 8" } }, "node_modules/debug": { "version": "4.3.5", "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.5.tgz", "integrity": "sha512-pt0bNEmneDIvdL1Xsd9oDQ/wrQRkXDT4AUWlNZNPKvW5x/jyO9VFXkJUP07vQ2upmw5PlaITaPKc31jK13V+jg==", "dev": true, "dependencies": { "ms": "2.1.2" }, "engines": { "node": ">=6.0" }, "peerDependenciesMeta": { "supports-color": { "optional": true } } }, "node_modules/debug/node_modules/ms": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", "dev": true }, "node_modules/diff": { "version": "5.2.0", "resolved": "https://registry.npmjs.org/diff/-/diff-5.2.0.tgz", "integrity": "sha512-uIFDxqpRZGZ6ThOk84hEfqWoHx2devRFvpTZcTHur85vImfaxUbTW9Ryh4CpCuDnToOP1CEtXKIgytHBPVff5A==", "dev": true, "engines": { "node": ">=0.3.1" } }, "node_modules/eastasianwidth": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==" }, "node_modules/emoji-regex": { "version": "9.2.2", "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==" }, "node_modules/encoding": { "version": "0.1.13", "resolved": "https://registry.npmjs.org/encoding/-/encoding-0.1.13.tgz", "integrity": "sha512-ETBauow1T35Y/WZMkio9jiM0Z5xjHHmJ4XmjZOq1l/dXz3lr2sRn87nJy20RupqSh1F2m3HHPSp8ShIPQJrJ3A==", "dev": true, "optional": true, "dependencies": { "iconv-lite": "^0.6.2" } }, "node_modules/entities": { "version": "4.5.0", "resolved": "https://registry.npmjs.org/entities/-/entities-4.5.0.tgz", "integrity": "sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==", "dev": true, "engines": { "node": ">=0.12" }, "funding": { "url": "https://github.com/fb55/entities?sponsor=1" } }, "node_modules/env-paths": { "version": "2.2.1", "resolved": "https://registry.npmjs.org/env-paths/-/env-paths-2.2.1.tgz", "integrity": "sha512-+h1lkLKhZMTYjog1VEpJNG7NZJWcuc2DDk/qsqSTRRCOXiLjeQ1d1/udrUGhqMxUgAlwKNZ0cf2uqan5GLuS2A==", "dev": true, "engines": { "node": ">=6" } }, "node_modules/err-code": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/err-code/-/err-code-2.0.3.tgz", "integrity": "sha512-2bmlRpNKBxT/CRmPOlyISQpNj+qSeYvcym/uT0Jx2bMOlKLtSy1ZmLuVxSEKKyor/N5yhvp/ZiG1oE3DEYMSFA==", "dev": true }, "node_modules/escalade": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.2.tgz", "integrity": "sha512-ErCHMCae19vR8vQGe50xIsVomy19rg6gFu3+r3jkEO46suLMWBksvVyoGgQV+jOfl84ZSOSlmv6Gxa89PmTGmA==", "dev": true, "engines": { "node": ">=6" } }, "node_modules/escape-string-regexp": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz", "integrity": "sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==", "dev": true, "engines": { "node": ">=8" } }, "node_modules/events-to-array": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/events-to-array/-/events-to-array-2.0.3.tgz", "integrity": "sha512-f/qE2gImHRa4Cp2y1stEOSgw8wTFyUdVJX7G//bMwbaV9JqISFxg99NbmVQeP7YLnDUZ2un851jlaDrlpmGehQ==", "dev": true, "engines": { "node": ">=12" } }, "node_modules/exponential-backoff": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/exponential-backoff/-/exponential-backoff-3.1.1.tgz", "integrity": "sha512-dX7e/LHVJ6W3DE1MHWi9S1EYzDESENfLrYohG2G++ovZrYOkm4Knwa0mc1cn84xJOR4KEU0WSchhLbd0UklbHw==", "dev": true }, "node_modules/fill-range": { "version": "7.1.1", "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", "dependencies": { "to-regex-range": "^5.0.1" }, "engines": { "node": ">=8" } }, "node_modules/find-up": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", "dev": true, "dependencies": { "locate-path": "^6.0.0", "path-exists": "^4.0.0" }, "engines": { "node": ">=10" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/foreground-child": { "version": "3.2.1", "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.2.1.tgz", "integrity": "sha512-PXUUyLqrR2XCWICfv6ukppP96sdFwWbNEnfEMt7jNsISjMsvaLNinAHNDYyvkyU+SZG2BTSbT5NjG+vZslfGTA==", "dependencies": { "cross-spawn": "^7.0.0", "signal-exit": "^4.0.1" }, "engines": { "node": ">=14" }, "funding": { "url": "https://github.com/sponsors/isaacs" } }, "node_modules/fromentries": { "version": "1.3.2", "resolved": "https://registry.npmjs.org/fromentries/-/fromentries-1.3.2.tgz", "integrity": "sha512-cHEpEQHUg0f8XdtZCc2ZAhrHzKzT0MrFUTcvx+hfxYu7rGMDc5SKoXFh+n4YigxsHXRzc6OrCshdR1bWH6HHyg==", "dev": true, "funding": [ { "type": "github", "url": "https://github.com/sponsors/feross" }, { "type": "patreon", "url": "https://www.patreon.com/feross" }, { "type": "consulting", "url": "https://feross.org/support" } ] }, "node_modules/fs-minipass": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-3.0.3.tgz", "integrity": "sha512-XUBA9XClHbnJWSfBzjkm6RvPsyg3sryZt06BEQoXcF7EK/xpGaQYJgQKDJSUH5SGZ76Y7pFx1QBnXz09rU5Fbw==", "dev": true, "dependencies": { "minipass": "^7.0.3" }, "engines": { "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, "node_modules/fs.realpath": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", "dev": true }, "node_modules/fsevents": { "version": "2.3.3", "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", "hasInstallScript": true, "optional": true, "os": [ "darwin" ], "engines": { "node": "^8.16.0 || ^10.6.0 || >=11.0.0" } }, "node_modules/function-bind": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", "dev": true, "funding": { "url": "https://github.com/sponsors/ljharb" } }, "node_modules/function-loop": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/function-loop/-/function-loop-4.0.0.tgz", "integrity": "sha512-f34iQBedYF3XcI93uewZZOnyscDragxgTK/eTvVB74k3fCD0ZorOi5BV9GS4M8rz/JoNi0Kl3qX5Y9MH3S/CLQ==", "dev": true }, "node_modules/get-caller-file": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", "dev": true, "engines": { "node": "6.* || 8.* || >= 10.*" } }, "node_modules/glob": { "version": "10.4.2", "resolved": "https://registry.npmjs.org/glob/-/glob-10.4.2.tgz", "integrity": "sha512-GwMlUF6PkPo3Gk21UxkCohOv0PLcIXVtKyLlpEI28R/cO/4eNOdmLk3CMW1wROV/WR/EsZOWAfBbBOqYvs88/w==", "dependencies": { "foreground-child": "^3.1.0", "jackspeak": "^3.1.2", "minimatch": "^9.0.4", "minipass": "^7.1.2", "package-json-from-dist": "^1.0.0", "path-scurry": "^1.11.1" }, "bin": { "glob": "dist/esm/bin.mjs" }, "engines": { "node": ">=16 || 14 >=14.18" }, "funding": { "url": "https://github.com/sponsors/isaacs" } }, "node_modules/glob-parent": { "version": "5.1.2", "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", "dependencies": { "is-glob": "^4.0.1" }, "engines": { "node": ">= 6" } }, "node_modules/graceful-fs": { "version": "4.2.11", "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", "dev": true }, "node_modules/has-flag": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true, "engines": { "node": ">=8" } }, "node_modules/hasown": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", "dev": true, "dependencies": { "function-bind": "^1.1.2" }, "engines": { "node": ">= 0.4" } }, "node_modules/hosted-git-info": { "version": "7.0.2", "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-7.0.2.tgz", "integrity": "sha512-puUZAUKT5m8Zzvs72XWy3HtvVbTWljRE66cP60bxJzAqf2DgICo7lYTY2IHUmLnNpjYvw5bvmoHvPc0QO2a62w==", "dev": true, "dependencies": { "lru-cache": "^10.0.1" }, "engines": { "node": "^16.14.0 || >=18.0.0" } }, "node_modules/html-escaper": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz", "integrity": "sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==", "dev": true }, "node_modules/http-cache-semantics": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.1.1.tgz", "integrity": "sha512-er295DKPVsV82j5kw1Gjt+ADA/XYHsajl82cGNQG2eyoPkvgUhX+nDIyelzhIWbbsXP39EHcI6l5tYs2FYqYXQ==", "dev": true }, "node_modules/http-proxy-agent": { "version": "7.0.2", "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-7.0.2.tgz", "integrity": "sha512-T1gkAiYYDWYx3V5Bmyu7HcfcvL7mUrTWiM6yOfa3PIphViJ/gFPbvidQ+veqSOHci/PxBcDabeUNCzpOODJZig==", "dev": true, "dependencies": { "agent-base": "^7.1.0", "debug": "^4.3.4" }, "engines": { "node": ">= 14" } }, "node_modules/https-proxy-agent": { "version": "7.0.4", "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.4.tgz", "integrity": "sha512-wlwpilI7YdjSkWaQ/7omYBMTliDcmCN8OLihO6I9B86g06lMyAoqgoDpV0XqoaPOKj+0DIdAvnsWfyAAhmimcg==", "dev": true, "dependencies": { "agent-base": "^7.0.2", "debug": "4" }, "engines": { "node": ">= 14" } }, "node_modules/iconv-lite": { "version": "0.6.3", "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", "dev": true, "optional": true, "dependencies": { "safer-buffer": ">= 2.1.2 < 3.0.0" }, "engines": { "node": ">=0.10.0" } }, "node_modules/ignore-walk": { "version": "6.0.5", "resolved": "https://registry.npmjs.org/ignore-walk/-/ignore-walk-6.0.5.tgz", "integrity": "sha512-VuuG0wCnjhnylG1ABXT3dAuIpTNDs/G8jlpmwXY03fXoXy/8ZK8/T+hMzt8L4WnrLCJgdybqgPagnF/f97cg3A==", "dev": true, "dependencies": { "minimatch": "^9.0.0" }, "engines": { "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, "node_modules/imurmurhash": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", "dev": true, "engines": { "node": ">=0.8.19" } }, "node_modules/indent-string": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-5.0.0.tgz", "integrity": "sha512-m6FAo/spmsW2Ab2fU35JTYwtOKa2yAwXSwgjSv1TJzh4Mh7mC3lzAOVLBprb72XsTrgkEIsl7YrFNAiDiRhIGg==", "dev": true, "engines": { "node": ">=12" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/inflight": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", "deprecated": "This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.", "dev": true, "dependencies": { "once": "^1.3.0", "wrappy": "1" } }, "node_modules/inherits": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", "dev": true }, "node_modules/ink": { "version": "4.4.1", "resolved": "https://registry.npmjs.org/ink/-/ink-4.4.1.tgz", "integrity": "sha512-rXckvqPBB0Krifk5rn/5LvQGmyXwCUpBfmTwbkQNBY9JY8RSl3b8OftBNEYxg4+SWUhEKcPifgope28uL9inlA==", "dev": true, "dependencies": { "@alcalzone/ansi-tokenize": "^0.1.3", "ansi-escapes": "^6.0.0", "auto-bind": "^5.0.1", "chalk": "^5.2.0", "cli-boxes": "^3.0.0", "cli-cursor": "^4.0.0", "cli-truncate": "^3.1.0", "code-excerpt": "^4.0.0", "indent-string": "^5.0.0", "is-ci": "^3.0.1", "is-lower-case": "^2.0.2", "is-upper-case": "^2.0.2", "lodash": "^4.17.21", "patch-console": "^2.0.0", "react-reconciler": "^0.29.0", "scheduler": "^0.23.0", "signal-exit": "^3.0.7", "slice-ansi": "^6.0.0", "stack-utils": "^2.0.6", "string-width": "^5.1.2", "type-fest": "^0.12.0", "widest-line": "^4.0.1", "wrap-ansi": "^8.1.0", "ws": "^8.12.0", "yoga-wasm-web": "~0.3.3" }, "engines": { "node": ">=14.16" }, "peerDependencies": { "@types/react": ">=18.0.0", "react": ">=18.0.0", "react-devtools-core": "^4.19.1" }, "peerDependenciesMeta": { "@types/react": { "optional": true }, "react-devtools-core": { "optional": true } } }, "node_modules/ink/node_modules/signal-exit": { "version": "3.0.7", "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", "dev": true }, "node_modules/ip-address": { "version": "9.0.5", "resolved": "https://registry.npmjs.org/ip-address/-/ip-address-9.0.5.tgz", "integrity": "sha512-zHtQzGojZXTwZTHQqra+ETKd4Sn3vgi7uBmlPoXVWZqYvuKmtI0l/VZTjqGmJY9x88GGOaZ9+G9ES8hC4T4X8g==", "dev": true, "dependencies": { "jsbn": "1.1.0", "sprintf-js": "^1.1.3" }, "engines": { "node": ">= 12" } }, "node_modules/is-actual-promise": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/is-actual-promise/-/is-actual-promise-1.0.2.tgz", "integrity": "sha512-xsFiO1of0CLsQnPZ1iXHNTyR9YszOeWKYv+q6n8oSFW3ipooFJ1j1lbRMgiMCr+pp2gLruESI4zb5Ak6eK5OnQ==", "dev": true }, "node_modules/is-binary-path": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", "dependencies": { "binary-extensions": "^2.0.0" }, "engines": { "node": ">=8" } }, "node_modules/is-ci": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/is-ci/-/is-ci-3.0.1.tgz", "integrity": "sha512-ZYvCgrefwqoQ6yTyYUbQu64HsITZ3NfKX1lzaEYdkTDcfKzzCI/wthRRYKkdjHKFVgNiXKAKm65Zo1pk2as/QQ==", "dev": true, "dependencies": { "ci-info": "^3.2.0" }, "bin": { "is-ci": "bin.js" } }, "node_modules/is-core-module": { "version": "2.14.0", "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.14.0.tgz", "integrity": "sha512-a5dFJih5ZLYlRtDc0dZWP7RiKr6xIKzmn/oAYCDvdLThadVgyJwlaoQPmRtMSpz+rk0OGAgIu+TcM9HUF0fk1A==", "dev": true, "dependencies": { "hasown": "^2.0.2" }, "engines": { "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" } }, "node_modules/is-extglob": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", "engines": { "node": ">=0.10.0" } }, "node_modules/is-fullwidth-code-point": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", "engines": { "node": ">=8" } }, "node_modules/is-glob": { "version": "4.0.3", "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", "dependencies": { "is-extglob": "^2.1.1" }, "engines": { "node": ">=0.10.0" } }, "node_modules/is-lambda": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/is-lambda/-/is-lambda-1.0.1.tgz", "integrity": "sha512-z7CMFGNrENq5iFB9Bqo64Xk6Y9sg+epq1myIcdHaGnbMTYOxvzsEtdYqQUylB7LxfkvgrrjP32T6Ywciio9UIQ==", "dev": true }, "node_modules/is-lower-case": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/is-lower-case/-/is-lower-case-2.0.2.tgz", "integrity": "sha512-bVcMJy4X5Og6VZfdOZstSexlEy20Sr0k/p/b2IlQJlfdKAQuMpiv5w2Ccxb8sKdRUNAG1PnHVHjFSdRDVS6NlQ==", "dev": true, "dependencies": { "tslib": "^2.0.3" } }, "node_modules/is-number": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", "engines": { "node": ">=0.12.0" } }, "node_modules/is-plain-object": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-5.0.0.tgz", "integrity": "sha512-VRSzKkbMm5jMDoKLbltAkFQ5Qr7VDiTFGXxYFXXowVj387GeGNOCsOH6Msy00SGZ3Fp84b1Naa1psqgcCIEP5Q==", "dev": true, "engines": { "node": ">=0.10.0" } }, "node_modules/is-upper-case": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/is-upper-case/-/is-upper-case-2.0.2.tgz", "integrity": "sha512-44pxmxAvnnAOwBg4tHPnkfvgjPwbc5QIsSstNU+YcJ1ovxVzCWpSGosPJOZh/a1tdl81fbgnLc9LLv+x2ywbPQ==", "dev": true, "dependencies": { "tslib": "^2.0.3" } }, "node_modules/isexe": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==" }, "node_modules/istanbul-lib-coverage": { "version": "3.2.2", "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.2.tgz", "integrity": "sha512-O8dpsF+r0WV/8MNRKfnmrtCWhuKjxrq2w+jpzBL5UZKTi2LeVWnWOmWRxFlesJONmc+wLAGvKQZEOanko0LFTg==", "dev": true, "engines": { "node": ">=8" } }, "node_modules/istanbul-lib-report": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-3.0.1.tgz", "integrity": "sha512-GCfE1mtsHGOELCU8e/Z7YWzpmybrx/+dSTfLrvY8qRmaY6zXTKWn6WQIjaAFw069icm6GVMNkgu0NzI4iPZUNw==", "dev": true, "dependencies": { "istanbul-lib-coverage": "^3.0.0", "make-dir": "^4.0.0", "supports-color": "^7.1.0" }, "engines": { "node": ">=10" } }, "node_modules/istanbul-reports": { "version": "3.1.7", "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.1.7.tgz", "integrity": "sha512-BewmUXImeuRk2YY0PVbxgKAysvhRPUQE0h5QRM++nVWyubKGV0l8qQ5op8+B2DOmwSe63Jivj0BjkPQVf8fP5g==", "dev": true, "dependencies": { "html-escaper": "^2.0.0", "istanbul-lib-report": "^3.0.0" }, "engines": { "node": ">=8" } }, "node_modules/jackspeak": { "version": "3.4.0", "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-3.4.0.tgz", "integrity": "sha512-JVYhQnN59LVPFCEcVa2C3CrEKYacvjRfqIQl+h8oi91aLYQVWRYbxjPcv1bUiUy/kLmQaANrYfNMCO3kuEDHfw==", "dependencies": { "@isaacs/cliui": "^8.0.2" }, "engines": { "node": ">=14" }, "funding": { "url": "https://github.com/sponsors/isaacs" }, "optionalDependencies": { "@pkgjs/parseargs": "^0.11.0" } }, "node_modules/js-tokens": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", "dev": true }, "node_modules/jsbn": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-1.1.0.tgz", "integrity": "sha512-4bYVV3aAMtDTTu4+xsDYa6sy9GyJ69/amsu9sYF2zqjiEoZA5xJi3BrfX3uY+/IekIu7MwdObdbDWpoZdBv3/A==", "dev": true }, "node_modules/json-parse-even-better-errors": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-3.0.2.tgz", "integrity": "sha512-fi0NG4bPjCHunUJffmLd0gxssIgkNmArMvis4iNah6Owg1MCJjWhEcDLmsK6iGkJq3tHwbDkTlce70/tmXN4cQ==", "dev": true, "engines": { "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, "node_modules/jsonparse": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/jsonparse/-/jsonparse-1.3.1.tgz", "integrity": "sha512-POQXvpdL69+CluYsillJ7SUhKvytYjW9vG/GKpnf+xP8UWgYEM/RaMzHHofbALDiKbbP1W8UEYmgGl39WkPZsg==", "dev": true, "engines": [ "node >= 0.2.0" ] }, "node_modules/linkify-it": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/linkify-it/-/linkify-it-5.0.0.tgz", "integrity": "sha512-5aHCbzQRADcdP+ATqnDuhhJ/MRIqDkZX5pyjFHRRysS8vZ5AbqGEoFIb6pYHPZ+L/OC2Lc+xT8uHVVR5CAK/wQ==", "dev": true, "dependencies": { "uc.micro": "^2.0.0" } }, "node_modules/locate-path": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", "dev": true, "dependencies": { "p-locate": "^5.0.0" }, "engines": { "node": ">=10" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/lodash": { "version": "4.17.21", "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", "dev": true }, "node_modules/loose-envify": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", "dev": true, "dependencies": { "js-tokens": "^3.0.0 || ^4.0.0" }, "bin": { "loose-envify": "cli.js" } }, "node_modules/lru-cache": { "version": "10.2.2", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.2.2.tgz", "integrity": "sha512-9hp3Vp2/hFQUiIwKo8XCeFVnrg8Pk3TYNPIR7tJADKi5YfcF7vEaK7avFHTlSy3kOKYaJQaalfEo6YuXdceBOQ==", "engines": { "node": "14 || >=16.14" } }, "node_modules/lunr": { "version": "2.3.9", "resolved": "https://registry.npmjs.org/lunr/-/lunr-2.3.9.tgz", "integrity": "sha512-zTU3DaZaF3Rt9rhN3uBMGQD3dD2/vFQqnvZCDv4dl5iOzq2IZQqTxu90r4E5J+nP70J3ilqVCrbho2eWaeW8Ow==", "dev": true }, "node_modules/make-dir": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-4.0.0.tgz", "integrity": "sha512-hXdUTZYIVOt1Ex//jAQi+wTZZpUpwBj/0QsOzqegb3rGMMeJiSEu5xLHnYfBrRV4RH2+OCSOO95Is/7x1WJ4bw==", "dev": true, "dependencies": { "semver": "^7.5.3" }, "engines": { "node": ">=10" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/make-error": { "version": "1.3.6", "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==", "dev": true }, "node_modules/make-fetch-happen": { "version": "13.0.1", "resolved": "https://registry.npmjs.org/make-fetch-happen/-/make-fetch-happen-13.0.1.tgz", "integrity": "sha512-cKTUFc/rbKUd/9meOvgrpJ2WrNzymt6jfRDdwg5UCnVzv9dTpEj9JS5m3wtziXVCjluIXyL8pcaukYqezIzZQA==", "dev": true, "dependencies": { "@npmcli/agent": "^2.0.0", "cacache": "^18.0.0", "http-cache-semantics": "^4.1.1", "is-lambda": "^1.0.1", "minipass": "^7.0.2", "minipass-fetch": "^3.0.0", "minipass-flush": "^1.0.5", "minipass-pipeline": "^1.2.4", "negotiator": "^0.6.3", "proc-log": "^4.2.0", "promise-retry": "^2.0.1", "ssri": "^10.0.0" }, "engines": { "node": "^16.14.0 || >=18.0.0" } }, "node_modules/markdown-it": { "version": "14.1.0", "resolved": "https://registry.npmjs.org/markdown-it/-/markdown-it-14.1.0.tgz", "integrity": "sha512-a54IwgWPaeBCAAsv13YgmALOF1elABB08FxO9i+r4VFk5Vl4pKokRPeX8u5TCgSsPi6ec1otfLjdOpVcgbpshg==", "dev": true, "dependencies": { "argparse": "^2.0.1", "entities": "^4.4.0", "linkify-it": "^5.0.0", "mdurl": "^2.0.0", "punycode.js": "^2.3.1", "uc.micro": "^2.1.0" }, "bin": { "markdown-it": "bin/markdown-it.mjs" } }, "node_modules/mdurl": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/mdurl/-/mdurl-2.0.0.tgz", "integrity": "sha512-Lf+9+2r+Tdp5wXDXC4PcIBjTDtq4UKjCPMQhKIuzpJNW0b96kVqSwW0bT7FhRSfmAiFYgP+SCRvdrDozfh0U5w==", "dev": true }, "node_modules/mimic-fn": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", "dev": true, "engines": { "node": ">=6" } }, "node_modules/minimatch": { "version": "9.0.4", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.4.tgz", "integrity": "sha512-KqWh+VchfxcMNRAJjj2tnsSJdNbHsVgnkBhTNrW7AjVo6OvLtxw8zfT9oLw1JSohlFzJ8jCoTgaoXvJ+kHt6fw==", "dependencies": { "brace-expansion": "^2.0.1" }, "engines": { "node": ">=16 || 14 >=14.17" }, "funding": { "url": "https://github.com/sponsors/isaacs" } }, "node_modules/minipass": { "version": "7.1.2", "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz", "integrity": "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==", "engines": { "node": ">=16 || 14 >=14.17" } }, "node_modules/minipass-collect": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/minipass-collect/-/minipass-collect-2.0.1.tgz", "integrity": "sha512-D7V8PO9oaz7PWGLbCACuI1qEOsq7UKfLotx/C0Aet43fCUB/wfQ7DYeq2oR/svFJGYDHPr38SHATeaj/ZoKHKw==", "dev": true, "dependencies": { "minipass": "^7.0.3" }, "engines": { "node": ">=16 || 14 >=14.17" } }, "node_modules/minipass-fetch": { "version": "3.0.5", "resolved": "https://registry.npmjs.org/minipass-fetch/-/minipass-fetch-3.0.5.tgz", "integrity": "sha512-2N8elDQAtSnFV0Dk7gt15KHsS0Fyz6CbYZ360h0WTYV1Ty46li3rAXVOQj1THMNLdmrD9Vt5pBPtWtVkpwGBqg==", "dev": true, "dependencies": { "minipass": "^7.0.3", "minipass-sized": "^1.0.3", "minizlib": "^2.1.2" }, "engines": { "node": "^14.17.0 || ^16.13.0 || >=18.0.0" }, "optionalDependencies": { "encoding": "^0.1.13" } }, "node_modules/minipass-flush": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/minipass-flush/-/minipass-flush-1.0.5.tgz", "integrity": "sha512-JmQSYYpPUqX5Jyn1mXaRwOda1uQ8HP5KAT/oDSLCzt1BYRhQU0/hDtsB1ufZfEEzMZ9aAVmsBw8+FWsIXlClWw==", "dev": true, "dependencies": { "minipass": "^3.0.0" }, "engines": { "node": ">= 8" } }, "node_modules/minipass-flush/node_modules/minipass": { "version": "3.3.6", "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", "dev": true, "dependencies": { "yallist": "^4.0.0" }, "engines": { "node": ">=8" } }, "node_modules/minipass-json-stream": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/minipass-json-stream/-/minipass-json-stream-1.0.1.tgz", "integrity": "sha512-ODqY18UZt/I8k+b7rl2AENgbWE8IDYam+undIJONvigAz8KR5GWblsFTEfQs0WODsjbSXWlm+JHEv8Gr6Tfdbg==", "dev": true, "dependencies": { "jsonparse": "^1.3.1", "minipass": "^3.0.0" } }, "node_modules/minipass-json-stream/node_modules/minipass": { "version": "3.3.6", "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", "dev": true, "dependencies": { "yallist": "^4.0.0" }, "engines": { "node": ">=8" } }, "node_modules/minipass-pipeline": { "version": "1.2.4", "resolved": "https://registry.npmjs.org/minipass-pipeline/-/minipass-pipeline-1.2.4.tgz", "integrity": "sha512-xuIq7cIOt09RPRJ19gdi4b+RiNvDFYe5JH+ggNvBqGqpQXcru3PcRmOZuHBKWK1Txf9+cQ+HMVN4d6z46LZP7A==", "dev": true, "dependencies": { "minipass": "^3.0.0" }, "engines": { "node": ">=8" } }, "node_modules/minipass-pipeline/node_modules/minipass": { "version": "3.3.6", "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", "dev": true, "dependencies": { "yallist": "^4.0.0" }, "engines": { "node": ">=8" } }, "node_modules/minipass-sized": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/minipass-sized/-/minipass-sized-1.0.3.tgz", "integrity": "sha512-MbkQQ2CTiBMlA2Dm/5cY+9SWFEN8pzzOXi6rlM5Xxq0Yqbda5ZQy9sU75a673FE9ZK0Zsbr6Y5iP6u9nktfg2g==", "dev": true, "dependencies": { "minipass": "^3.0.0" }, "engines": { "node": ">=8" } }, "node_modules/minipass-sized/node_modules/minipass": { "version": "3.3.6", "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", "dev": true, "dependencies": { "yallist": "^4.0.0" }, "engines": { "node": ">=8" } }, "node_modules/minizlib": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-2.1.2.tgz", "integrity": "sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg==", "dev": true, "dependencies": { "minipass": "^3.0.0", "yallist": "^4.0.0" }, "engines": { "node": ">= 8" } }, "node_modules/minizlib/node_modules/minipass": { "version": "3.3.6", "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", "dev": true, "dependencies": { "yallist": "^4.0.0" }, "engines": { "node": ">=8" } }, "node_modules/mkdirp": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-3.0.1.tgz", "integrity": "sha512-+NsyUUAZDmo6YVHzL/stxSu3t9YS1iljliy3BSDrXJ/dkn1KYdmtZODGGjLcc9XLgVVpH4KshHB8XmZgMhaBXg==", "bin": { "mkdirp": "dist/cjs/src/bin.js" }, "engines": { "node": ">=10" }, "funding": { "url": "https://github.com/sponsors/isaacs" } }, "node_modules/ms": { "version": "2.1.3", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", "dev": true }, "node_modules/negotiator": { "version": "0.6.3", "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz", "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==", "dev": true, "engines": { "node": ">= 0.6" } }, "node_modules/node-gyp": { "version": "10.1.0", "resolved": "https://registry.npmjs.org/node-gyp/-/node-gyp-10.1.0.tgz", "integrity": "sha512-B4J5M1cABxPc5PwfjhbV5hoy2DP9p8lFXASnEN6hugXOa61416tnTZ29x9sSwAd0o99XNIcpvDDy1swAExsVKA==", "dev": true, "dependencies": { "env-paths": "^2.2.0", "exponential-backoff": "^3.1.1", "glob": "^10.3.10", "graceful-fs": "^4.2.6", "make-fetch-happen": "^13.0.0", "nopt": "^7.0.0", "proc-log": "^3.0.0", "semver": "^7.3.5", "tar": "^6.1.2", "which": "^4.0.0" }, "bin": { "node-gyp": "bin/node-gyp.js" }, "engines": { "node": "^16.14.0 || >=18.0.0" } }, "node_modules/node-gyp/node_modules/isexe": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/isexe/-/isexe-3.1.1.tgz", "integrity": "sha512-LpB/54B+/2J5hqQ7imZHfdU31OlgQqx7ZicVlkm9kzg9/w8GKLEcFfJl/t7DCEDueOyBAD6zCCwTO6Fzs0NoEQ==", "dev": true, "engines": { "node": ">=16" } }, "node_modules/node-gyp/node_modules/proc-log": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/proc-log/-/proc-log-3.0.0.tgz", "integrity": "sha512-++Vn7NS4Xf9NacaU9Xq3URUuqZETPsf8L4j5/ckhaRYsfPeRyzGw+iDjFhV/Jr3uNmTvvddEJFWh5R1gRgUH8A==", "dev": true, "engines": { "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, "node_modules/node-gyp/node_modules/which": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/which/-/which-4.0.0.tgz", "integrity": "sha512-GlaYyEb07DPxYCKhKzplCWBJtvxZcZMrL+4UkrTSJHHPyZU4mYYTv3qaOe77H7EODLSSopAUFAc6W8U4yqvscg==", "dev": true, "dependencies": { "isexe": "^3.1.1" }, "bin": { "node-which": "bin/which.js" }, "engines": { "node": "^16.13.0 || >=18.0.0" } }, "node_modules/nopt": { "version": "7.2.1", "resolved": "https://registry.npmjs.org/nopt/-/nopt-7.2.1.tgz", "integrity": "sha512-taM24ViiimT/XntxbPyJQzCG+p4EKOpgD3mxFwW38mGjVUrfERQOeY4EDHjdnptttfHuHQXFx+lTP08Q+mLa/w==", "dev": true, "dependencies": { "abbrev": "^2.0.0" }, "bin": { "nopt": "bin/nopt.js" }, "engines": { "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, "node_modules/normalize-package-data": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-6.0.1.tgz", "integrity": "sha512-6rvCfeRW+OEZagAB4lMLSNuTNYZWLVtKccK79VSTf//yTY5VOCgcpH80O+bZK8Neps7pUnd5G+QlMg1yV/2iZQ==", "dev": true, "dependencies": { "hosted-git-info": "^7.0.0", "is-core-module": "^2.8.1", "semver": "^7.3.5", "validate-npm-package-license": "^3.0.4" }, "engines": { "node": "^16.14.0 || >=18.0.0" } }, "node_modules/normalize-path": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", "engines": { "node": ">=0.10.0" } }, "node_modules/npm-bundled": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/npm-bundled/-/npm-bundled-3.0.1.tgz", "integrity": "sha512-+AvaheE/ww1JEwRHOrn4WHNzOxGtVp+adrg2AeZS/7KuxGUYFuBta98wYpfHBbJp6Tg6j1NKSEVHNcfZzJHQwQ==", "dev": true, "dependencies": { "npm-normalize-package-bin": "^3.0.0" }, "engines": { "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, "node_modules/npm-install-checks": { "version": "6.3.0", "resolved": "https://registry.npmjs.org/npm-install-checks/-/npm-install-checks-6.3.0.tgz", "integrity": "sha512-W29RiK/xtpCGqn6f3ixfRYGk+zRyr+Ew9F2E20BfXxT5/euLdA/Nm7fO7OeTGuAmTs30cpgInyJ0cYe708YTZw==", "dev": true, "dependencies": { "semver": "^7.1.1" }, "engines": { "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, "node_modules/npm-normalize-package-bin": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/npm-normalize-package-bin/-/npm-normalize-package-bin-3.0.1.tgz", "integrity": "sha512-dMxCf+zZ+3zeQZXKxmyuCKlIDPGuv8EF940xbkC4kQVDTtqoh6rJFO+JTKSA6/Rwi0getWmtuy4Itup0AMcaDQ==", "dev": true, "engines": { "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, "node_modules/npm-package-arg": { "version": "11.0.2", "resolved": "https://registry.npmjs.org/npm-package-arg/-/npm-package-arg-11.0.2.tgz", "integrity": "sha512-IGN0IAwmhDJwy13Wc8k+4PEbTPhpJnMtfR53ZbOyjkvmEcLS4nCwp6mvMWjS5sUjeiW3mpx6cHmuhKEu9XmcQw==", "dev": true, "dependencies": { "hosted-git-info": "^7.0.0", "proc-log": "^4.0.0", "semver": "^7.3.5", "validate-npm-package-name": "^5.0.0" }, "engines": { "node": "^16.14.0 || >=18.0.0" } }, "node_modules/npm-packlist": { "version": "8.0.2", "resolved": "https://registry.npmjs.org/npm-packlist/-/npm-packlist-8.0.2.tgz", "integrity": "sha512-shYrPFIS/JLP4oQmAwDyk5HcyysKW8/JLTEA32S0Z5TzvpaeeX2yMFfoK1fjEBnCBvVyIB/Jj/GBFdm0wsgzbA==", "dev": true, "dependencies": { "ignore-walk": "^6.0.4" }, "engines": { "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, "node_modules/npm-pick-manifest": { "version": "9.0.1", "resolved": "https://registry.npmjs.org/npm-pick-manifest/-/npm-pick-manifest-9.0.1.tgz", "integrity": "sha512-Udm1f0l2nXb3wxDpKjfohwgdFUSV50UVwzEIpDXVsbDMXVIEF81a/i0UhuQbhrPMMmdiq3+YMFLFIRVLs3hxQw==", "dev": true, "dependencies": { "npm-install-checks": "^6.0.0", "npm-normalize-package-bin": "^3.0.0", "npm-package-arg": "^11.0.0", "semver": "^7.3.5" }, "engines": { "node": "^16.14.0 || >=18.0.0" } }, "node_modules/npm-registry-fetch": { "version": "16.2.1", "resolved": "https://registry.npmjs.org/npm-registry-fetch/-/npm-registry-fetch-16.2.1.tgz", "integrity": "sha512-8l+7jxhim55S85fjiDGJ1rZXBWGtRLi1OSb4Z3BPLObPuIaeKRlPRiYMSHU4/81ck3t71Z+UwDDl47gcpmfQQA==", "dev": true, "dependencies": { "@npmcli/redact": "^1.1.0", "make-fetch-happen": "^13.0.0", "minipass": "^7.0.2", "minipass-fetch": "^3.0.0", "minipass-json-stream": "^1.0.1", "minizlib": "^2.1.2", "npm-package-arg": "^11.0.0", "proc-log": "^4.0.0" }, "engines": { "node": "^16.14.0 || >=18.0.0" } }, "node_modules/once": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", "dev": true, "dependencies": { "wrappy": "1" } }, "node_modules/onetime": { "version": "5.1.2", "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", "dev": true, "dependencies": { "mimic-fn": "^2.1.0" }, "engines": { "node": ">=6" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/opener": { "version": "1.5.2", "resolved": "https://registry.npmjs.org/opener/-/opener-1.5.2.tgz", "integrity": "sha512-ur5UIdyw5Y7yEj9wLzhqXiy6GZ3Mwx0yGI+5sMn2r0N0v3cKJvUmFH5yPP+WXh9e0xfyzyJX95D8l088DNFj7A==", "dev": true, "bin": { "opener": "bin/opener-bin.js" } }, "node_modules/p-limit": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", "dev": true, "dependencies": { "yocto-queue": "^0.1.0" }, "engines": { "node": ">=10" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/p-locate": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", "dev": true, "dependencies": { "p-limit": "^3.0.2" }, "engines": { "node": ">=10" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/p-map": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/p-map/-/p-map-4.0.0.tgz", "integrity": "sha512-/bjOqmgETBYB5BoEeGVea8dmvHb2m9GLy1E9W43yeyfP6QQCZGFNa+XRceJEuDB6zqr+gKpIAmlLebMpykw/MQ==", "dev": true, "dependencies": { "aggregate-error": "^3.0.0" }, "engines": { "node": ">=10" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/package-json-from-dist": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/package-json-from-dist/-/package-json-from-dist-1.0.0.tgz", "integrity": "sha512-dATvCeZN/8wQsGywez1mzHtTlP22H8OEfPrVMLNr4/eGa+ijtLn/6M5f0dY8UKNrC2O9UCU6SSoG3qRKnt7STw==" }, "node_modules/pacote": { "version": "17.0.7", "resolved": "https://registry.npmjs.org/pacote/-/pacote-17.0.7.tgz", "integrity": "sha512-sgvnoUMlkv9xHwDUKjKQFXVyUi8dtJGKp3vg6sYy+TxbDic5RjZCHF3ygv0EJgNRZ2GfRONjlKPUfokJ9lDpwQ==", "dev": true, "dependencies": { "@npmcli/git": "^5.0.0", "@npmcli/installed-package-contents": "^2.0.1", "@npmcli/promise-spawn": "^7.0.0", "@npmcli/run-script": "^7.0.0", "cacache": "^18.0.0", "fs-minipass": "^3.0.0", "minipass": "^7.0.2", "npm-package-arg": "^11.0.0", "npm-packlist": "^8.0.0", "npm-pick-manifest": "^9.0.0", "npm-registry-fetch": "^16.0.0", "proc-log": "^4.0.0", "promise-retry": "^2.0.1", "read-package-json": "^7.0.0", "read-package-json-fast": "^3.0.0", "sigstore": "^2.2.0", "ssri": "^10.0.0", "tar": "^6.1.11" }, "bin": { "pacote": "lib/bin.js" }, "engines": { "node": "^16.14.0 || >=18.0.0" } }, "node_modules/patch-console": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/patch-console/-/patch-console-2.0.0.tgz", "integrity": "sha512-0YNdUceMdaQwoKce1gatDScmMo5pu/tfABfnzEqeG0gtTmd7mh/WcwgUjtAeOU7N8nFFlbQBnFK2gXW5fGvmMA==", "dev": true, "engines": { "node": "^12.20.0 || ^14.13.1 || >=16.0.0" } }, "node_modules/path-exists": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", "dev": true, "engines": { "node": ">=8" } }, "node_modules/path-is-absolute": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", "dev": true, "engines": { "node": ">=0.10.0" } }, "node_modules/path-key": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", "engines": { "node": ">=8" } }, "node_modules/path-scurry": { "version": "1.11.1", "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.11.1.tgz", "integrity": "sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==", "dependencies": { "lru-cache": "^10.2.0", "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0" }, "engines": { "node": ">=16 || 14 >=14.18" }, "funding": { "url": "https://github.com/sponsors/isaacs" } }, "node_modules/picomatch": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", "engines": { "node": ">=8.6" }, "funding": { "url": "https://github.com/sponsors/jonschlinkert" } }, "node_modules/pirates": { "version": "4.0.6", "resolved": "https://registry.npmjs.org/pirates/-/pirates-4.0.6.tgz", "integrity": "sha512-saLsH7WeYYPiD25LDuLRRY/i+6HaPYr6G1OUlN39otzkSTxKnubR9RTxS3/Kk50s1g2JTgFwWQDQyplC5/SHZg==", "dev": true, "engines": { "node": ">= 6" } }, "node_modules/polite-json": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/polite-json/-/polite-json-5.0.0.tgz", "integrity": "sha512-OLS/0XeUAcE8a2fdwemNja+udKgXNnY6yKVIXqAD2zVRx1KvY6Ato/rZ2vdzbxqYwPW0u6SCNC/bAMPNzpzxbw==", "engines": { "node": "^14.17.0 || ^16.13.0 || >=18.0.0" }, "funding": { "url": "https://github.com/sponsors/isaacs" } }, "node_modules/prettier": { "version": "3.3.2", "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.3.2.tgz", "integrity": "sha512-rAVeHYMcv8ATV5d508CFdn+8/pHPpXeIid1DdrPwXnaAdH7cqjVbpJaT5eq4yRAFU/lsbwYwSF/n5iNrdJHPQA==", "dev": true, "bin": { "prettier": "bin/prettier.cjs" }, "engines": { "node": ">=14" }, "funding": { "url": "https://github.com/prettier/prettier?sponsor=1" } }, "node_modules/prismjs": { "version": "1.29.0", "resolved": "https://registry.npmjs.org/prismjs/-/prismjs-1.29.0.tgz", "integrity": "sha512-Kx/1w86q/epKcmte75LNrEoT+lX8pBpavuAbvJWRXar7Hz8jrtF+e3vY751p0R8H9HdArwaCTNDDzHg/ScJK1Q==", "dev": true, "engines": { "node": ">=6" } }, "node_modules/prismjs-terminal": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/prismjs-terminal/-/prismjs-terminal-1.2.3.tgz", "integrity": "sha512-xc0zuJ5FMqvW+DpiRkvxURlz98DdfDsZcFHdO699+oL+ykbFfgI7O4VDEgUyc07BSL2NHl3zdb8m/tZ/aaqUrw==", "dev": true, "dependencies": { "chalk": "^5.2.0", "prismjs": "^1.29.0", "string-length": "^6.0.0" }, "engines": { "node": ">=16" }, "funding": { "url": "https://github.com/sponsors/isaacs" } }, "node_modules/proc-log": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/proc-log/-/proc-log-4.2.0.tgz", "integrity": "sha512-g8+OnU/L2v+wyiVK+D5fA34J7EH8jZ8DDlvwhRCMxmMj7UCBvxiO1mGeN+36JXIKF4zevU4kRBd8lVgG9vLelA==", "dev": true, "engines": { "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, "node_modules/process-on-spawn": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/process-on-spawn/-/process-on-spawn-1.0.0.tgz", "integrity": "sha512-1WsPDsUSMmZH5LeMLegqkPDrsGgsWwk1Exipy2hvB0o/F0ASzbpIctSCcZIK1ykJvtTJULEH+20WOFjMvGnCTg==", "dev": true, "dependencies": { "fromentries": "^1.2.0" }, "engines": { "node": ">=8" } }, "node_modules/promise-inflight": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/promise-inflight/-/promise-inflight-1.0.1.tgz", "integrity": "sha512-6zWPyEOFaQBJYcGMHBKTKJ3u6TBsnMFOIZSa6ce1e/ZrrsOlnHRHbabMjLiBYKp+n44X9eUI6VUPaukCXHuG4g==", "dev": true }, "node_modules/promise-retry": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/promise-retry/-/promise-retry-2.0.1.tgz", "integrity": "sha512-y+WKFlBR8BGXnsNlIHFGPZmyDf3DFMoLhaflAnyZgV6rG6xu+JwesTo2Q9R6XwYmtmwAFCkAk3e35jEdoeh/3g==", "dev": true, "dependencies": { "err-code": "^2.0.2", "retry": "^0.12.0" }, "engines": { "node": ">=10" } }, "node_modules/punycode.js": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/punycode.js/-/punycode.js-2.3.1.tgz", "integrity": "sha512-uxFIHU0YlHYhDQtV4R9J6a52SLx28BCjT+4ieh7IGbgwVJWO+km431c4yRlREUAsAmt/uMjQUyQHNEPf0M39CA==", "dev": true, "engines": { "node": ">=6" } }, "node_modules/react": { "version": "18.3.1", "resolved": "https://registry.npmjs.org/react/-/react-18.3.1.tgz", "integrity": "sha512-wS+hAgJShR0KhEvPJArfuPVN1+Hz1t0Y6n5jLrGQbkb4urgPE/0Rve+1kMB1v/oWgHgm4WIcV+i7F2pTVj+2iQ==", "dev": true, "dependencies": { "loose-envify": "^1.1.0" }, "engines": { "node": ">=0.10.0" } }, "node_modules/react-dom": { "version": "18.3.1", "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-18.3.1.tgz", "integrity": "sha512-5m4nQKp+rZRb09LNH59GM4BxTh9251/ylbKIbpe7TpGxfJ+9kv6BLkLBXIjjspbgbnIBNqlI23tRnTWT0snUIw==", "dev": true, "peer": true, "dependencies": { "loose-envify": "^1.1.0", "scheduler": "^0.23.2" }, "peerDependencies": { "react": "^18.3.1" } }, "node_modules/react-element-to-jsx-string": { "version": "15.0.0", "resolved": "https://registry.npmjs.org/react-element-to-jsx-string/-/react-element-to-jsx-string-15.0.0.tgz", "integrity": "sha512-UDg4lXB6BzlobN60P8fHWVPX3Kyw8ORrTeBtClmIlGdkOOE+GYQSFvmEU5iLLpwp/6v42DINwNcwOhOLfQ//FQ==", "dev": true, "dependencies": { "@base2/pretty-print-object": "1.0.1", "is-plain-object": "5.0.0", "react-is": "18.1.0" }, "peerDependencies": { "react": "^0.14.8 || ^15.0.1 || ^16.0.0 || ^17.0.1 || ^18.0.0", "react-dom": "^0.14.8 || ^15.0.1 || ^16.0.0 || ^17.0.1 || ^18.0.0" } }, "node_modules/react-is": { "version": "18.1.0", "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.1.0.tgz", "integrity": "sha512-Fl7FuabXsJnV5Q1qIOQwx/sagGF18kogb4gpfcG4gjLBWO0WDiiz1ko/ExayuxE7InyQkBLkxRFG5oxY6Uu3Kg==", "dev": true }, "node_modules/react-reconciler": { "version": "0.29.2", "resolved": "https://registry.npmjs.org/react-reconciler/-/react-reconciler-0.29.2.tgz", "integrity": "sha512-zZQqIiYgDCTP/f1N/mAR10nJGrPD2ZR+jDSEsKWJHYC7Cm2wodlwbR3upZRdC3cjIjSlTLNVyO7Iu0Yy7t2AYg==", "dev": true, "dependencies": { "loose-envify": "^1.1.0", "scheduler": "^0.23.2" }, "engines": { "node": ">=0.10.0" }, "peerDependencies": { "react": "^18.3.1" } }, "node_modules/read-package-json": { "version": "7.0.1", "resolved": "https://registry.npmjs.org/read-package-json/-/read-package-json-7.0.1.tgz", "integrity": "sha512-8PcDiZ8DXUjLf687Ol4BR8Bpm2umR7vhoZOzNRt+uxD9GpBh/K+CAAALVIiYFknmvlmyg7hM7BSNUXPaCCqd0Q==", "deprecated": "This package is no longer supported. Please use @npmcli/package-json instead.", "dev": true, "dependencies": { "glob": "^10.2.2", "json-parse-even-better-errors": "^3.0.0", "normalize-package-data": "^6.0.0", "npm-normalize-package-bin": "^3.0.0" }, "engines": { "node": "^16.14.0 || >=18.0.0" } }, "node_modules/read-package-json-fast": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/read-package-json-fast/-/read-package-json-fast-3.0.2.tgz", "integrity": "sha512-0J+Msgym3vrLOUB3hzQCuZHII0xkNGCtz/HJH9xZshwv9DbDwkw1KaE3gx/e2J5rpEY5rtOy6cyhKOPrkP7FZw==", "dev": true, "dependencies": { "json-parse-even-better-errors": "^3.0.0", "npm-normalize-package-bin": "^3.0.0" }, "engines": { "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, "node_modules/readdirp": { "version": "3.6.0", "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", "dependencies": { "picomatch": "^2.2.1" }, "engines": { "node": ">=8.10.0" } }, "node_modules/require-directory": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", "dev": true, "engines": { "node": ">=0.10.0" } }, "node_modules/resolve-import": { "version": "1.4.5", "resolved": "https://registry.npmjs.org/resolve-import/-/resolve-import-1.4.5.tgz", "integrity": "sha512-HXb4YqODuuXT7Icq1Z++0g2JmhgbUHSs3VT2xR83gqvAPUikYT2Xk+562KHQgiaNkbBOlPddYrDLsC44qQggzw==", "dependencies": { "glob": "^10.3.3", "walk-up-path": "^3.0.1" }, "engines": { "node": "16 >=16.17.0 || 18 >= 18.6.0 || >=20" }, "funding": { "url": "https://github.com/sponsors/isaacs" } }, "node_modules/restore-cursor": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-4.0.0.tgz", "integrity": "sha512-I9fPXU9geO9bHOt9pHHOhOkYerIMsmVaWB0rA2AI9ERh/+x/i7MV5HKBNrg+ljO5eoPVgCcnFuRjJ9uH6I/3eg==", "dev": true, "dependencies": { "onetime": "^5.1.0", "signal-exit": "^3.0.2" }, "engines": { "node": "^12.20.0 || ^14.13.1 || >=16.0.0" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/restore-cursor/node_modules/signal-exit": { "version": "3.0.7", "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", "dev": true }, "node_modules/retry": { "version": "0.12.0", "resolved": "https://registry.npmjs.org/retry/-/retry-0.12.0.tgz", "integrity": "sha512-9LkiTwjUh6rT555DtE9rTX+BKByPfrMzEAtnlEtdEwr3Nkffwiihqe2bWADg+OQRjt9gl6ICdmB/ZFDCGAtSow==", "dev": true, "engines": { "node": ">= 4" } }, "node_modules/rimraf": { "version": "5.0.7", "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-5.0.7.tgz", "integrity": "sha512-nV6YcJo5wbLW77m+8KjH8aB/7/rxQy9SZ0HY5shnwULfS+9nmTtVXAJET5NdZmCzA4fPI/Hm1wo/Po/4mopOdg==", "dependencies": { "glob": "^10.3.7" }, "bin": { "rimraf": "dist/esm/bin.mjs" }, "engines": { "node": ">=14.18" }, "funding": { "url": "https://github.com/sponsors/isaacs" } }, "node_modules/safer-buffer": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", "dev": true, "optional": true }, "node_modules/scheduler": { "version": "0.23.2", "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.23.2.tgz", "integrity": "sha512-UOShsPwz7NrMUqhR6t0hWjFduvOzbtv7toDH1/hIrfRNIDBnnBWd0CwJTGvTpngVlmwGCdP9/Zl/tVrDqcuYzQ==", "dev": true, "dependencies": { "loose-envify": "^1.1.0" } }, "node_modules/semver": { "version": "7.6.2", "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.2.tgz", "integrity": "sha512-FNAIBWCx9qcRhoHcgcJ0gvU7SN1lYU2ZXuSfl04bSC5OpvDHFyJCjdNHomPXxjQlCBU67YW64PzY7/VIEH7F2w==", "dev": true, "bin": { "semver": "bin/semver.js" }, "engines": { "node": ">=10" } }, "node_modules/shebang-command": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", "dependencies": { "shebang-regex": "^3.0.0" }, "engines": { "node": ">=8" } }, "node_modules/shebang-regex": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", "engines": { "node": ">=8" } }, "node_modules/shiki": { "version": "1.9.0", "resolved": "https://registry.npmjs.org/shiki/-/shiki-1.9.0.tgz", "integrity": "sha512-i6//Lqgn7+7nZA0qVjoYH0085YdNk4MC+tJV4bo+HgjgRMJ0JmkLZzFAuvVioJqLkcGDK5GAMpghZEZkCnwxpQ==", "dev": true, "dependencies": { "@shikijs/core": "1.9.0" } }, "node_modules/signal-exit": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", "engines": { "node": ">=14" }, "funding": { "url": "https://github.com/sponsors/isaacs" } }, "node_modules/sigstore": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/sigstore/-/sigstore-2.3.1.tgz", "integrity": "sha512-8G+/XDU8wNsJOQS5ysDVO0Etg9/2uA5gR9l4ZwijjlwxBcrU6RPfwi2+jJmbP+Ap1Hlp/nVAaEO4Fj22/SL2gQ==", "dev": true, "dependencies": { "@sigstore/bundle": "^2.3.2", "@sigstore/core": "^1.0.0", "@sigstore/protobuf-specs": "^0.3.2", "@sigstore/sign": "^2.3.2", "@sigstore/tuf": "^2.3.4", "@sigstore/verify": "^1.2.1" }, "engines": { "node": "^16.14.0 || >=18.0.0" } }, "node_modules/slice-ansi": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-6.0.0.tgz", "integrity": "sha512-6bn4hRfkTvDfUoEQYkERg0BVF1D0vrX9HEkMl08uDiNWvVvjylLHvZFZWkDo6wjT8tUctbYl1nCOuE66ZTaUtA==", "dev": true, "dependencies": { "ansi-styles": "^6.2.1", "is-fullwidth-code-point": "^4.0.0" }, "engines": { "node": ">=14.16" }, "funding": { "url": "https://github.com/chalk/slice-ansi?sponsor=1" } }, "node_modules/slice-ansi/node_modules/is-fullwidth-code-point": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-4.0.0.tgz", "integrity": "sha512-O4L094N2/dZ7xqVdrXhh9r1KODPJpFms8B5sGdJLPy664AgvXsreZUyCQQNItZRDlYug4xStLjNp/sz3HvBowQ==", "dev": true, "engines": { "node": ">=12" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/smart-buffer": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/smart-buffer/-/smart-buffer-4.2.0.tgz", "integrity": "sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg==", "dev": true, "engines": { "node": ">= 6.0.0", "npm": ">= 3.0.0" } }, "node_modules/socks": { "version": "2.8.3", "resolved": "https://registry.npmjs.org/socks/-/socks-2.8.3.tgz", "integrity": "sha512-l5x7VUUWbjVFbafGLxPWkYsHIhEvmF85tbIeFZWc8ZPtoMyybuEhL7Jye/ooC4/d48FgOjSJXgsF/AJPYCW8Zw==", "dev": true, "dependencies": { "ip-address": "^9.0.5", "smart-buffer": "^4.2.0" }, "engines": { "node": ">= 10.0.0", "npm": ">= 3.0.0" } }, "node_modules/socks-proxy-agent": { "version": "8.0.3", "resolved": "https://registry.npmjs.org/socks-proxy-agent/-/socks-proxy-agent-8.0.3.tgz", "integrity": "sha512-VNegTZKhuGq5vSD6XNKlbqWhyt/40CgoEw8XxD6dhnm8Jq9IEa3nIa4HwnM8XOqU0CdB0BwWVXusqiFXfHB3+A==", "dev": true, "dependencies": { "agent-base": "^7.1.1", "debug": "^4.3.4", "socks": "^2.7.1" }, "engines": { "node": ">= 14" } }, "node_modules/spdx-correct": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.2.0.tgz", "integrity": "sha512-kN9dJbvnySHULIluDHy32WHRUu3Og7B9sbY7tsFLctQkIqnMh3hErYgdMjTYuqmcXX+lK5T1lnUt3G7zNswmZA==", "dev": true, "dependencies": { "spdx-expression-parse": "^3.0.0", "spdx-license-ids": "^3.0.0" } }, "node_modules/spdx-exceptions": { "version": "2.5.0", "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.5.0.tgz", "integrity": "sha512-PiU42r+xO4UbUS1buo3LPJkjlO7430Xn5SVAhdpzzsPHsjbYVflnnFdATgabnLude+Cqu25p6N+g2lw/PFsa4w==", "dev": true }, "node_modules/spdx-expression-parse": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz", "integrity": "sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==", "dev": true, "dependencies": { "spdx-exceptions": "^2.1.0", "spdx-license-ids": "^3.0.0" } }, "node_modules/spdx-license-ids": { "version": "3.0.18", "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.18.tgz", "integrity": "sha512-xxRs31BqRYHwiMzudOrpSiHtZ8i/GeionCBDSilhYRj+9gIcI8wCZTlXZKu9vZIVqViP3dcp9qE5G6AlIaD+TQ==", "dev": true }, "node_modules/sprintf-js": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.1.3.tgz", "integrity": "sha512-Oo+0REFV59/rz3gfJNKQiBlwfHaSESl1pcGyABQsnnIfWOFt6JNj5gCog2U6MLZ//IGYD+nA8nI+mTShREReaA==", "dev": true }, "node_modules/ssri": { "version": "10.0.6", "resolved": "https://registry.npmjs.org/ssri/-/ssri-10.0.6.tgz", "integrity": "sha512-MGrFH9Z4NP9Iyhqn16sDtBpRRNJ0Y2hNa6D65h736fVSaPCHr4DM4sWUNvVaSuC+0OBGhwsrydQwmgfg5LncqQ==", "dev": true, "dependencies": { "minipass": "^7.0.3" }, "engines": { "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, "node_modules/stack-utils": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/stack-utils/-/stack-utils-2.0.6.tgz", "integrity": "sha512-XlkWvfIm6RmsWtNJx+uqtKLS8eqFbxUg0ZzLXqY0caEy9l7hruX8IpiDnjsLavoBgqCCR71TqWO8MaXYheJ3RQ==", "dev": true, "dependencies": { "escape-string-regexp": "^2.0.0" }, "engines": { "node": ">=10" } }, "node_modules/string-length": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/string-length/-/string-length-6.0.0.tgz", "integrity": "sha512-1U361pxZHEQ+FeSjzqRpV+cu2vTzYeWeafXFLykiFlv4Vc0n3njgU8HrMbyik5uwm77naWMuVG8fhEF+Ovb1Kg==", "dev": true, "dependencies": { "strip-ansi": "^7.1.0" }, "engines": { "node": ">=16" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/string-width": { "version": "5.1.2", "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", "dependencies": { "eastasianwidth": "^0.2.0", "emoji-regex": "^9.2.2", "strip-ansi": "^7.0.1" }, "engines": { "node": ">=12" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/string-width-cjs": { "name": "string-width", "version": "4.2.3", "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", "dependencies": { "emoji-regex": "^8.0.0", "is-fullwidth-code-point": "^3.0.0", "strip-ansi": "^6.0.1" }, "engines": { "node": ">=8" } }, "node_modules/string-width-cjs/node_modules/ansi-regex": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", "engines": { "node": ">=8" } }, "node_modules/string-width-cjs/node_modules/emoji-regex": { "version": "8.0.0", "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" }, "node_modules/string-width-cjs/node_modules/strip-ansi": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", "dependencies": { "ansi-regex": "^5.0.1" }, "engines": { "node": ">=8" } }, "node_modules/strip-ansi": { "version": "7.1.0", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", "dependencies": { "ansi-regex": "^6.0.1" }, "engines": { "node": ">=12" }, "funding": { "url": "https://github.com/chalk/strip-ansi?sponsor=1" } }, "node_modules/strip-ansi-cjs": { "name": "strip-ansi", "version": "6.0.1", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", "dependencies": { "ansi-regex": "^5.0.1" }, "engines": { "node": ">=8" } }, "node_modules/strip-ansi-cjs/node_modules/ansi-regex": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", "engines": { "node": ">=8" } }, "node_modules/supports-color": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", "dev": true, "dependencies": { "has-flag": "^4.0.0" }, "engines": { "node": ">=8" } }, "node_modules/sync-content": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/sync-content/-/sync-content-1.0.2.tgz", "integrity": "sha512-znd3rYiiSxU3WteWyS9a6FXkTA/Wjk8WQsOyzHbineeL837dLn3DA4MRhsIX3qGcxDMH6+uuFV4axztssk7wEQ==", "dependencies": { "glob": "^10.2.6", "mkdirp": "^3.0.1", "path-scurry": "^1.9.2", "rimraf": "^5.0.1" }, "bin": { "sync-content": "dist/mjs/bin.mjs" }, "engines": { "node": ">=14" }, "funding": { "url": "https://github.com/sponsors/isaacs" } }, "node_modules/tap": { "version": "19.2.5", "resolved": "https://registry.npmjs.org/tap/-/tap-19.2.5.tgz", "integrity": "sha512-Mz7MznUuKCqrN9dr0s8REt6zLg6WLNrvGXwDSaUyPO73dpXXjakYA7YVKRWu6TBnj7NsSYKuHXpQFROlqZ2KTg==", "dev": true, "dependencies": { "@tapjs/after": "1.1.31", "@tapjs/after-each": "2.0.8", "@tapjs/asserts": "2.0.8", "@tapjs/before": "2.0.8", "@tapjs/before-each": "2.0.8", "@tapjs/chdir": "1.1.4", "@tapjs/core": "2.1.6", "@tapjs/filter": "2.0.8", "@tapjs/fixture": "2.0.8", "@tapjs/intercept": "2.0.8", "@tapjs/mock": "2.1.6", "@tapjs/node-serialize": "2.0.8", "@tapjs/run": "2.1.7", "@tapjs/snapshot": "2.0.8", "@tapjs/spawn": "2.0.8", "@tapjs/stdin": "2.0.8", "@tapjs/test": "2.2.4", "@tapjs/typescript": "1.4.13", "@tapjs/worker": "2.0.8", "resolve-import": "^1.4.5" }, "bin": { "tap": "dist/esm/run.mjs" }, "engines": { "node": "16 >=16.17.0 || 18 >= 18.6.0 || >=20" }, "funding": { "url": "https://github.com/sponsors/isaacs" } }, "node_modules/tap-parser": { "version": "16.0.1", "resolved": "https://registry.npmjs.org/tap-parser/-/tap-parser-16.0.1.tgz", "integrity": "sha512-vKianJzSSzLkJ3bHBwzvZDDRi9yGMwkRANJxwPAjAue50owB8rlluYySmTN4tZVH0nsh6stvrQbg9kuCL5svdg==", "dev": true, "dependencies": { "events-to-array": "^2.0.3", "tap-yaml": "2.2.2" }, "bin": { "tap-parser": "bin/cmd.cjs" }, "engines": { "node": "16 >=16.17.0 || 18 >= 18.6.0 || >=20" } }, "node_modules/tap-yaml": { "version": "2.2.2", "resolved": "https://registry.npmjs.org/tap-yaml/-/tap-yaml-2.2.2.tgz", "integrity": "sha512-MWG4OpAKtNoNVjCz/BqlDJiwTM99tiHRhHPS4iGOe1ZS0CgM4jSFH92lthSFvvy4EdDjQZDV7uYqUFlU9JuNhw==", "dev": true, "dependencies": { "yaml": "^2.4.1", "yaml-types": "^0.3.0" }, "engines": { "node": "16 >=16.17.0 || 18 >= 18.6.0 || >=20" } }, "node_modules/tar": { "version": "6.2.1", "resolved": "https://registry.npmjs.org/tar/-/tar-6.2.1.tgz", "integrity": "sha512-DZ4yORTwrbTj/7MZYq2w+/ZFdI6OZ/f9SFHR+71gIVUZhOQPHzVCLpvRnPgyaMpfWxxk/4ONva3GQSyNIKRv6A==", "dev": true, "dependencies": { "chownr": "^2.0.0", "fs-minipass": "^2.0.0", "minipass": "^5.0.0", "minizlib": "^2.1.1", "mkdirp": "^1.0.3", "yallist": "^4.0.0" }, "engines": { "node": ">=10" } }, "node_modules/tar/node_modules/fs-minipass": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-2.1.0.tgz", "integrity": "sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg==", "dev": true, "dependencies": { "minipass": "^3.0.0" }, "engines": { "node": ">= 8" } }, "node_modules/tar/node_modules/fs-minipass/node_modules/minipass": { "version": "3.3.6", "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", "dev": true, "dependencies": { "yallist": "^4.0.0" }, "engines": { "node": ">=8" } }, "node_modules/tar/node_modules/minipass": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/minipass/-/minipass-5.0.0.tgz", "integrity": "sha512-3FnjYuehv9k6ovOEbyOswadCDPX1piCfhV8ncmYtHOjuPwylVWsghTLo7rabjC3Rx5xD4HDx8Wm1xnMF7S5qFQ==", "dev": true, "engines": { "node": ">=8" } }, "node_modules/tar/node_modules/mkdirp": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", "dev": true, "bin": { "mkdirp": "bin/cmd.js" }, "engines": { "node": ">=10" } }, "node_modules/tcompare": { "version": "7.0.1", "resolved": "https://registry.npmjs.org/tcompare/-/tcompare-7.0.1.tgz", "integrity": "sha512-JN5s7hgmg/Ya5HxZqCnywT+XiOGRFcJRgYhtMyt/1m+h0yWpWwApO7HIM8Bpwyno9hI151ljjp5eAPCHhIGbpQ==", "dev": true, "dependencies": { "diff": "^5.2.0", "react-element-to-jsx-string": "^15.0.0" }, "engines": { "node": "16 >=16.17.0 || 18 >= 18.6.0 || >=20" } }, "node_modules/test-exclude": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-6.0.0.tgz", "integrity": "sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w==", "dev": true, "dependencies": { "@istanbuljs/schema": "^0.1.2", "glob": "^7.1.4", "minimatch": "^3.0.4" }, "engines": { "node": ">=8" } }, "node_modules/test-exclude/node_modules/brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", "dev": true, "dependencies": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" } }, "node_modules/test-exclude/node_modules/glob": { "version": "7.2.3", "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", "deprecated": "Glob versions prior to v9 are no longer supported", "dev": true, "dependencies": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", "inherits": "2", "minimatch": "^3.1.1", "once": "^1.3.0", "path-is-absolute": "^1.0.0" }, "engines": { "node": "*" }, "funding": { "url": "https://github.com/sponsors/isaacs" } }, "node_modules/test-exclude/node_modules/minimatch": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", "dev": true, "dependencies": { "brace-expansion": "^1.1.7" }, "engines": { "node": "*" } }, "node_modules/to-regex-range": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", "dependencies": { "is-number": "^7.0.0" }, "engines": { "node": ">=8.0" } }, "node_modules/trivial-deferred": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/trivial-deferred/-/trivial-deferred-2.0.0.tgz", "integrity": "sha512-iGbM7X2slv9ORDVj2y2FFUq3cP/ypbtu2nQ8S38ufjL0glBABvmR9pTdsib1XtS2LUhhLMbelaBUaf/s5J3dSw==", "dev": true, "engines": { "node": ">= 8" } }, "node_modules/tshy": { "version": "1.15.1", "resolved": "https://registry.npmjs.org/tshy/-/tshy-1.15.1.tgz", "integrity": "sha512-7p30vmXaNX7OL1yLy/MYUtO0SJOm9fQSnzk3DXaM+LmQosooCB4elVeHAGIIZdABhL2E8dx5t/5msR5lh0xnaQ==", "dev": true, "dependencies": { "chalk": "^5.3.0", "chokidar": "^3.6.0", "foreground-child": "^3.1.1", "minimatch": "^9.0.4", "mkdirp": "^3.0.1", "polite-json": "^4.0.1", "resolve-import": "^1.4.5", "rimraf": "^5.0.1", "sync-content": "^1.0.2", "typescript": "^5.4.5", "walk-up-path": "^3.0.1" }, "bin": { "tshy": "dist/esm/index.js" }, "engines": { "node": "16 >=16.17 || 18 >=18.15.0 || >=20.6.1" } }, "node_modules/tshy/node_modules/polite-json": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/polite-json/-/polite-json-4.0.1.tgz", "integrity": "sha512-8LI5ZeCPBEb4uBbcYKNVwk4jgqNx1yHReWoW4H4uUihWlSqZsUDfSITrRhjliuPgxsNPFhNSudGO2Zu4cbWinQ==", "dev": true, "engines": { "node": "^14.17.0 || ^16.13.0 || >=18.0.0" }, "funding": { "url": "https://github.com/sponsors/isaacs" } }, "node_modules/tslib": { "version": "2.6.3", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.3.tgz", "integrity": "sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==", "dev": true }, "node_modules/tuf-js": { "version": "2.2.1", "resolved": "https://registry.npmjs.org/tuf-js/-/tuf-js-2.2.1.tgz", "integrity": "sha512-GwIJau9XaA8nLVbUXsN3IlFi7WmQ48gBUrl3FTkkL/XLu/POhBzfmX9hd33FNMX1qAsfl6ozO1iMmW9NC8YniA==", "dev": true, "dependencies": { "@tufjs/models": "2.0.1", "debug": "^4.3.4", "make-fetch-happen": "^13.0.1" }, "engines": { "node": "^16.14.0 || >=18.0.0" } }, "node_modules/type-fest": { "version": "0.12.0", "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.12.0.tgz", "integrity": "sha512-53RyidyjvkGpnWPMF9bQgFtWp+Sl8O2Rp13VavmJgfAP9WWG6q6TkrKU8iyJdnwnfgHI6k2hTlgqH4aSdjoTbg==", "dev": true, "engines": { "node": ">=10" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/typedoc": { "version": "0.26.2", "resolved": "https://registry.npmjs.org/typedoc/-/typedoc-0.26.2.tgz", "integrity": "sha512-q/t+M+PZqhN9gPWLBZ3CCvP+KT8O1tyYkSzEYbcQ6mo89avdIrMlBEl3vfo5BgSzwC6Lbmq0W64E8RkY+eVsLA==", "dev": true, "dependencies": { "lunr": "^2.3.9", "markdown-it": "^14.1.0", "minimatch": "^9.0.4", "shiki": "^1.9.0", "yaml": "^2.4.5" }, "bin": { "typedoc": "bin/typedoc" }, "engines": { "node": ">= 18" }, "peerDependencies": { "typescript": "4.6.x || 4.7.x || 4.8.x || 4.9.x || 5.0.x || 5.1.x || 5.2.x || 5.3.x || 5.4.x || 5.5.x" } }, "node_modules/typescript": { "version": "5.5.2", "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.5.2.tgz", "integrity": "sha512-NcRtPEOsPFFWjobJEtfihkLCZCXZt/os3zf8nTxjVH3RvTSxjrCamJpbExGvYOF+tFHc3pA65qpdwPbzjohhew==", "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" }, "engines": { "node": ">=14.17" } }, "node_modules/uc.micro": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/uc.micro/-/uc.micro-2.1.0.tgz", "integrity": "sha512-ARDJmphmdvUk6Glw7y9DQ2bFkKBHwQHLi2lsaH6PPmz/Ka9sFOBsBluozhDltWmnv9u/cF6Rt87znRTPV+yp/A==", "dev": true }, "node_modules/undici-types": { "version": "5.26.5", "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==", "dev": true }, "node_modules/unique-filename": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/unique-filename/-/unique-filename-3.0.0.tgz", "integrity": "sha512-afXhuC55wkAmZ0P18QsVE6kp8JaxrEokN2HGIoIVv2ijHQd419H0+6EigAFcIzXeMIkcIkNBpB3L/DXB3cTS/g==", "dev": true, "dependencies": { "unique-slug": "^4.0.0" }, "engines": { "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, "node_modules/unique-slug": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/unique-slug/-/unique-slug-4.0.0.tgz", "integrity": "sha512-WrcA6AyEfqDX5bWige/4NQfPZMtASNVxdmWR76WESYQVAACSgWcR6e9i0mofqqBxYFtL4oAxPIptY73/0YE1DQ==", "dev": true, "dependencies": { "imurmurhash": "^0.1.4" }, "engines": { "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, "node_modules/uuid": { "version": "8.3.2", "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", "dev": true, "bin": { "uuid": "dist/bin/uuid" } }, "node_modules/v8-compile-cache-lib": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz", "integrity": "sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==", "dev": true }, "node_modules/v8-to-istanbul": { "version": "9.3.0", "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-9.3.0.tgz", "integrity": "sha512-kiGUalWN+rgBJ/1OHZsBtU4rXZOfj/7rKQxULKlIzwzQSvMJUUNgPwJEEh7gU6xEVxC0ahoOBvN2YI8GH6FNgA==", "dev": true, "dependencies": { "@jridgewell/trace-mapping": "^0.3.12", "@types/istanbul-lib-coverage": "^2.0.1", "convert-source-map": "^2.0.0" }, "engines": { "node": ">=10.12.0" } }, "node_modules/v8-to-istanbul/node_modules/@jridgewell/trace-mapping": { "version": "0.3.25", "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz", "integrity": "sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==", "dev": true, "dependencies": { "@jridgewell/resolve-uri": "^3.1.0", "@jridgewell/sourcemap-codec": "^1.4.14" } }, "node_modules/validate-npm-package-license": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==", "dev": true, "dependencies": { "spdx-correct": "^3.0.0", "spdx-expression-parse": "^3.0.0" } }, "node_modules/validate-npm-package-name": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/validate-npm-package-name/-/validate-npm-package-name-5.0.1.tgz", "integrity": "sha512-OljLrQ9SQdOUqTaQxqL5dEfZWrXExyyWsozYlAWFawPVNuD83igl7uJD2RTkNMbniIYgt8l81eCJGIdQF7avLQ==", "dev": true, "engines": { "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, "node_modules/walk-up-path": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/walk-up-path/-/walk-up-path-3.0.1.tgz", "integrity": "sha512-9YlCL/ynK3CTlrSRrDxZvUauLzAswPCrsaCgilqFevUYpeEW0/3ScEjaa3kbW/T0ghhkEr7mv+fpjqn1Y1YuTA==" }, "node_modules/which": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", "dependencies": { "isexe": "^2.0.0" }, "bin": { "node-which": "bin/node-which" }, "engines": { "node": ">= 8" } }, "node_modules/widest-line": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/widest-line/-/widest-line-4.0.1.tgz", "integrity": "sha512-o0cyEG0e8GPzT4iGHphIOh0cJOV8fivsXxddQasHPHfoZf1ZexrfeA21w2NaEN1RHE+fXlfISmOE8R9N3u3Qig==", "dev": true, "dependencies": { "string-width": "^5.0.1" }, "engines": { "node": ">=12" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/wrap-ansi": { "version": "8.1.0", "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz", "integrity": "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==", "dependencies": { "ansi-styles": "^6.1.0", "string-width": "^5.0.1", "strip-ansi": "^7.0.1" }, "engines": { "node": ">=12" }, "funding": { "url": "https://github.com/chalk/wrap-ansi?sponsor=1" } }, "node_modules/wrap-ansi-cjs": { "name": "wrap-ansi", "version": "7.0.0", "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", "dependencies": { "ansi-styles": "^4.0.0", "string-width": "^4.1.0", "strip-ansi": "^6.0.0" }, "engines": { "node": ">=10" }, "funding": { "url": "https://github.com/chalk/wrap-ansi?sponsor=1" } }, "node_modules/wrap-ansi-cjs/node_modules/ansi-regex": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", "engines": { "node": ">=8" } }, "node_modules/wrap-ansi-cjs/node_modules/ansi-styles": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "dependencies": { "color-convert": "^2.0.1" }, "engines": { "node": ">=8" }, "funding": { "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, "node_modules/wrap-ansi-cjs/node_modules/emoji-regex": { "version": "8.0.0", "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" }, "node_modules/wrap-ansi-cjs/node_modules/string-width": { "version": "4.2.3", "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", "dependencies": { "emoji-regex": "^8.0.0", "is-fullwidth-code-point": "^3.0.0", "strip-ansi": "^6.0.1" }, "engines": { "node": ">=8" } }, "node_modules/wrap-ansi-cjs/node_modules/strip-ansi": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", "dependencies": { "ansi-regex": "^5.0.1" }, "engines": { "node": ">=8" } }, "node_modules/wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", "dev": true }, "node_modules/ws": { "version": "8.17.1", "resolved": "https://registry.npmjs.org/ws/-/ws-8.17.1.tgz", "integrity": "sha512-6XQFvXTkbfUOZOKKILFG1PDK2NDQs4azKQl26T0YS5CxqWLgXajbPZ+h4gZekJyRqFU8pvnbAbbs/3TgRPy+GQ==", "dev": true, "engines": { "node": ">=10.0.0" }, "peerDependencies": { "bufferutil": "^4.0.1", "utf-8-validate": ">=5.0.2" }, "peerDependenciesMeta": { "bufferutil": { "optional": true }, "utf-8-validate": { "optional": true } } }, "node_modules/y18n": { "version": "5.0.8", "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", "dev": true, "engines": { "node": ">=10" } }, "node_modules/yallist": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", "dev": true }, "node_modules/yaml": { "version": "2.4.5", "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.4.5.tgz", "integrity": "sha512-aBx2bnqDzVOyNKfsysjA2ms5ZlnjSAW2eG3/L5G/CSujfjLJTJsEw1bGw8kCf04KodQWk1pxlGnZ56CRxiawmg==", "dev": true, "bin": { "yaml": "bin.mjs" }, "engines": { "node": ">= 14" } }, "node_modules/yaml-types": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/yaml-types/-/yaml-types-0.3.0.tgz", "integrity": "sha512-i9RxAO/LZBiE0NJUy9pbN5jFz5EasYDImzRkj8Y81kkInTi1laia3P3K/wlMKzOxFQutZip8TejvQP/DwgbU7A==", "dev": true, "engines": { "node": ">= 16", "npm": ">= 7" }, "peerDependencies": { "yaml": "^2.3.0" } }, "node_modules/yargs": { "version": "17.7.2", "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", "dev": true, "dependencies": { "cliui": "^8.0.1", "escalade": "^3.1.1", "get-caller-file": "^2.0.5", "require-directory": "^2.1.1", "string-width": "^4.2.3", "y18n": "^5.0.5", "yargs-parser": "^21.1.1" }, "engines": { "node": ">=12" } }, "node_modules/yargs-parser": { "version": "21.1.1", "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", "dev": true, "engines": { "node": ">=12" } }, "node_modules/yargs/node_modules/ansi-regex": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", "dev": true, "engines": { "node": ">=8" } }, "node_modules/yargs/node_modules/emoji-regex": { "version": "8.0.0", "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", "dev": true }, "node_modules/yargs/node_modules/string-width": { "version": "4.2.3", "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", "dev": true, "dependencies": { "emoji-regex": "^8.0.0", "is-fullwidth-code-point": "^3.0.0", "strip-ansi": "^6.0.1" }, "engines": { "node": ">=8" } }, "node_modules/yargs/node_modules/strip-ansi": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", "dev": true, "dependencies": { "ansi-regex": "^5.0.1" }, "engines": { "node": ">=8" } }, "node_modules/yocto-queue": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", "dev": true, "engines": { "node": ">=10" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/yoga-wasm-web": { "version": "0.3.3", "resolved": "https://registry.npmjs.org/yoga-wasm-web/-/yoga-wasm-web-0.3.3.tgz", "integrity": "sha512-N+d4UJSJbt/R3wqY7Coqs5pcV0aUj2j9IaQ3rNj9bVCLld8tTGKRa2USARjnvZJWVx1NDmQev8EknoczaOQDOA==", "dev": true } } } isaacs-tshy-bded619/package.json000066400000000000000000000040131464240215000167240ustar00rootroot00000000000000{ "name": "tshy", "version": "1.18.0", "description": "TypeScript HYbridizer - Hybrid (CommonJS/ESM) TypeScript node package builder", "author": "Isaac Z. Schlueter (https://izs.me)", "license": "BlueOak-1.0.0", "type": "module", "bin": "./dist/esm/index.js", "files": [ "dist" ], "dependencies": { "chalk": "^5.3.0", "chokidar": "^3.6.0", "foreground-child": "^3.1.1", "minimatch": "^9.0.4", "mkdirp": "^3.0.1", "polite-json": "^5.0.0", "resolve-import": "^1.4.5", "rimraf": "^5.0.1", "sync-content": "^1.0.2", "typescript": "5", "walk-up-path": "^3.0.1" }, "scripts": { "preversion": "npm test", "postversion": "npm publish", "prepublishOnly": "git push origin --follow-tags", "prepare": "tsc -p .tshy/esm.json && bash scripts/fixup.sh", "pretest": "npm run prepare", "presnap": "npm run prepare", "format": "prettier --write . --ignore-path ./.prettierignore --cache", "typedoc": "typedoc", "test": "tap", "snap": "tap" }, "tap": { "coverage-map": "map.js" }, "engines": { "node": "16 >=16.17 || 18 >=18.15.0 || >=20.6.1" }, "repository": "https://github.com/isaacs/tshy", "keywords": [ "typescript", "tsc", "hybrid", "esm", "commonjs", "build" ], "devDependencies": { "@types/node": "^20.12.7", "prettier": "^3.3.2", "tap": "^19.2.1", "typedoc": "^0.26.2" }, "prettier": { "experimentalTernaries": true, "semi": false, "printWidth": 70, "tabWidth": 2, "useTabs": false, "singleQuote": true, "jsxSingleQuote": false, "bracketSameLine": true, "arrowParens": "avoid", "endOfLine": "lf" }, "tshy": { "dialects": [ "esm" ], "exports": { "./package.json": "./package.json", ".": "./src/index.ts" } }, "exports": { "./package.json": "./package.json", ".": { "import": { "types": "./dist/esm/index.d.ts", "default": "./dist/esm/index.js" } } } } isaacs-tshy-bded619/scripts/000077500000000000000000000000001464240215000161275ustar00rootroot00000000000000isaacs-tshy-bded619/scripts/fixup.sh000066400000000000000000000001521464240215000176140ustar00rootroot00000000000000#!/usr/bin/env bash chmod 0755 .tshy-build/esm/index.js sync-content .tshy-build dist rm -rf .tshy-build isaacs-tshy-bded619/src/000077500000000000000000000000001464240215000152275ustar00rootroot00000000000000isaacs-tshy-bded619/src/add-dot.ts000066400000000000000000000001241464240215000171100ustar00rootroot00000000000000import { join } from 'node:path/posix' export default (s: string) => `./${join(s)}` isaacs-tshy-bded619/src/bins.ts000066400000000000000000000005371464240215000165370ustar00rootroot00000000000000// chmod bins after build import { chmodSync } from 'fs' import { resolve } from 'path' import pkg from './package.js' export default () => { const { bin } = pkg if (!bin) return if (typeof bin === 'string') { chmodSync(resolve(bin), 0o755) } else { for (const v of Object.values(bin)) { chmodSync(resolve(v), 0o755) } } } isaacs-tshy-bded619/src/build-commonjs.ts000066400000000000000000000032431464240215000205230ustar00rootroot00000000000000import chalk from 'chalk' import { spawnSync } from 'node:child_process' import { relative, resolve } from 'node:path/posix' import buildFail from './build-fail.js' import config from './config.js' import * as console from './console.js' import ifExist from './if-exist.js' import polyfills from './polyfills.js' import setFolderDialect from './set-folder-dialect.js' import './tsconfig.js' import tsc from './which-tsc.js' const node = process.execPath const { commonjsDialects = [] } = config export const buildCommonJS = () => { setFolderDialect('src', 'commonjs') for (const d of ['commonjs', ...commonjsDialects]) { const pf = polyfills.get(d === 'commonjs' ? 'cjs' : d) console.debug(chalk.cyan.dim('building ' + d)) const res = spawnSync(node, [tsc, '-p', `.tshy/${d}.json`], { stdio: 'inherit', }) if (res.status || res.signal) { setFolderDialect('src') return buildFail(res) } setFolderDialect('.tshy-build/' + d, 'commonjs') for (const [override, orig] of pf?.map.entries() ?? []) { const stemFrom = resolve( `.tshy-build/${d}`, relative(resolve('src'), resolve(override)), ).replace(/\.cts$/, '') const stemTo = resolve( `.tshy-build/${d}`, relative(resolve('src'), resolve(orig)), ).replace(/\.tsx?$/, '') const stemToPath = `${stemTo}.js.map` const stemToDtsPath = `${stemTo}.d.ts.map` ifExist.unlink(stemToPath) ifExist.unlink(stemToDtsPath) ifExist.rename(`${stemFrom}.cjs`, `${stemTo}.js`) ifExist.rename(`${stemFrom}.d.cts`, `${stemTo}.d.ts`) } console.error(chalk.cyan.bold('built commonjs')) } setFolderDialect('src') } isaacs-tshy-bded619/src/build-esm.ts000066400000000000000000000030221464240215000174550ustar00rootroot00000000000000import chalk from 'chalk' import { spawnSync } from 'node:child_process' import { relative, resolve } from 'node:path' import buildFail from './build-fail.js' import config from './config.js' import * as console from './console.js' import ifExist from './if-exist.js' import polyfills from './polyfills.js' import setFolderDialect from './set-folder-dialect.js' import './tsconfig.js' import tsc from './which-tsc.js' const node = process.execPath const { esmDialects = [] } = config export const buildESM = () => { setFolderDialect('src', 'esm') for (const d of ['esm', ...esmDialects]) { const pf = polyfills.get(d) console.debug(chalk.cyan.dim('building ' + d)) const res = spawnSync(node, [tsc, '-p', `.tshy/${d}.json`], { stdio: 'inherit', }) if (res.status || res.signal) { setFolderDialect('src') return buildFail(res) } setFolderDialect('.tshy-build/' + d, 'esm') for (const [override, orig] of pf?.map.entries() ?? []) { const stemFrom = resolve( `.tshy-build/${d}`, relative(resolve('src'), resolve(override)), ).replace(/\.mts$/, '') const stemTo = resolve( `.tshy-build/${d}`, relative(resolve('src'), resolve(orig)), ).replace(/\.tsx?$/, '') ifExist.unlink(`${stemTo}.js.map`) ifExist.unlink(`${stemTo}.d.ts.map`) ifExist.rename(`${stemFrom}.mjs`, `${stemTo}.js`) ifExist.rename(`${stemFrom}.d.mts`, `${stemTo}.d.ts`) } console.error(chalk.cyan.bold('built ' + d)) } setFolderDialect('src') } isaacs-tshy-bded619/src/build-fail.ts000066400000000000000000000010471464240215000176110ustar00rootroot00000000000000import { SpawnSyncReturns } from 'node:child_process' import * as console from './console.js' import fail from './fail.js' import setFolderDialect from './set-folder-dialect.js' import './tsconfig.js' import { unlink as unlinkImports } from './unbuilt-imports.js' import { unlink as unlinkSelfDep } from './self-link.js' import pkg from './package.js' export default (res: SpawnSyncReturns) => { setFolderDialect('src') unlinkImports(pkg, 'src') unlinkSelfDep(pkg, 'src') fail('build failed') console.error(res) process.exit(1) } isaacs-tshy-bded619/src/build-live-commonjs.ts000066400000000000000000000031201464240215000214520ustar00rootroot00000000000000import chalk from 'chalk' import { linkSync, mkdirSync } from 'node:fs' import { dirname } from 'node:path' import { relative, resolve } from 'node:path/posix' import config from './config.js' import * as console from './console.js' import ifExist from './if-exist.js' import polyfills from './polyfills.js' import setFolderDialect from './set-folder-dialect.js' import sources from './sources.js' import './tsconfig.js' const { commonjsDialects = [] } = config // don't actually do a build, just link files into places. export const buildLiveCommonJS = () => { for (const d of ['commonjs', ...commonjsDialects]) { const pf = polyfills.get(d === 'commonjs' ? 'cjs' : d) console.debug(chalk.cyan.dim('linking ' + d)) for (const s of sources) { const source = s.substring('./src/'.length) const target = resolve(`.tshy-build/${d}/${source}`) mkdirSync(dirname(target), { recursive: true }) linkSync(s, target) } setFolderDialect('.tshy-build/' + d, 'commonjs') for (const [override, orig] of pf?.map.entries() ?? []) { const stemFrom = resolve( `.tshy-build/${d}`, relative(resolve('src'), resolve(override)), ).replace(/\.cts$/, '') const stemTo = resolve( `.tshy-build/${d}`, relative(resolve('src'), resolve(orig)), ).replace(/\.tsx?$/, '') ifExist.unlink(`${stemTo}.js.map`) ifExist.unlink(`${stemTo}.d.ts.map`) ifExist.rename(`${stemFrom}.cjs`, `${stemTo}.js`) ifExist.rename(`${stemFrom}.d.cts`, `${stemTo}.d.ts`) } console.error(chalk.cyan.bold('linked commonjs')) } } isaacs-tshy-bded619/src/build-live-esm.ts000066400000000000000000000026741464240215000204260ustar00rootroot00000000000000import chalk from 'chalk' import { linkSync, mkdirSync } from 'node:fs' import { dirname, relative, resolve } from 'node:path' import config from './config.js' import * as console from './console.js' import ifExist from './if-exist.js' import polyfills from './polyfills.js' import setFolderDialect from './set-folder-dialect.js' import sources from './sources.js' import './tsconfig.js' const { esmDialects = [] } = config export const buildLiveESM = () => { for (const d of ['esm', ...esmDialects]) { const pf = polyfills.get(d) console.debug(chalk.cyan.dim('linking ' + d)) for (const s of sources) { const source = s.substring('./src/'.length) const target = resolve(`.tshy-build/${d}/${source}`) mkdirSync(dirname(target), { recursive: true }) linkSync(s, target) } setFolderDialect('.tshy-build/' + d, 'esm') for (const [override, orig] of pf?.map.entries() ?? []) { const stemFrom = resolve( `.tshy-build/${d}`, relative(resolve('src'), resolve(override)), ).replace(/\.mts$/, '') const stemTo = resolve( `.tshy-build/${d}`, relative(resolve('src'), resolve(orig)), ).replace(/\.tsx?$/, '') ifExist.unlink(`${stemTo}.js.map`) ifExist.unlink(`${stemTo}.d.ts.map`) ifExist.rename(`${stemFrom}.mjs`, `${stemTo}.js`) ifExist.rename(`${stemFrom}.d.mts`, `${stemTo}.d.ts`) } console.error(chalk.cyan.bold('linked ' + d)) } } isaacs-tshy-bded619/src/build.ts000066400000000000000000000040211464240215000166730ustar00rootroot00000000000000import chalk from 'chalk' import config from './config.js' import { syncContentSync } from 'sync-content' import bins from './bins.js' import { buildCommonJS } from './build-commonjs.js' import { buildESM } from './build-esm.js' import cleanBuildTmp from './clean-build-tmp.js' import * as console from './console.js' import dialects from './dialects.js' import pkg from './package.js' import { link as linkSelfDep, unlink as unlinkSelfDep, } from './self-link.js' import './tsconfig.js' import { link as linkImports, save as saveImports, unlink as unlinkImports, } from './unbuilt-imports.js' import writePackage from './write-package.js' import { buildLiveESM } from './build-live-esm.js' import { buildLiveCommonJS } from './build-live-commonjs.js' export default async () => { cleanBuildTmp() linkSelfDep(pkg, 'src') await linkImports(pkg, 'src') const liveDev = config.liveDev && process.env.npm_command !== 'publish' && process.env.npm_command !== 'pack' const esm = liveDev ? buildLiveESM : buildESM const commonjs = liveDev ? buildLiveCommonJS : buildCommonJS if (dialects.includes('esm')) esm() if (dialects.includes('commonjs')) commonjs() await unlinkImports(pkg, 'src') unlinkSelfDep(pkg, 'src') console.debug(chalk.cyan.dim('moving to ./dist')) syncContentSync('.tshy-build', 'dist') console.debug(chalk.cyan.dim('cleaning build temp dir')) cleanBuildTmp() linkSelfDep(pkg, 'dist') if (pkg.imports) { console.debug('linking package imports', pkg.imports) if (dialects.includes('commonjs')) await linkImports(pkg, 'dist/commonjs', true) if (dialects.includes('esm')) await linkImports(pkg, 'dist/esm', true) if (saveImports('dist/.tshy-link-imports.mjs')) { pkg.scripts = pkg.scripts || {} pkg.scripts.preinstall = 'node -e "import(process.argv[1]).catch(()=>{})" ' + 'dist/.tshy-link-imports.mjs' } } console.debug(chalk.cyan.dim('chmod bins')) bins() console.debug(chalk.cyan.dim('write package.json')) writePackage() } isaacs-tshy-bded619/src/built-imports.ts000066400000000000000000000011661464240215000204150ustar00rootroot00000000000000// merge tshy.imports with package.json imports import { Package } from './types.js' // strip the ./src/ and turn ts extension into js for built imports // leave unbuilt imports alone, they'll be symlinked export default (pkg: Package): Package['imports'] => { const { imports } = pkg if (!imports) return undefined return Object.fromEntries( Object.entries(imports).map(([k, v]) => [ k, typeof v === 'string' && v.startsWith('./src/') ? './' + v .substring('./src/'.length) .replace(/\.([cm]?)ts$/, '.$1js') .replace(/\.tsx$/, '.js') : v, ]), ) } isaacs-tshy-bded619/src/clean-build-tmp.ts000066400000000000000000000044601464240215000205600ustar00rootroot00000000000000// Remove the .tshy-build folder, but ONLY if // the "incremental" config value is not set, or if // it does not contain any tsbuildinfo files. // If we are in incremental mode, and have tsbuildinfo files, // then find and remove any files here that do not have a matching // source file in ./src import { readdirSync } from 'fs' import { parse } from 'path' import { rimrafSync } from 'rimraf' import * as console from './console.js' import readTypescriptConfig from './read-typescript-config.js' const cleanRemovedOutputs = (path: string, root: string) => { const entries = readdirSync(`${root}/${path}`, { withFileTypes: true, }) let sources: Set | undefined = undefined try { sources = new Set(readdirSync(`src/${path}`)) } catch {} // directory was removed if (!sources) { return rimrafSync(`${root}/${path}`) } for (const e of entries) { const outputFile = `${path}/${e.name}` if (e.isDirectory()) { cleanRemovedOutputs(outputFile, root) continue } let { ext, name } = parse(outputFile) if (ext === '.map') { continue } if (name.endsWith('.d') && ext.endsWith('ts')) { ext = '.d' + ext name = name.substring(0, name.length - '.d'.length) } const inputSearch = ext === '.js' || ext === '.d.ts' ? ['.tsx', '.ts'] : ext === '.mjs' || ext === '.d.mts' ? ['.mts'] : ext === '.cjs' || ext === '.d.cts' ? ['.cts'] : [] inputSearch.push(ext) let del = true for (const ext of inputSearch) { if (sources.has(`${name}${ext}`)) { del = false break } } if (del) { console.debug('removing output file', outputFile) rimrafSync([ `${root}/${outputFile}`, `${root}/${outputFile}.map`, ]) } } } export default () => { const config = readTypescriptConfig() if (config.options.incremental !== true) { return rimrafSync('.tshy-build') } let buildInfos: string[] | undefined = undefined try { buildInfos = readdirSync('.tshy-build/.tshy') } catch {} if (!buildInfos?.length) { return rimrafSync('.tshy-build') } // delete anything that has been removed from src. for (const dialect of readdirSync('.tshy-build')) { if (dialect === '.tshy') continue cleanRemovedOutputs('.', `.tshy-build/${dialect}`) } } isaacs-tshy-bded619/src/config.ts000066400000000000000000000075661464240215000170620ustar00rootroot00000000000000// get the config and package and stuff import chalk from 'chalk' import { Minimatch } from 'minimatch' import * as console from './console.js' import fail from './fail.js' import pkg from './package.js' import sources from './sources.js' import { Package, TshyConfig, TshyConfigMaybeGlobExports, } from './types.js' import validDialects from './valid-dialects.js' import validExclude from './valid-exclude.js' import validExports from './valid-exports.js' import validExtraDialects from './valid-extra-dialects.js' import validImports from './valid-imports.js' import validProject from './valid-project.js' const validBoolean = (e: Record, name: string) => { const v = e[name] if (v === undefined || typeof v === 'boolean') return true fail(`tshy.${name} must be a boolean value if specified, got: ` + v) return process.exit(1) } const isStringArray = (e: any): e is string[] => !!e && Array.isArray(e) && !e.some(e => typeof e !== 'string') const validConfig = (e: any): e is TshyConfigMaybeGlobExports => !!e && typeof e === 'object' && (e.exports === undefined || typeof e.exports === 'string' || isStringArray(e.exports) || validExports(e.exports)) && (e.dialects === undefined || validDialects(e.dialects)) && (e.project === undefined || validProject(e.project)) && (e.exclude === undefined || validExclude(e.exclude)) && validExtraDialects(e) && validBoolean(e, 'selfLink') && validBoolean(e, 'main') && validBoolean(e, 'liveDev') const match = (e: string, pattern: Minimatch[]): boolean => pattern.some(m => m.match(e)) const parsePattern = (p: string | string[]): Minimatch[] => Array.isArray(p) ? p.map(p => new Minimatch(p.replace(/^\.\//, ''))) : parsePattern([p]) const getConfig = ( pkg: Package, sources: Set, ): TshyConfig => { const tshy: TshyConfigMaybeGlobExports = validConfig(pkg.tshy) ? pkg.tshy : {} let exportsConfig = tshy.exports if ( typeof exportsConfig === 'string' || Array.isArray(exportsConfig) ) { // Strip off the `./src` prefix and the extension // exports: "src/**/*.ts" => exports: {"./foo": "./src/foo.ts"} const exp: Exclude = {} const pattern: string | string[] = exportsConfig const m = parsePattern(pattern) for (const e of sources) { if (!match(e.replace(/^\.\//, ''), m)) continue // index is main, anything else is a subpath const sp = /^\.\/src\/index.([mc]?[jt]s|[jt]sx)$/.test(e) ? '.' : ( './' + e .replace(/^\.\/src\//, '') .replace(/\.([mc]?[tj]s|[jt]sx)$/, '') ) exp[sp] = `./${e}` } /* c8 ignore start - should be impossible */ if (!validExports(exp)) { console.error('invalid exports pattern, using default exports') delete tshy.exports exportsConfig = undefined } else { /* c8 ignore stop */ exp['./package.json'] = './package.json' tshy.exports = exp } } const config = { ...tshy } as TshyConfig const ti = config as TshyConfig & { imports?: any } if (ti.imports) { console.debug( chalk.cyan.dim('imports') + ' moving from tshy config to top level', ) pkg.imports = { ...pkg.imports, ...ti.imports, } delete ti.imports } validImports(pkg) if (!exportsConfig) { const e: Exclude = { './package.json': './package.json', } for (const i of sources) { if (/^\.\/src\/index\.[^\.]+$/.test(i)) { e['.'] = i break } } config.exports = e tshy.exports = e exportsConfig = e } // return the filled out config, but leave the package.json // exports as they were, as long as they turned out to be valid. pkg.tshy = { ...tshy, exports: exportsConfig } return config } const config: TshyConfig = getConfig(pkg, sources) export default config isaacs-tshy-bded619/src/console.ts000066400000000000000000000011101464240215000172320ustar00rootroot00000000000000// only print the logs if it fails, or if TSHY_VERBOSE is set let verbose = parseInt(process.env.TSHY_VERBOSE || '0') const errors: any[][] = [] export const error = (...a: any[]) => { if (verbose >= 1) console.error(...a) else errors.push(a) } export const debug = (...a: any[]) => { if (verbose >= 2) console.error(...a) else errors.push(a) } // we only print stdout on success anyway export const log = (...a: any[]) => { if (verbose >= 1) console.log(...a) } export const print = () => { for (const a of errors) { console.error(...a) } errors.length = 0 } isaacs-tshy-bded619/src/dialects.ts000066400000000000000000000001271464240215000173670ustar00rootroot00000000000000import config from './config.js' export default config.dialects || ['esm', 'commonjs'] isaacs-tshy-bded619/src/exports.ts000066400000000000000000000146431464240215000173130ustar00rootroot00000000000000import { relative, resolve } from 'node:path/posix' import { ConditionalValue, ConditionalValueObject, ExportsSubpaths, } from 'resolve-import' import config from './config.js' import dialects from './dialects.js' import fail from './fail.js' import pkg from './package.js' import type { PolyfillSet } from './polyfills.js' import polyfills from './polyfills.js' import { resolveExport } from './resolve-export.js' import { Package, TshyConfig, TshyExport } from './types.js' const { esmDialects = [], commonjsDialects = [] } = config const liveDev = config.liveDev && process.env.npm_command !== 'publish' && process.env.npm_command !== 'pack' const getTargetForDialectCondition = ( s: string | TshyExport | undefined | null, dialect: T, condition: T extends 'esm' ? 'import' : T extends 'commonjs' ? 'require' : T, type: T extends 'esm' ? 'esm' : T extends 'commonjs' ? 'commonjs' : 'esm' | 'commonjs', polyfills: Map = new Map(), ): string | undefined | null => { if (s === undefined) return undefined if (typeof s === 'string') { // the excluded filename pattern const xts = type === 'commonjs' ? '.mts' : '.cts' if (s.endsWith(xts)) return undefined const pf = dialect === 'commonjs' ? 'cjs' : dialect const rel = relative( resolve('./src'), resolve(polyfills.get(pf)?.map.get(s) ?? s), ) const target = liveDev ? rel : rel.replace(/\.([mc]?)tsx?$/, '.$1js') return ( !s || !s.startsWith('./src/') ? s : dialects.includes(type) ? `./dist/${dialect}/${target}` : undefined ) } return resolveExport(s, [condition]) } export const getImpTarget = ( s: string | TshyExport | undefined | null, polyfills: Map = new Map(), ) => getTargetForDialectCondition(s, 'esm', 'import', 'esm', polyfills) export const getReqTarget = ( s: string | TshyExport | undefined | null, polyfills: Map = new Map(), ) => getTargetForDialectCondition( s, 'commonjs', 'require', 'commonjs', polyfills, ) const getExports = ( c: TshyConfig, ): Record => { // by this time it always exports, will get the default if missing /* c8 ignore start */ if (!c.exports) { fail('no exports on tshy config (is there code in ./src?)') return process.exit(1) } /* c8 ignore stop */ const e: Record = {} for (const [sub, s] of Object.entries(c.exports)) { // external export, not built by us if ( s !== null && (typeof s !== 'string' || !s.startsWith('./src/')) ) { // already been validated, just accept as-is e[sub] = s as ConditionalValue continue } /* c8 ignore next - already guarded */ if (s === null) continue const impTarget = getImpTarget(s, polyfills) const reqTarget = getReqTarget(s, polyfills) // should be impossible /* c8 ignore start */ if (!impTarget && !reqTarget) continue /* c8 ignore stop */ const exp: ConditionalValueObject = (e[sub] = {}) if (impTarget) { for (const d of esmDialects) { const source = s && (polyfills.get(d)?.map.get(s) ?? s) const target = getTargetForDialectCondition( s, d, d, 'esm', polyfills, ) if (target) { exp[d] = liveDev ? { source, ...getSourceDialects(source, c), default: target, } : { source, ...getSourceDialects(source, c), types: target.replace(/\.js$/, '.d.ts'), default: target, } } } } if (reqTarget) { for (const d of commonjsDialects) { const source = s && (polyfills.get(d)?.map.get(s) ?? s) const target = getTargetForDialectCondition( s, d, d, 'commonjs', polyfills, ) if (target) { exp[d] = liveDev ? { source, ...getSourceDialects(source, c), default: target, } : { source, ...getSourceDialects(source, c), types: target.replace(/\.js$/, '.d.ts'), default: target, } } } } // put the default import/require after all the other special ones. if (impTarget) { exp.import = liveDev ? { source: s, default: impTarget, } : { source: s, types: impTarget.replace(/\.(m?)js$/, '.d.$1ts'), default: impTarget, } } if (reqTarget) { exp.require = liveDev ? { source: s, default: reqTarget, } : { source: s, types: reqTarget.replace(/\.(c?)js$/, '.d.$1ts'), default: reqTarget, } } } return e } const getSourceDialects = (source: string, c: TshyConfig) => { const { sourceDialects } = c if (!sourceDialects) return {} return Object.fromEntries(sourceDialects.map(s => [s, source])) } export const setMain = ( c: TshyConfig | undefined, pkg: Package & { exports: ExportsSubpaths }, ) => { const mod = resolveExport(pkg.exports['.'], ['require']) const main = c?.main ?? !!mod if (main) { if (!mod) { fail(`could not resolve exports['.'] for tshy.main 'require'`) return process.exit(1) } const types = resolveExport(pkg.exports['.'], [ 'require', 'types', ]) pkg.main = mod if (types && types !== mod) pkg.types = types else delete pkg.types } else { if (c && c.main !== false) delete c.main delete pkg.main delete pkg.types } pkg.type = pkg.type === 'commonjs' ? 'commonjs' : 'module' // Set the package module to exports["."] const importMod = resolveExport(pkg.exports['.'], ['import']) const module = c?.module ?? !!importMod if (module) { if (!importMod) { fail(`could not resolve exports['.'] for tshy.module 'import'`) return process.exit(1) } pkg.module = importMod } else { if (c && c.module !== false) delete c.module delete pkg.module } } pkg.exports = getExports(config) setMain(config, pkg as Package & { exports: ExportsSubpaths }) export default pkg.exports isaacs-tshy-bded619/src/fail.ts000066400000000000000000000003251464240215000165120ustar00rootroot00000000000000import chalk from 'chalk' import * as console from './console.js' export default (message: string, er?: Error) => { console.error(chalk.red.bold(message)) if (er) console.error(er.message) console.print() } isaacs-tshy-bded619/src/if-exist.ts000066400000000000000000000003551464240215000173320ustar00rootroot00000000000000import { existsSync, renameSync, unlinkSync } from 'fs' const unlink = (f: string) => existsSync(f) && unlinkSync(f) const rename = (f: string, to: string) => existsSync(f) && renameSync(f, to) export default { unlink, rename, } isaacs-tshy-bded619/src/index.ts000066400000000000000000000014701464240215000167100ustar00rootroot00000000000000#!/usr/bin/env node import chalk from 'chalk' import build from './build.js' import * as debugConsole from './console.js' import './exports.js' import pkg from './package.js' import usage from './usage.js' import watch from './watch.js' const { exports: exp, tshy } = pkg const main = async () => { for (const arg of process.argv.slice(2)) { switch (arg) { case '--help': case '-h': return usage() case '--watch': case '-w': return watch() default: return usage(`Unknown argument: ${arg}`) } } debugConsole.debug(chalk.yellow.bold('building'), process.cwd()) debugConsole.debug(chalk.cyan.dim('tshy config'), tshy) debugConsole.debug(chalk.cyan.dim('exports'), exp) await build() debugConsole.log(chalk.bold.green('success!')) } await main() isaacs-tshy-bded619/src/package.ts000066400000000000000000000012231464240215000171700ustar00rootroot00000000000000// get the package.json data for the cwd import { readFileSync } from 'fs' import { JSONResult, parse, stringify } from 'polite-json' import fail from './fail.js' import { Package } from './types.js' const isPackage = (pkg: JSONResult): pkg is Package => !!pkg && typeof pkg === 'object' && !Array.isArray(pkg) const readPkg = (): Package => { try { const res = parse(readFileSync('package.json', 'utf8')) if (isPackage(res)) return res throw new Error( 'Invalid package.json contents: ' + stringify(res), ) } catch (er) { fail('failed to read package.json', er as Error) process.exit(1) } } export default readPkg() isaacs-tshy-bded619/src/polyfills.ts000066400000000000000000000030141464240215000176120ustar00rootroot00000000000000// the modules like -cjs.cts that override a module at .ts import chalk from 'chalk' import config from './config.js' import * as console from './console.js' import sources from './sources.js' const { esmDialects = [], commonjsDialects = [] } = config export class PolyfillSet { type: 'esm' | 'commonjs' name: string map = new Map() constructor(type: 'esm' | 'commonjs', name: string) { this.type = type this.name = name } addFile(f: string, sources: Set) { const dotts = this.type === 'commonjs' ? 'cts' : 'mts' const ending = `-${this.name}.${dotts}` if (!f.endsWith(ending)) return const ts = f.substring(0, f.length - ending.length) + '.ts' const tsx = ts + 'x' if (sources.has(ts)) this.map.set(f, ts) else if (sources.has(tsx)) this.map.set(f, tsx) } [Symbol.for('nodejs.util.inspect.custom')]() { return [this.name, this.map] } } const polyfills = new Map([ ['cjs', new PolyfillSet('commonjs', 'cjs')], ]) for (const d of commonjsDialects) polyfills.set(d, new PolyfillSet('commonjs', d)) for (const d of esmDialects) polyfills.set(d, new PolyfillSet('esm', d)) for (const f of sources) { for (const pf of polyfills.values()) { pf.addFile(f, sources) } } // delete any polyfill types that have no entries for (const [name, pf] of polyfills.entries()) { if (pf.map.size === 0) polyfills.delete(name) } if (polyfills.size) { console.debug(chalk.cyan.dim('polyfills detected'), polyfills) } export default polyfills isaacs-tshy-bded619/src/prevent-verbatim-module-syntax.ts000066400000000000000000000015561464240215000237070ustar00rootroot00000000000000// prevent the use of verbatimModuleSyntax: true when // more than one dialect is in use, since this cannot ever // be made to work in a hybrid context. // Note: cannot just use JSON.parse, because ts config files // are jsonc. import * as console from './console.js' import fail from './fail.js' import readTypescriptConfig from './read-typescript-config.js' export default () => { const config = readTypescriptConfig() if (config.options.verbatimModuleSyntax) { fail('verbatimModuleSyntax detected') console.error( `verbatimModuleSyntax is incompatible with multi-dialect builds. Either remove this field from tsconfig.json, or set a single dialect in the "dialects" field in package.json, for example: { "tshy": { "dialects": ["esm"] } } or { "tshy": { "dialects": ["commonjs"] } } `, ) console.print() process.exit(1) } } isaacs-tshy-bded619/src/read-typescript-config.ts000066400000000000000000000011571464240215000221650ustar00rootroot00000000000000// read the actual configuration that tsc is using // Note: cannot just use JSON.parse, because ts config files // are jsonc. import { resolve } from 'path' import ts from 'typescript' import config from './config.js' const { readFile } = ts.sys let parsedTsConfig: ts.ParsedCommandLine | undefined = undefined export default () => { if (parsedTsConfig) return parsedTsConfig const configPath = config.project ?? resolve('tsconfig.json') const readResult = ts.readConfigFile(configPath, readFile) return (parsedTsConfig = ts.parseJsonConfigFileContent( readResult.config, ts.sys, process.cwd(), )) } isaacs-tshy-bded619/src/resolve-export.ts000066400000000000000000000011401464240215000205710ustar00rootroot00000000000000export const resolveExport = ( exp: any, conditions: string[], ): string | undefined | null => { if (typeof exp === 'string') return exp if (typeof exp !== 'object') return undefined if (exp === null) return exp if (Array.isArray(exp)) { for (const e of exp) { const u = resolveExport(e, conditions) if (u || u === null) return u } return undefined } const conds = [...conditions, 'node', 'default'] for (const [c, e] of Object.entries(exp)) { if (conds.includes(c)) { const u = resolveExport(e, conditions) if (u || u === null) return u } } } isaacs-tshy-bded619/src/self-link.ts000066400000000000000000000042511464240215000174650ustar00rootroot00000000000000// link the package folder into ./target/node_modules/ import { readlinkSync, symlinkSync } from 'fs' import { mkdirpSync } from 'mkdirp' import { dirname, relative, resolve, sep } from 'path' import { rimrafSync } from 'rimraf' import { walkUp } from 'walk-up-path' import { Package } from './types.js' const dirsMade = new Map() // if the cwd is in already linked to or living within node_modules, // then skip the linking, because it's already done. // This is typically the case in a workspaces setup, and // creating yet *another* symlink to ourselves in src/node_modules // will break nx's change detection logic with an ELOOP error. let inNM: boolean | undefined = undefined const linkedAlready = (pkg: Package) => { if (inNM !== undefined) { return inNM } const cwd = process.cwd() const p = `${sep}node_modules${sep}${pkg.name}`.toLowerCase() if (cwd.toLowerCase().endsWith(p)) { return (inNM = true) } for (const p of walkUp(cwd)) { const link = resolve(p, 'node_modules', pkg.name) try { const target = resolve(dirname(link), readlinkSync(link)) if (relative(target, cwd) === '') { return (inNM = true) } } catch {} } return (inNM = false) } export const link = (pkg: Package, where: string) => { const selfLink = pkg?.tshy?.selfLink if (!pkg.name || selfLink === false || linkedAlready(pkg)) { return } const dest = resolve(where, 'node_modules', pkg.name) const dir = dirname(dest) const src = relative(dir, process.cwd()) const made = mkdirpSync(dir) if (made) dirsMade.set(dest, made) try { symlinkSync(src, dest) } catch { rimrafSync(dest) let threw = true try { symlinkSync(src, dest) threw = false } finally { // best effort if not set explicitly. suppress error with return. if (threw && selfLink === undefined) return } } } export const unlink = (pkg: Package, where: string) => { if ( !pkg.name || pkg?.tshy?.selfLink === false || linkedAlready(pkg) ) { return } const dest = resolve(where, 'node_modules', pkg.name) rimrafSync(dest) const made = dirsMade.get(dest) if (made) rimrafSync(made) } isaacs-tshy-bded619/src/set-folder-dialect.ts000066400000000000000000000014021464240215000212430ustar00rootroot00000000000000import chalk from 'chalk' import { writeFileSync } from 'fs' import { rimrafSync } from 'rimraf' import * as console from './console.js' import getImports from './built-imports.js' import pkg from './package.js' import { Dialect } from './types.js' const writeDialectPJ = (d: string, mode?: Dialect) => { if (!mode) { return rimrafSync(`${d}/package.json`) } const v: { type: string; imports?: Record } = { type: mode === 'commonjs' ? 'commonjs' : 'module', imports: getImports(pkg), } writeFileSync( `${d}/package.json`, JSON.stringify(v, null, 2) + '\n', ) } export default (where: string, mode?: Dialect) => { if (mode) console.debug(chalk.cyan.dim('set dialect'), { where, mode }) writeDialectPJ(where, mode) } isaacs-tshy-bded619/src/sources.ts000066400000000000000000000007741464240215000172720ustar00rootroot00000000000000// get the list of sources in ./src import { readdirSync } from 'fs' import { join } from 'path/posix' const getSources = (dir = 'src'): string[] => { const sources: string[] = [] const entries = readdirSync(dir, { withFileTypes: true }) for (const e of entries) { const j = `./${join(dir, e.name)}` if (e.isFile()) sources.push(j) else if (e.isDirectory()) { sources.push(...getSources(j)) } } return sources } const sources = new Set(getSources()) export default sources isaacs-tshy-bded619/src/tsconfig.ts000066400000000000000000000070671464240215000174250ustar00rootroot00000000000000import chalk from 'chalk' import { mkdirpSync } from 'mkdirp' import { existsSync, readdirSync, unlinkSync, writeFileSync, } from 'node:fs' import { resolve } from 'node:path' import { join } from 'node:path/posix' import * as console from './console.js' // the commonjs build needs to exclude anything that will be polyfilled import config from './config.js' import polyfills from './polyfills.js' import preventVerbatimModuleSyntax from './prevent-verbatim-module-syntax.js' import readTypescriptConfig from './read-typescript-config.js' const { dialects = ['esm', 'commonjs'], esmDialects = [], commonjsDialects = [], exclude = [], } = config const relativeExclude = exclude.map( e => `../${e.replace(/^\.\//, '')}`, ) const recommended: Record = { compilerOptions: { declaration: true, declarationMap: true, esModuleInterop: true, forceConsistentCasingInFileNames: true, inlineSources: true, jsx: 'react', module: 'nodenext', moduleResolution: 'nodenext', noUncheckedIndexedAccess: true, resolveJsonModule: true, skipLibCheck: true, sourceMap: true, strict: true, target: 'es2022', }, } const build = (): Record => ({ extends: config.project === undefined ? '../tsconfig.json' : join('..', config.project), compilerOptions: { target: readTypescriptConfig().options.target === undefined ? 'es2022' : undefined, rootDir: '../src', module: 'nodenext', moduleResolution: 'nodenext', }, }) const commonjs = (dialect: string): Record => { const exclude = [ ...relativeExclude, '../src/**/*.mts', '../src/package.json', ] for (const [d, pf] of polyfills) { if (d === dialect) continue for (const f of pf.map.keys()) { exclude.push(`../${join(f)}`) } } return { extends: './build.json', include: [ '../src/**/*.ts', '../src/**/*.cts', '../src/**/*.tsx', '../src/**/*.json', ], exclude, compilerOptions: { outDir: '../.tshy-build/' + (dialect === 'cjs' ? 'commonjs' : dialect), }, } } const esm = (dialect: string): Record => { const exclude: string[] = [ ...relativeExclude, '../src/package.json', ] for (const [d, pf] of polyfills) { if (d === dialect) continue for (const f of pf.map.keys()) { exclude.push(`../${f.replace(/^\.\//, '')}`) } } return { extends: './build.json', include: [ '../src/**/*.ts', '../src/**/*.mts', '../src/**/*.tsx', '../src/**/*.json', ], exclude, compilerOptions: { outDir: '../.tshy-build/' + dialect, }, } } mkdirpSync('.tshy') const writeConfig = (name: string, data: Record) => writeFileSync( `.tshy/${name}.json`, JSON.stringify(data, null, 2) + '\n', ) console.debug(chalk.cyan.dim('writing tsconfig files...')) if (config.project === undefined && !existsSync('tsconfig.json')) { console.debug('using recommended tsconfig.json') writeConfig('../tsconfig', recommended) } else { if (dialects.length > 1) preventVerbatimModuleSyntax() console.debug('using existing tsconfig.json') } for (const f of readdirSync('.tshy')) { unlinkSync(resolve('.tshy', f)) } writeConfig('build', build()) if (dialects.includes('commonjs')) { writeConfig('commonjs', commonjs('cjs')) for (const d of commonjsDialects) { writeConfig(d, commonjs(d)) } } if (dialects.includes('esm')) { writeConfig('esm', esm('esm')) for (const d of esmDialects) { writeConfig(d, esm(d)) } } isaacs-tshy-bded619/src/types.ts000066400000000000000000000016521464240215000167470ustar00rootroot00000000000000import type { ConditionalValue, ExportsSubpaths, Imports, } from 'resolve-import' export type TshyConfigMaybeGlobExports = { exports?: string | string[] | Record dialects?: Dialect[] selfLink?: boolean main?: boolean module?: boolean commonjsDialects?: string[] esmDialects?: string[] sourceDialects?: string[] project?: string exclude?: string[] liveDev?: boolean } export type TshyConfig = TshyConfigMaybeGlobExports & { exports?: Record } export type Dialect = 'commonjs' | 'esm' export type ExportDetail = { default: string [k: string]: string } export type TshyExport = ConditionalValue export type Package = { name: string version: string main?: string types?: string type?: 'module' | 'commonjs' bin?: string | Record exports?: ExportsSubpaths tshy?: TshyConfigMaybeGlobExports imports?: Imports [k: string]: any } isaacs-tshy-bded619/src/unbuilt-imports.ts000066400000000000000000000101011464240215000207450ustar00rootroot00000000000000// this is the thing that supports top-level package.json imports // via symlinks, not the tshy.imports which are just config. import { writeFileSync } from 'fs' import { symlink } from 'fs/promises' import { mkdirp } from 'mkdirp' import { dirname, relative, resolve, sep } from 'path' import { getAllConditionalValues, getUniqueConditionSets, resolveAllLocalImports, } from 'resolve-import' import { rimraf } from 'rimraf' import { fileURLToPath } from 'url' import * as console from './console.js' import { Package } from './types.js' const dirsMade = new Set() // write out the steps to the save file script export const save = (f: string): boolean => { const links = [...saveSet.entries()] if (!links.length) return false const dirs = new Set(links.map(([dest]) => dirname(dest))) console.debug('save import linker', f) writeFileSync( f, `import { mkdirSync } from 'node:fs' import { symlink } from 'node:fs/promises' const dirs = ${JSON.stringify([...dirs])} const links = [ ${links.map(l => ` ${JSON.stringify(l)},\n`).join('')}] const e = (er) => { if (er.code !== 'EEXIST') throw er } for (const d of dirs) mkdirSync(d, { recursive: true }) Promise.all(links.map(([dest, src]) => symlink(src, dest).catch(e))) `, ) return true } let targets: undefined | string[] = undefined // Get the targets that will have to be linked, because they're not // a target in ./src const getTargets = async (imports: Record) => { const conds = getAllConditionalValues(imports).filter( c => !c.startsWith('./src/'), ) if (!conds.some(c => c.includes('*'))) { // fast path return (targets = conds.filter(c => c.startsWith('./'))) } const sets = getUniqueConditionSets(imports) const t = new Set() const pj = resolve('package.json') for (const conditions of sets) { const imps = await resolveAllLocalImports(pj, { conditions }) for (const url of Object.values(imps)) { // node builtin if (typeof url === 'string') continue const p = fileURLToPath(url) const rel = relative(process.cwd(), p) // if it's empty, a dep in node_modules, or a built module, skip if ( !rel || rel.startsWith('..' + sep) || rel.startsWith('src' + sep) || rel.startsWith('node_modules' + sep) ) continue t.add('./' + rel.replace(/\\/g, '/')) } } return (targets = [...t]) } const saveSet = new Map() // create symlinks for the package imports in the target dir export const link = async ( pkg: Package, dir: string, save = false, ) => { const { imports } = pkg if (!imports) return if (!targets) targets = await getTargets(imports) if (!targets.length) return console.debug(`link import targets in ${dir}`, targets) const rel = relative(resolve(dir), process.cwd()) const lps: Promise[] = [] for (const t of targets) { const l = t.replace(/^\.\//, '') const df = dirname(l) const dfrel = df === '.' ? '' : ( df .split('/') .map(() => '../') .join('') ) const dest = dir + '/' + l const src = rel + '/' + dfrel + l if (save) saveSet.set(dest, src) lps.push( mkdirp(dirname(dest)) .then(d => { // if we aren't saving, then this is a transient link // save the dirs created so that we can clean them up if (!save && d) dirsMade.add(d) return rimraf(dest) }) .then(() => symlink(src, dest)), ) } await Promise.all(lps) } // remove symlinks created for package imports in the target dir export const unlink = async (pkg: Package, dir: string) => { const { imports } = pkg if (!imports) return // will always have targets by this point /* c8 ignore start */ if (!targets) targets = await getTargets(imports) /* c8 ignore stop */ console.debug(`unlink import targets in ${dir}`, targets) const lps: Promise[] = [] for (const t of targets) { const dest = resolve(dir, t) lps.push(rimraf(dest)) } for (const d of dirsMade) lps.push(rimraf(d)) await Promise.all(lps) } isaacs-tshy-bded619/src/usage.ts000066400000000000000000000010541464240215000167030ustar00rootroot00000000000000import chalk from 'chalk' import fail from './fail.js' export default (err?: string) => { const url = 'https://github.com/isaacs/tshy' const link = chalk.level > 0 ? `\x1b]8;;${url}\x1b\\${url}\x1b]8;;\x1b\\` : url console[err ? 'error' : 'log'](`Usage: tshy [--help] --help -h Print this message and exit. --watch -w Watch files in ./src and build when they change. Default behavior: build project according to tshy config in package.json See the docs for more information: ${link}`) if (err) fail(err) process.exit(err ? 1 : 0) } isaacs-tshy-bded619/src/valid-dialects.ts000066400000000000000000000010021464240215000204550ustar00rootroot00000000000000import fail from './fail.js' import { Dialect, TshyConfig } from './types.js' export const isDialect = (d: any): d is Dialect => d === 'commonjs' || d === 'esm' export default ( d: any, ): d is Exclude => { if ( !!d && Array.isArray(d) && d.length && !d.some(d => !isDialect(d)) ) { return true } fail( `tshy.dialects must be an array including "esm" and/or "commonjs", ` + `got: ${JSON.stringify(d)}`, ) return process.exit(1) } isaacs-tshy-bded619/src/valid-exclude.ts000066400000000000000000000006501464240215000203260ustar00rootroot00000000000000import fail from './fail.js' import { TshyConfig } from './types.js' export default ( d: any, ): d is Exclude => { if ( !!d && Array.isArray(d) && d.length && !d.some(d => typeof d !== 'string') ) { return true } fail( `tshy.exclude must be an array of string glob patterns if defined, ` + `got: ${JSON.stringify(d)}`, ) return process.exit(1) } isaacs-tshy-bded619/src/valid-exports.ts000066400000000000000000000024451464240215000204050ustar00rootroot00000000000000import addDot from './add-dot.js' import fail from './fail.js' import { TshyConfig } from './types.js' import validExternalExport from './valid-external-export.js' export default ( e: any, ): e is Exclude => { if (!e || typeof e !== 'object' || Array.isArray(e)) return false for (const [sub, exp] of Object.entries(e)) { if (sub !== '.' && !sub.startsWith('./')) { fail( `tshy.exports key must be "." or start with "./", got: ${sub}`, ) return process.exit(1) } // just a module. either a built export, or a simple unbuilt export if (typeof exp === 'string') { e[sub] = addDot(exp) continue } if (typeof exp !== 'object') { fail( `tshy.exports ${sub} value must be valid package.json exports ` + `value, got: ${JSON.stringify(exp)}`, ) return process.exit(1) } // can be any valid external export, but the resolution of // import and require must NOT be in ./src if (!validExternalExport(exp)) { fail( `tshy.exports ${sub} unbuilt exports must not be in ./src, ` + `and exports in src must be string values. ` + `got: ${JSON.stringify(exp)}`, ) return process.exit(1) } e[sub] = exp } return true } isaacs-tshy-bded619/src/valid-external-export.ts000066400000000000000000000006411464240215000220360ustar00rootroot00000000000000import { join } from 'path/posix' import type { ConditionalValueObject } from 'resolve-import' import { resolveExport } from './resolve-export.js' export default (exp: any): exp is ConditionalValueObject => { const i = resolveExport(exp, ['import']) const r = resolveExport(exp, ['require']) if (i && join(i).startsWith('src/')) return false if (r && join(r).startsWith('src/')) return false return true } isaacs-tshy-bded619/src/valid-extra-dialects.ts000066400000000000000000000037161464240215000216140ustar00rootroot00000000000000// validate esmDialects and commonjsDialects import fail from './fail.js' import { TshyConfig } from './types.js' const arrayOverlap = ( a: string[] | undefined, b: string[] | undefined, ): string | false => { if (!a || !b) return false for (const av of a) { if (b.includes(av)) return av } return false } const validExtraDialectSet = ( e: string[], which: 'commonjs' | 'esm' | 'source', ) => { for (const d of e) { if (typeof d !== 'string') { fail(`${which} must be an array of strings, got: ${d}`) return process.exit(1) } if ( d === 'commonjs' || d === 'cjs' || d === 'esm' || d === 'require' || d === 'import' || d === 'node' || d === 'source' || d === 'default' ) { fail( `tshy.${which}Dialects must not contain ${JSON.stringify(d)}`, ) return process.exit(1) } } return true } export default ({ commonjsDialects, esmDialects, sourceDialects, }: TshyConfig) => { if ( commonjsDialects === undefined && esmDialects === undefined && sourceDialects === undefined ) { return true } if ( commonjsDialects && !validExtraDialectSet(commonjsDialects, 'commonjs') ) { return false } if (esmDialects && !validExtraDialectSet(esmDialects, 'esm')) { return false } if ( sourceDialects && !validExtraDialectSet(sourceDialects, 'source') ) { return false } for (const [aname, bname, a, b] of [ [ 'commonjsDialects', 'esmDialects', commonjsDialects, esmDialects, ], [ 'commonjsDialects', 'sourceDialects', commonjsDialects, sourceDialects, ], ['esmDialects', 'sourceDialects', esmDialects, sourceDialects], ] as const) { const overlap = arrayOverlap(a, b) if (!overlap) continue fail( `${aname} and ${bname} must be unique, found ${overlap} in both lists`, ) return process.exit(1) } return true } isaacs-tshy-bded619/src/valid-imports.ts000066400000000000000000000017471464240215000204020ustar00rootroot00000000000000import fail from './fail.js' import { Package } from './types.js' import validExternalExport from './valid-external-export.js' // validate the package.imports field export default (pkg: Package) => { const { imports } = pkg if (imports === undefined) return true if (Array.isArray(imports) || typeof imports !== 'object') { fail( 'invalid imports object, must be Record, ' + `got: ${JSON.stringify(imports)}`, ) return process.exit(1) } for (const [i, v] of Object.entries(imports)) { if (!i.startsWith('#') || i === '#' || i.startsWith('#/')) { fail('invalid imports module specifier: ' + i) return process.exit(1) } if (typeof v === 'string') continue if (!validExternalExport(v)) { fail( `unbuilt package.imports ${i} must not be in ./src, ` + 'and imports in ./src must be string values. got: ' + JSON.stringify(v), ) return process.exit(1) } } return true } isaacs-tshy-bded619/src/valid-project.ts000066400000000000000000000007061464240215000203450ustar00rootroot00000000000000import { resolve } from 'path' import { readFileSync } from 'node:fs' import fail from './fail.js' import { TshyConfig } from './types.js' export default (p: any): p is TshyConfig['project'] => { if (typeof p === 'string') { try { readFileSync(resolve(p), 'utf8') return true } catch (_) {} } fail( `tshy.project must point to a tsconfig file on disk, ` + `got: ${JSON.stringify(p)}`, ) return process.exit(1) } isaacs-tshy-bded619/src/watch.ts000066400000000000000000000041731464240215000167120ustar00rootroot00000000000000// any time the root package.json or any typescript files in src // are changed/added/removed, run the build import chalk from 'chalk' import { spawn } from 'child_process' import { watch, WatchOptions } from 'chokidar' import { readFileSync } from 'fs' import { resolve, sep } from 'path' import { fileURLToPath } from 'url' import * as tshyConsole from './console.js' const pjData = (): string => { try { return JSON.stringify( JSON.parse(readFileSync('./package.json', 'utf8')), ) /* c8 ignore start */ } catch { return 'null' } /* c8 ignore stop */ } let lastPJData: string = 'null' export const options: WatchOptions = { persistent: true, ignoreInitial: true, ignorePermissionErrors: true, ignored: path => { const r = resolve(path) if (r === srcPJ) return true if (r === srcNM) return true if (r.startsWith(srcNM + sep)) return true return false }, } export const srcPJ = resolve('./src/package.json') export const srcNM = resolve('./src/node_modules') export const src = resolve('./src') export const rootPJ = resolve('./package.json') export const targets = [src, rootPJ] export const bin = fileURLToPath( new URL('./index.js', import.meta.url), ) export default () => { let building = false let needRebuild = false const watcher = watch(targets, options) const build = () => { building = true needRebuild = false const child = spawn(process.execPath, [bin], { stdio: 'inherit' }) child.on('close', (code, signal) => { if (code || signal) tshyConsole.error({ code, signal }) else console.log(chalk.green('build success'), { code, signal }) if (needRebuild) build() else building = false }) } watcher.on('all', (ev, path) => { const r = resolve(path) if (r === srcPJ) return if (r === rootPJ) { // check if the data actually changed const newData = pjData() /* c8 ignore next */ if (newData === lastPJData) return lastPJData = newData } if (building) { if (r !== rootPJ) needRebuild = true return } tshyConsole.debug(chalk.cyan.dim(ev), path) build() }) build() } isaacs-tshy-bded619/src/which-tsc.ts000066400000000000000000000007021464240215000174670ustar00rootroot00000000000000// find the location of the tsc binary // This is necessary because pnpm install trees don't expose binaries // of meta-deps, and it's nicer to not require that the tshy user has // a dep on typescript directly if they don't need it otherwise. import { resolveImport } from 'resolve-import' import { fileURLToPath } from 'url' export default fileURLToPath( new URL( '../bin/tsc', await resolveImport('typescript', import.meta.url), ), ) isaacs-tshy-bded619/src/write-package.ts000066400000000000000000000002561464240215000203250ustar00rootroot00000000000000import { writeFileSync } from 'fs' import { stringify } from 'polite-json' import pkg from './package.js' export default () => writeFileSync('package.json', stringify(pkg)) isaacs-tshy-bded619/tap-snapshots/000077500000000000000000000000001464240215000172445ustar00rootroot00000000000000isaacs-tshy-bded619/tap-snapshots/test/000077500000000000000000000000001464240215000202235ustar00rootroot00000000000000isaacs-tshy-bded619/tap-snapshots/test/add-paths-to-tsconfig.ts.test.cjs000066400000000000000000000006471464240215000264350ustar00rootroot00000000000000/* IMPORTANT * This snapshot file is auto-generated, but designed for humans. * It should be checked into source control and tracked carefully. * Re-generate by setting TAP_SNAPSHOT=1 and running tests. * Make sure to inspect the output below. Do not ignore changes! */ 'use strict' exports[`test/add-paths-to-tsconfig.ts > TAP > fail to parse > failure message 1`] = ` could not parse tsconfig.json to add "paths" ` isaacs-tshy-bded619/tap-snapshots/test/build-commonjs.ts.test.cjs000066400000000000000000000044441464240215000252570ustar00rootroot00000000000000/* IMPORTANT * This snapshot file is auto-generated, but designed for humans. * It should be checked into source control and tracked carefully. * Re-generate by setting TAP_SNAPSHOT=1 and running tests. * Make sure to inspect the output below. Do not ignore changes! */ 'use strict' exports[`test/build-commonjs.ts > TAP > basic commonjs build > must match snapshot 1`] = ` Array [ "blah-cjs.cjs.map", "blah-cjs.d.cts.map", "blah.d.ts", "blah.js", "index.d.ts", "index.d.ts.map", "index.js", "index.js.map", "package.json", ] ` exports[`test/build-commonjs.ts > TAP > basic commonjs build > must match snapshot 2`] = ` Array [ Array [ "{NODE}", Array [ "{CWD}/node_modules/typescript/bin/tsc", "-p", ".tshy/commonjs.json", ], Object { "stdio": "inherit", }, ], Array [ "{NODE}", Array [ "{CWD}/node_modules/typescript/bin/tsc", "-p", ".tshy/blah.json", ], Object { "stdio": "inherit", }, ], Array [ "{NODE}", Array [ "{CWD}/node_modules/typescript/bin/tsc", "-p", ".tshy/no-overrides.json", ], Object { "stdio": "inherit", }, ], ] ` exports[`test/build-commonjs.ts > TAP > build failure > must match snapshot 1`] = ` Array [ "blah-cjs.cjs", "blah-cjs.cjs.map", "blah-cjs.d.cts", "blah-cjs.d.cts.map", "blah.d.ts", "blah.d.ts.map", "blah.js", "blah.js.map", "index.d.ts", "index.d.ts.map", "index.js", "index.js.map", ] ` exports[`test/build-commonjs.ts > TAP > build failure > must match snapshot 2`] = ` Array [ Array [ "{NODE}", Array [ "{CWD}/node_modules/typescript/bin/tsc", "-p", ".tshy/commonjs.json", ], Object { "stdio": "inherit", }, ], Array [ "{NODE}", Array [ "{CWD}/node_modules/typescript/bin/tsc", "-p", ".tshy/blah.json", ], Object { "stdio": "inherit", }, ], Array [ "{NODE}", Array [ "{CWD}/node_modules/typescript/bin/tsc", "-p", ".tshy/no-overrides.json", ], Object { "stdio": "inherit", }, ], Array [ "{NODE}", Array [ "{CWD}/node_modules/typescript/bin/tsc", "-p", ".tshy/commonjs.json", ], Object { "stdio": "inherit", }, ], ] ` isaacs-tshy-bded619/tap-snapshots/test/build-esm.ts.test.cjs000066400000000000000000000042311464240215000242100ustar00rootroot00000000000000/* IMPORTANT * This snapshot file is auto-generated, but designed for humans. * It should be checked into source control and tracked carefully. * Re-generate by setting TAP_SNAPSHOT=1 and running tests. * Make sure to inspect the output below. Do not ignore changes! */ 'use strict' exports[`test/build-esm.ts > TAP > basic esm build > must match snapshot 1`] = ` Array [ "blah.d.ts", "blah.d.ts.map", "blah.js", "blah.js.map", "index.d.ts", "index.d.ts.map", "index.js", "index.js.map", "package.json", ] ` exports[`test/build-esm.ts > TAP > basic esm build > must match snapshot 2`] = ` Array [ Array [ "{NODE}", Array [ "{CWD}/node_modules/typescript/bin/tsc", "-p", ".tshy/esm.json", ], Object { "stdio": "inherit", }, ], Array [ "{NODE}", Array [ "{CWD}/node_modules/typescript/bin/tsc", "-p", ".tshy/blah.json", ], Object { "stdio": "inherit", }, ], Array [ "{NODE}", Array [ "{CWD}/node_modules/typescript/bin/tsc", "-p", ".tshy/no-overrides.json", ], Object { "stdio": "inherit", }, ], ] ` exports[`test/build-esm.ts > TAP > build failure > must match snapshot 1`] = ` Array [ "blah.d.ts", "blah.d.ts.map", "blah.js", "blah.js.map", "index.d.ts", "index.d.ts.map", "index.js", "index.js.map", ] ` exports[`test/build-esm.ts > TAP > build failure > must match snapshot 2`] = ` Array [ Array [ "{NODE}", Array [ "{CWD}/node_modules/typescript/bin/tsc", "-p", ".tshy/esm.json", ], Object { "stdio": "inherit", }, ], Array [ "{NODE}", Array [ "{CWD}/node_modules/typescript/bin/tsc", "-p", ".tshy/blah.json", ], Object { "stdio": "inherit", }, ], Array [ "{NODE}", Array [ "{CWD}/node_modules/typescript/bin/tsc", "-p", ".tshy/no-overrides.json", ], Object { "stdio": "inherit", }, ], Array [ "{NODE}", Array [ "{CWD}/node_modules/typescript/bin/tsc", "-p", ".tshy/esm.json", ], Object { "stdio": "inherit", }, ], ] ` isaacs-tshy-bded619/tap-snapshots/test/build-fail.ts.test.cjs000066400000000000000000000016441464240215000243440ustar00rootroot00000000000000/* IMPORTANT * This snapshot file is auto-generated, but designed for humans. * It should be checked into source control and tracked carefully. * Re-generate by setting TAP_SNAPSHOT=1 and running tests. * Make sure to inspect the output below. Do not ignore changes! */ 'use strict' exports[`test/build-fail.ts > TAP > must match snapshot 1`] = ` Array [ Array [ "setFolderDialect", Array [ "src", ], ], Array [ "unlinkImports", Array [ Object { "name": "package", }, "src", ], ], Array [ "unlinkSelfDep", Array [ Object { "name": "package", }, "src", ], ], Array [ "fail", Array [ "build failed", ], ], Array [ "console.error", Array [ Object { "code": 0, "signal": "testing", }, ], ], Array [ "process.exit", Array [ 1, ], ], ] ` isaacs-tshy-bded619/tap-snapshots/test/build-live-commonjs.ts.test.cjs000066400000000000000000000007421464240215000262110ustar00rootroot00000000000000/* IMPORTANT * This snapshot file is auto-generated, but designed for humans. * It should be checked into source control and tracked carefully. * Re-generate by setting TAP_SNAPSHOT=1 and running tests. * Make sure to inspect the output below. Do not ignore changes! */ 'use strict' exports[`test/build-live-commonjs.ts > TAP > commonjs live dev build > must match snapshot 1`] = ` Array [ "blah-blah.cts", "blah-cjs.cts", "blah.ts", "index.ts", "package.json", ] ` isaacs-tshy-bded619/tap-snapshots/test/build-live-esm.ts.test.cjs000066400000000000000000000007301464240215000251450ustar00rootroot00000000000000/* IMPORTANT * This snapshot file is auto-generated, but designed for humans. * It should be checked into source control and tracked carefully. * Re-generate by setting TAP_SNAPSHOT=1 and running tests. * Make sure to inspect the output below. Do not ignore changes! */ 'use strict' exports[`test/build-live-esm.ts > TAP > esm live dev build > must match snapshot 1`] = ` Array [ "blah-blah.mts", "blah-cjs.cts", "blah.ts", "index.ts", "package.json", ] ` isaacs-tshy-bded619/tap-snapshots/test/build.ts.test.cjs000066400000000000000000005554251464240215000234460ustar00rootroot00000000000000/* IMPORTANT * This snapshot file is auto-generated, but designed for humans. * It should be checked into source control and tracked carefully. * Re-generate by setting TAP_SNAPSHOT=1 and running tests. * Make sure to inspect the output below. Do not ignore changes! */ 'use strict' exports[`test/build.ts > TAP > build both > must match snapshot 1`] = ` Array [ Array [ "self-link.link", Array [ Object { "tshy": Object { "dialects": Array [ "esm", "commonjs", ], "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, }, }, "src", ], ], Array [ "imports.link", Array [ Object { "tshy": Object { "dialects": Array [ "esm", "commonjs", ], "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, }, }, "src", ], ], Array [ "imports.unlink", Array [ Object { "tshy": Object { "dialects": Array [ "esm", "commonjs", ], "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, }, }, "src", ], ], Array [ "self-link.unlink", Array [ Object { "tshy": Object { "dialects": Array [ "esm", "commonjs", ], "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, }, }, "src", ], ], Array [ "self-link.link", Array [ Object { "tshy": Object { "dialects": Array [ "esm", "commonjs", ], "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, }, }, "dist", ], ], Array [ "self-link.link", Array [ Object { "tshy": Object { "dialects": Array [ "esm", "commonjs", ], "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, }, }, "src", ], ], Array [ "imports.link", Array [ Object { "tshy": Object { "dialects": Array [ "esm", "commonjs", ], "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, }, }, "src", ], ], Array [ "imports.unlink", Array [ Object { "tshy": Object { "dialects": Array [ "esm", "commonjs", ], "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, }, }, "src", ], ], Array [ "self-link.unlink", Array [ Object { "tshy": Object { "dialects": Array [ "esm", "commonjs", ], "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, }, }, "src", ], ], Array [ "self-link.link", Array [ Object { "tshy": Object { "dialects": Array [ "esm", "commonjs", ], "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, }, }, "dist", ], ], Array [ "self-link.link", Array [ Object { "tshy": Object { "dialects": Array [ "esm", "commonjs", ], "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, }, }, "src", ], ], Array [ "imports.link", Array [ Object { "tshy": Object { "dialects": Array [ "esm", "commonjs", ], "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, }, }, "src", ], ], Array [ "imports.unlink", Array [ Object { "tshy": Object { "dialects": Array [ "esm", "commonjs", ], "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, }, }, "src", ], ], Array [ "self-link.unlink", Array [ Object { "tshy": Object { "dialects": Array [ "esm", "commonjs", ], "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, }, }, "src", ], ], Array [ "self-link.link", Array [ Object { "tshy": Object { "dialects": Array [ "esm", "commonjs", ], "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, }, }, "dist", ], ], Array [ "self-link.link", Array [ Object { "tshy": Object { "dialects": Array [ "esm", "commonjs", ], "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, }, }, "src", ], ], Array [ "imports.link", Array [ Object { "tshy": Object { "dialects": Array [ "esm", "commonjs", ], "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, }, }, "src", ], ], Array [ "imports.unlink", Array [ Object { "tshy": Object { "dialects": Array [ "esm", "commonjs", ], "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, }, }, "src", ], ], Array [ "self-link.unlink", Array [ Object { "tshy": Object { "dialects": Array [ "esm", "commonjs", ], "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, }, }, "src", ], ], Array [ "self-link.link", Array [ Object { "tshy": Object { "dialects": Array [ "esm", "commonjs", ], "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, }, }, "dist", ], ], Array [ "self-link.link", Array [ Object { "tshy": Object { "dialects": Array [ "esm", "commonjs", ], "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, }, }, "src", ], ], Array [ "imports.link", Array [ Object { "tshy": Object { "dialects": Array [ "esm", "commonjs", ], "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, }, }, "src", ], ], Array [ "imports.unlink", Array [ Object { "tshy": Object { "dialects": Array [ "esm", "commonjs", ], "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, }, }, "src", ], ], Array [ "self-link.unlink", Array [ Object { "tshy": Object { "dialects": Array [ "esm", "commonjs", ], "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, }, }, "src", ], ], Array [ "self-link.link", Array [ Object { "tshy": Object { "dialects": Array [ "esm", "commonjs", ], "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, }, }, "dist", ], ], Array [ "self-link.link", Array [ Object { "tshy": Object { "dialects": Array [ "esm", "commonjs", ], "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, }, }, "src", ], ], Array [ "imports.link", Array [ Object { "tshy": Object { "dialects": Array [ "esm", "commonjs", ], "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, }, }, "src", ], ], Array [ "imports.unlink", Array [ Object { "tshy": Object { "dialects": Array [ "esm", "commonjs", ], "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, }, }, "src", ], ], Array [ "self-link.unlink", Array [ Object { "tshy": Object { "dialects": Array [ "esm", "commonjs", ], "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, }, }, "src", ], ], Array [ "self-link.link", Array [ Object { "tshy": Object { "dialects": Array [ "esm", "commonjs", ], "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, }, }, "dist", ], ], Array [ "self-link.link", Array [ Object { "tshy": Object { "dialects": Array [ "esm", "commonjs", ], "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, }, }, "src", ], ], Array [ "imports.link", Array [ Object { "tshy": Object { "dialects": Array [ "esm", "commonjs", ], "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, }, }, "src", ], ], Array [ "imports.unlink", Array [ Object { "tshy": Object { "dialects": Array [ "esm", "commonjs", ], "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, }, }, "src", ], ], Array [ "self-link.unlink", Array [ Object { "tshy": Object { "dialects": Array [ "esm", "commonjs", ], "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, }, }, "src", ], ], Array [ "self-link.link", Array [ Object { "tshy": Object { "dialects": Array [ "esm", "commonjs", ], "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, }, }, "dist", ], ], ] ` exports[`test/build.ts > TAP > build commonjs only > must match snapshot 1`] = ` Array [ Array [ "self-link.link", Array [ Object { "tshy": Object { "dialects": Array [ "commonjs", ], "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, }, }, "src", ], ], Array [ "imports.link", Array [ Object { "tshy": Object { "dialects": Array [ "commonjs", ], "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, }, }, "src", ], ], Array [ "imports.unlink", Array [ Object { "tshy": Object { "dialects": Array [ "commonjs", ], "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, }, }, "src", ], ], Array [ "self-link.unlink", Array [ Object { "tshy": Object { "dialects": Array [ "commonjs", ], "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, }, }, "src", ], ], Array [ "self-link.link", Array [ Object { "tshy": Object { "dialects": Array [ "commonjs", ], "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, }, }, "dist", ], ], Array [ "self-link.link", Array [ Object { "tshy": Object { "dialects": Array [ "commonjs", ], "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, }, }, "src", ], ], Array [ "imports.link", Array [ Object { "tshy": Object { "dialects": Array [ "commonjs", ], "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, }, }, "src", ], ], Array [ "imports.unlink", Array [ Object { "tshy": Object { "dialects": Array [ "commonjs", ], "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, }, }, "src", ], ], Array [ "self-link.unlink", Array [ Object { "tshy": Object { "dialects": Array [ "commonjs", ], "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, }, }, "src", ], ], Array [ "self-link.link", Array [ Object { "tshy": Object { "dialects": Array [ "commonjs", ], "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, }, }, "dist", ], ], Array [ "self-link.link", Array [ Object { "tshy": Object { "dialects": Array [ "commonjs", ], "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, }, }, "src", ], ], Array [ "imports.link", Array [ Object { "tshy": Object { "dialects": Array [ "commonjs", ], "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, }, }, "src", ], ], Array [ "imports.unlink", Array [ Object { "tshy": Object { "dialects": Array [ "commonjs", ], "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, }, }, "src", ], ], Array [ "self-link.unlink", Array [ Object { "tshy": Object { "dialects": Array [ "commonjs", ], "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, }, }, "src", ], ], Array [ "self-link.link", Array [ Object { "tshy": Object { "dialects": Array [ "commonjs", ], "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, }, }, "dist", ], ], Array [ "self-link.link", Array [ Object { "tshy": Object { "dialects": Array [ "commonjs", ], "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, }, }, "src", ], ], Array [ "imports.link", Array [ Object { "tshy": Object { "dialects": Array [ "commonjs", ], "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, }, }, "src", ], ], Array [ "imports.unlink", Array [ Object { "tshy": Object { "dialects": Array [ "commonjs", ], "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, }, }, "src", ], ], Array [ "self-link.unlink", Array [ Object { "tshy": Object { "dialects": Array [ "commonjs", ], "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, }, }, "src", ], ], Array [ "self-link.link", Array [ Object { "tshy": Object { "dialects": Array [ "commonjs", ], "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, }, }, "dist", ], ], Array [ "self-link.link", Array [ Object { "tshy": Object { "dialects": Array [ "commonjs", ], "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, }, }, "src", ], ], Array [ "imports.link", Array [ Object { "tshy": Object { "dialects": Array [ "commonjs", ], "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, }, }, "src", ], ], Array [ "imports.unlink", Array [ Object { "tshy": Object { "dialects": Array [ "commonjs", ], "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, }, }, "src", ], ], Array [ "self-link.unlink", Array [ Object { "tshy": Object { "dialects": Array [ "commonjs", ], "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, }, }, "src", ], ], Array [ "self-link.link", Array [ Object { "tshy": Object { "dialects": Array [ "commonjs", ], "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, }, }, "dist", ], ], ] ` exports[`test/build.ts > TAP > build esm only > must match snapshot 1`] = ` Array [ Array [ "self-link.link", Array [ Object { "tshy": Object { "dialects": Array [ "esm", ], "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, }, }, "src", ], ], Array [ "imports.link", Array [ Object { "tshy": Object { "dialects": Array [ "esm", ], "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, }, }, "src", ], ], Array [ "imports.unlink", Array [ Object { "tshy": Object { "dialects": Array [ "esm", ], "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, }, }, "src", ], ], Array [ "self-link.unlink", Array [ Object { "tshy": Object { "dialects": Array [ "esm", ], "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, }, }, "src", ], ], Array [ "self-link.link", Array [ Object { "tshy": Object { "dialects": Array [ "esm", ], "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, }, }, "dist", ], ], Array [ "self-link.link", Array [ Object { "tshy": Object { "dialects": Array [ "esm", ], "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, }, }, "src", ], ], Array [ "imports.link", Array [ Object { "tshy": Object { "dialects": Array [ "esm", ], "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, }, }, "src", ], ], Array [ "imports.unlink", Array [ Object { "tshy": Object { "dialects": Array [ "esm", ], "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, }, }, "src", ], ], Array [ "self-link.unlink", Array [ Object { "tshy": Object { "dialects": Array [ "esm", ], "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, }, }, "src", ], ], Array [ "self-link.link", Array [ Object { "tshy": Object { "dialects": Array [ "esm", ], "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, }, }, "dist", ], ], Array [ "self-link.link", Array [ Object { "tshy": Object { "dialects": Array [ "esm", ], "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, }, }, "src", ], ], Array [ "imports.link", Array [ Object { "tshy": Object { "dialects": Array [ "esm", ], "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, }, }, "src", ], ], Array [ "imports.unlink", Array [ Object { "tshy": Object { "dialects": Array [ "esm", ], "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, }, }, "src", ], ], Array [ "self-link.unlink", Array [ Object { "tshy": Object { "dialects": Array [ "esm", ], "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, }, }, "src", ], ], Array [ "self-link.link", Array [ Object { "tshy": Object { "dialects": Array [ "esm", ], "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, }, }, "dist", ], ], Array [ "self-link.link", Array [ Object { "tshy": Object { "dialects": Array [ "esm", ], "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, }, }, "src", ], ], Array [ "imports.link", Array [ Object { "tshy": Object { "dialects": Array [ "esm", ], "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, }, }, "src", ], ], Array [ "imports.unlink", Array [ Object { "tshy": Object { "dialects": Array [ "esm", ], "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, }, }, "src", ], ], Array [ "self-link.unlink", Array [ Object { "tshy": Object { "dialects": Array [ "esm", ], "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, }, }, "src", ], ], Array [ "self-link.link", Array [ Object { "tshy": Object { "dialects": Array [ "esm", ], "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, }, }, "dist", ], ], Array [ "self-link.link", Array [ Object { "tshy": Object { "dialects": Array [ "esm", ], "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, }, }, "src", ], ], Array [ "imports.link", Array [ Object { "tshy": Object { "dialects": Array [ "esm", ], "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, }, }, "src", ], ], Array [ "imports.unlink", Array [ Object { "tshy": Object { "dialects": Array [ "esm", ], "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, }, }, "src", ], ], Array [ "self-link.unlink", Array [ Object { "tshy": Object { "dialects": Array [ "esm", ], "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, }, }, "src", ], ], Array [ "self-link.link", Array [ Object { "tshy": Object { "dialects": Array [ "esm", ], "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, }, }, "dist", ], ], Array [ "self-link.link", Array [ Object { "tshy": Object { "dialects": Array [ "esm", ], "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, }, }, "src", ], ], Array [ "imports.link", Array [ Object { "tshy": Object { "dialects": Array [ "esm", ], "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, }, }, "src", ], ], Array [ "imports.unlink", Array [ Object { "tshy": Object { "dialects": Array [ "esm", ], "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, }, }, "src", ], ], Array [ "self-link.unlink", Array [ Object { "tshy": Object { "dialects": Array [ "esm", ], "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, }, }, "src", ], ], Array [ "self-link.link", Array [ Object { "tshy": Object { "dialects": Array [ "esm", ], "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, }, }, "dist", ], ], ] ` exports[`test/build.ts > TAP > default settings > must match snapshot 1`] = ` Array [ Array [ "self-link.link", Array [ Object { "tshy": Object { "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, }, }, "src", ], ], Array [ "imports.link", Array [ Object { "tshy": Object { "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, }, }, "src", ], ], Array [ "imports.unlink", Array [ Object { "tshy": Object { "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, }, }, "src", ], ], Array [ "self-link.unlink", Array [ Object { "tshy": Object { "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, }, }, "src", ], ], Array [ "self-link.link", Array [ Object { "tshy": Object { "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, }, }, "dist", ], ], ] ` exports[`test/build.ts > TAP > imports linking > basic > must match snapshot 1`] = ` Array [ Array [ "self-link.link", Array [ Object { "tshy": Object { "dialects": Array [ "esm", "commonjs", ], "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, }, }, "src", ], ], Array [ "imports.link", Array [ Object { "tshy": Object { "dialects": Array [ "esm", "commonjs", ], "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, }, }, "src", ], ], Array [ "imports.unlink", Array [ Object { "tshy": Object { "dialects": Array [ "esm", "commonjs", ], "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, }, }, "src", ], ], Array [ "self-link.unlink", Array [ Object { "tshy": Object { "dialects": Array [ "esm", "commonjs", ], "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, }, }, "src", ], ], Array [ "self-link.link", Array [ Object { "tshy": Object { "dialects": Array [ "esm", "commonjs", ], "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, }, }, "dist", ], ], Array [ "self-link.link", Array [ Object { "tshy": Object { "dialects": Array [ "esm", "commonjs", ], "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, }, }, "src", ], ], Array [ "imports.link", Array [ Object { "tshy": Object { "dialects": Array [ "esm", "commonjs", ], "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, }, }, "src", ], ], Array [ "imports.unlink", Array [ Object { "tshy": Object { "dialects": Array [ "esm", "commonjs", ], "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, }, }, "src", ], ], Array [ "self-link.unlink", Array [ Object { "tshy": Object { "dialects": Array [ "esm", "commonjs", ], "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, }, }, "src", ], ], Array [ "self-link.link", Array [ Object { "tshy": Object { "dialects": Array [ "esm", "commonjs", ], "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, }, }, "dist", ], ], Array [ "self-link.link", Array [ Object { "tshy": Object { "dialects": Array [ "esm", "commonjs", ], "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, }, }, "src", ], ], Array [ "imports.link", Array [ Object { "tshy": Object { "dialects": Array [ "esm", "commonjs", ], "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, }, }, "src", ], ], Array [ "imports.unlink", Array [ Object { "tshy": Object { "dialects": Array [ "esm", "commonjs", ], "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, }, }, "src", ], ], Array [ "self-link.unlink", Array [ Object { "tshy": Object { "dialects": Array [ "esm", "commonjs", ], "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, }, }, "src", ], ], Array [ "self-link.link", Array [ Object { "tshy": Object { "dialects": Array [ "esm", "commonjs", ], "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, }, }, "dist", ], ], Array [ "self-link.link", Array [ Object { "tshy": Object { "dialects": Array [ "esm", "commonjs", ], "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, }, }, "src", ], ], Array [ "imports.link", Array [ Object { "tshy": Object { "dialects": Array [ "esm", "commonjs", ], "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, }, }, "src", ], ], Array [ "imports.unlink", Array [ Object { "tshy": Object { "dialects": Array [ "esm", "commonjs", ], "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, }, }, "src", ], ], Array [ "self-link.unlink", Array [ Object { "tshy": Object { "dialects": Array [ "esm", "commonjs", ], "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, }, }, "src", ], ], Array [ "self-link.link", Array [ Object { "tshy": Object { "dialects": Array [ "esm", "commonjs", ], "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, }, }, "dist", ], ], Array [ "self-link.link", Array [ Object { "tshy": Object { "dialects": Array [ "esm", "commonjs", ], "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, }, }, "src", ], ], Array [ "imports.link", Array [ Object { "tshy": Object { "dialects": Array [ "esm", "commonjs", ], "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, }, }, "src", ], ], Array [ "imports.unlink", Array [ Object { "tshy": Object { "dialects": Array [ "esm", "commonjs", ], "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, }, }, "src", ], ], Array [ "self-link.unlink", Array [ Object { "tshy": Object { "dialects": Array [ "esm", "commonjs", ], "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, }, }, "src", ], ], Array [ "self-link.link", Array [ Object { "tshy": Object { "dialects": Array [ "esm", "commonjs", ], "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, }, }, "dist", ], ], Array [ "self-link.link", Array [ Object { "tshy": Object { "dialects": Array [ "esm", "commonjs", ], "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, }, }, "src", ], ], Array [ "imports.link", Array [ Object { "tshy": Object { "dialects": Array [ "esm", "commonjs", ], "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, }, }, "src", ], ], Array [ "imports.unlink", Array [ Object { "tshy": Object { "dialects": Array [ "esm", "commonjs", ], "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, }, }, "src", ], ], Array [ "self-link.unlink", Array [ Object { "tshy": Object { "dialects": Array [ "esm", "commonjs", ], "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, }, }, "src", ], ], Array [ "self-link.link", Array [ Object { "tshy": Object { "dialects": Array [ "esm", "commonjs", ], "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, }, }, "dist", ], ], Array [ "self-link.link", Array [ Object { "tshy": Object { "dialects": Array [ "esm", "commonjs", ], "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, }, }, "src", ], ], Array [ "imports.link", Array [ Object { "tshy": Object { "dialects": Array [ "esm", "commonjs", ], "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, }, }, "src", ], ], Array [ "imports.unlink", Array [ Object { "tshy": Object { "dialects": Array [ "esm", "commonjs", ], "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, }, }, "src", ], ], Array [ "self-link.unlink", Array [ Object { "tshy": Object { "dialects": Array [ "esm", "commonjs", ], "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, }, }, "src", ], ], Array [ "self-link.link", Array [ Object { "tshy": Object { "dialects": Array [ "esm", "commonjs", ], "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, }, }, "dist", ], ], Array [ "self-link.link", Array [ Object { "imports": Object { "#foo": Object { "default": "./lib/foo-browser.js", "import": Array [ Object { "types": "./lib/foo.d.mts", }, "./lib/foo-import.mjs", ], "node": Object { "import": Array [ Object { "types": "./lib/foo.d.mts", }, "./lib/foo-node.mjs", ], "require": Array [ Object { "types": "./lib/foo.d.cts", }, "./lib/foo-node.cjs", ], }, "require": Array [ Object { "types": "./lib/foo.d.cts", }, "./lib/foo-require.cjs", ], "types": "./lib/foo-global.d.ts", }, "#fs": "node:fs", "#ri": "resolve-import", "#root": "./root.mjs", "#xp": "xyz/package.json", }, "name": "@my/package", "scripts": Object { "preinstall": "node -e \\"import(process.argv[1]).catch(()=>{})\\" dist/.tshy-link-imports.mjs", }, "tshy": Object { "exports": Object { ".": "./src/index.ts", "./foo": Object { "default": "./lib/foo-browser.js", "import": Array [ Object { "types": "./lib/foo.d.mts", }, "./lib/foo-import.mjs", ], "node": Object { "import": Array [ Object { "types": "./lib/foo.d.mts", }, "./lib/foo-node.mjs", ], "require": Array [ Object { "types": "./lib/foo.d.cts", }, "./lib/foo-node.cjs", ], }, "require": Array [ Object { "types": "./lib/foo.d.cts", }, "./lib/foo-require.cjs", ], "types": "./lib/foo-global.d.ts", }, "./package.json": "./package.json", }, }, "type": "module", }, "src", ], ], Array [ "imports.link", Array [ Object { "imports": Object { "#foo": Object { "default": "./lib/foo-browser.js", "import": Array [ Object { "types": "./lib/foo.d.mts", }, "./lib/foo-import.mjs", ], "node": Object { "import": Array [ Object { "types": "./lib/foo.d.mts", }, "./lib/foo-node.mjs", ], "require": Array [ Object { "types": "./lib/foo.d.cts", }, "./lib/foo-node.cjs", ], }, "require": Array [ Object { "types": "./lib/foo.d.cts", }, "./lib/foo-require.cjs", ], "types": "./lib/foo-global.d.ts", }, "#fs": "node:fs", "#ri": "resolve-import", "#root": "./root.mjs", "#xp": "xyz/package.json", }, "name": "@my/package", "scripts": Object { "preinstall": "node -e \\"import(process.argv[1]).catch(()=>{})\\" dist/.tshy-link-imports.mjs", }, "tshy": Object { "exports": Object { ".": "./src/index.ts", "./foo": Object { "default": "./lib/foo-browser.js", "import": Array [ Object { "types": "./lib/foo.d.mts", }, "./lib/foo-import.mjs", ], "node": Object { "import": Array [ Object { "types": "./lib/foo.d.mts", }, "./lib/foo-node.mjs", ], "require": Array [ Object { "types": "./lib/foo.d.cts", }, "./lib/foo-node.cjs", ], }, "require": Array [ Object { "types": "./lib/foo.d.cts", }, "./lib/foo-require.cjs", ], "types": "./lib/foo-global.d.ts", }, "./package.json": "./package.json", }, }, "type": "module", }, "src", ], ], Array [ "imports.unlink", Array [ Object { "imports": Object { "#foo": Object { "default": "./lib/foo-browser.js", "import": Array [ Object { "types": "./lib/foo.d.mts", }, "./lib/foo-import.mjs", ], "node": Object { "import": Array [ Object { "types": "./lib/foo.d.mts", }, "./lib/foo-node.mjs", ], "require": Array [ Object { "types": "./lib/foo.d.cts", }, "./lib/foo-node.cjs", ], }, "require": Array [ Object { "types": "./lib/foo.d.cts", }, "./lib/foo-require.cjs", ], "types": "./lib/foo-global.d.ts", }, "#fs": "node:fs", "#ri": "resolve-import", "#root": "./root.mjs", "#xp": "xyz/package.json", }, "name": "@my/package", "scripts": Object { "preinstall": "node -e \\"import(process.argv[1]).catch(()=>{})\\" dist/.tshy-link-imports.mjs", }, "tshy": Object { "exports": Object { ".": "./src/index.ts", "./foo": Object { "default": "./lib/foo-browser.js", "import": Array [ Object { "types": "./lib/foo.d.mts", }, "./lib/foo-import.mjs", ], "node": Object { "import": Array [ Object { "types": "./lib/foo.d.mts", }, "./lib/foo-node.mjs", ], "require": Array [ Object { "types": "./lib/foo.d.cts", }, "./lib/foo-node.cjs", ], }, "require": Array [ Object { "types": "./lib/foo.d.cts", }, "./lib/foo-require.cjs", ], "types": "./lib/foo-global.d.ts", }, "./package.json": "./package.json", }, }, "type": "module", }, "src", ], ], Array [ "self-link.unlink", Array [ Object { "imports": Object { "#foo": Object { "default": "./lib/foo-browser.js", "import": Array [ Object { "types": "./lib/foo.d.mts", }, "./lib/foo-import.mjs", ], "node": Object { "import": Array [ Object { "types": "./lib/foo.d.mts", }, "./lib/foo-node.mjs", ], "require": Array [ Object { "types": "./lib/foo.d.cts", }, "./lib/foo-node.cjs", ], }, "require": Array [ Object { "types": "./lib/foo.d.cts", }, "./lib/foo-require.cjs", ], "types": "./lib/foo-global.d.ts", }, "#fs": "node:fs", "#ri": "resolve-import", "#root": "./root.mjs", "#xp": "xyz/package.json", }, "name": "@my/package", "scripts": Object { "preinstall": "node -e \\"import(process.argv[1]).catch(()=>{})\\" dist/.tshy-link-imports.mjs", }, "tshy": Object { "exports": Object { ".": "./src/index.ts", "./foo": Object { "default": "./lib/foo-browser.js", "import": Array [ Object { "types": "./lib/foo.d.mts", }, "./lib/foo-import.mjs", ], "node": Object { "import": Array [ Object { "types": "./lib/foo.d.mts", }, "./lib/foo-node.mjs", ], "require": Array [ Object { "types": "./lib/foo.d.cts", }, "./lib/foo-node.cjs", ], }, "require": Array [ Object { "types": "./lib/foo.d.cts", }, "./lib/foo-require.cjs", ], "types": "./lib/foo-global.d.ts", }, "./package.json": "./package.json", }, }, "type": "module", }, "src", ], ], Array [ "self-link.link", Array [ Object { "imports": Object { "#foo": Object { "default": "./lib/foo-browser.js", "import": Array [ Object { "types": "./lib/foo.d.mts", }, "./lib/foo-import.mjs", ], "node": Object { "import": Array [ Object { "types": "./lib/foo.d.mts", }, "./lib/foo-node.mjs", ], "require": Array [ Object { "types": "./lib/foo.d.cts", }, "./lib/foo-node.cjs", ], }, "require": Array [ Object { "types": "./lib/foo.d.cts", }, "./lib/foo-require.cjs", ], "types": "./lib/foo-global.d.ts", }, "#fs": "node:fs", "#ri": "resolve-import", "#root": "./root.mjs", "#xp": "xyz/package.json", }, "name": "@my/package", "scripts": Object { "preinstall": "node -e \\"import(process.argv[1]).catch(()=>{})\\" dist/.tshy-link-imports.mjs", }, "tshy": Object { "exports": Object { ".": "./src/index.ts", "./foo": Object { "default": "./lib/foo-browser.js", "import": Array [ Object { "types": "./lib/foo.d.mts", }, "./lib/foo-import.mjs", ], "node": Object { "import": Array [ Object { "types": "./lib/foo.d.mts", }, "./lib/foo-node.mjs", ], "require": Array [ Object { "types": "./lib/foo.d.cts", }, "./lib/foo-node.cjs", ], }, "require": Array [ Object { "types": "./lib/foo.d.cts", }, "./lib/foo-require.cjs", ], "types": "./lib/foo-global.d.ts", }, "./package.json": "./package.json", }, }, "type": "module", }, "dist", ], ], Array [ "imports.link", Array [ Object { "imports": Object { "#foo": Object { "default": "./lib/foo-browser.js", "import": Array [ Object { "types": "./lib/foo.d.mts", }, "./lib/foo-import.mjs", ], "node": Object { "import": Array [ Object { "types": "./lib/foo.d.mts", }, "./lib/foo-node.mjs", ], "require": Array [ Object { "types": "./lib/foo.d.cts", }, "./lib/foo-node.cjs", ], }, "require": Array [ Object { "types": "./lib/foo.d.cts", }, "./lib/foo-require.cjs", ], "types": "./lib/foo-global.d.ts", }, "#fs": "node:fs", "#ri": "resolve-import", "#root": "./root.mjs", "#xp": "xyz/package.json", }, "name": "@my/package", "scripts": Object { "preinstall": "node -e \\"import(process.argv[1]).catch(()=>{})\\" dist/.tshy-link-imports.mjs", }, "tshy": Object { "exports": Object { ".": "./src/index.ts", "./foo": Object { "default": "./lib/foo-browser.js", "import": Array [ Object { "types": "./lib/foo.d.mts", }, "./lib/foo-import.mjs", ], "node": Object { "import": Array [ Object { "types": "./lib/foo.d.mts", }, "./lib/foo-node.mjs", ], "require": Array [ Object { "types": "./lib/foo.d.cts", }, "./lib/foo-node.cjs", ], }, "require": Array [ Object { "types": "./lib/foo.d.cts", }, "./lib/foo-require.cjs", ], "types": "./lib/foo-global.d.ts", }, "./package.json": "./package.json", }, }, "type": "module", }, "dist/commonjs", true, ], ], Array [ "imports.link", Array [ Object { "imports": Object { "#foo": Object { "default": "./lib/foo-browser.js", "import": Array [ Object { "types": "./lib/foo.d.mts", }, "./lib/foo-import.mjs", ], "node": Object { "import": Array [ Object { "types": "./lib/foo.d.mts", }, "./lib/foo-node.mjs", ], "require": Array [ Object { "types": "./lib/foo.d.cts", }, "./lib/foo-node.cjs", ], }, "require": Array [ Object { "types": "./lib/foo.d.cts", }, "./lib/foo-require.cjs", ], "types": "./lib/foo-global.d.ts", }, "#fs": "node:fs", "#ri": "resolve-import", "#root": "./root.mjs", "#xp": "xyz/package.json", }, "name": "@my/package", "scripts": Object { "preinstall": "node -e \\"import(process.argv[1]).catch(()=>{})\\" dist/.tshy-link-imports.mjs", }, "tshy": Object { "exports": Object { ".": "./src/index.ts", "./foo": Object { "default": "./lib/foo-browser.js", "import": Array [ Object { "types": "./lib/foo.d.mts", }, "./lib/foo-import.mjs", ], "node": Object { "import": Array [ Object { "types": "./lib/foo.d.mts", }, "./lib/foo-node.mjs", ], "require": Array [ Object { "types": "./lib/foo.d.cts", }, "./lib/foo-node.cjs", ], }, "require": Array [ Object { "types": "./lib/foo.d.cts", }, "./lib/foo-require.cjs", ], "types": "./lib/foo-global.d.ts", }, "./package.json": "./package.json", }, }, "type": "module", }, "dist/esm", true, ], ], Array [ "imports.save", Array [ "dist/.tshy-link-imports.mjs", ], ], Array [ "self-link.link", Array [ Object { "exports": Object { ".": Object { "import": Object { "default": "./dist/esm/index.js", "types": "./dist/esm/index.d.ts", }, "require": Object { "default": "./dist/commonjs/index.js", "types": "./dist/commonjs/index.d.ts", }, }, "./foo": Object { "default": "./lib/foo-browser.js", "import": Array [ Object { "types": "./lib/foo.d.mts", }, "./lib/foo-import.mjs", ], "node": Object { "import": Array [ Object { "types": "./lib/foo.d.mts", }, "./lib/foo-node.mjs", ], "require": Array [ Object { "types": "./lib/foo.d.cts", }, "./lib/foo-node.cjs", ], }, "require": Array [ Object { "types": "./lib/foo.d.cts", }, "./lib/foo-require.cjs", ], "types": "./lib/foo-global.d.ts", }, "./package.json": "./package.json", }, "imports": Object { "#c/*": "./lib/*.cjs", "#foo": Object { "default": "./lib/foo-browser.js", "import": Array [ Object { "types": "./lib/foo.d.mts", }, "./lib/foo-import.mjs", ], "node": Object { "import": Array [ Object { "types": "./lib/foo.d.mts", }, "./lib/foo-node.mjs", ], "require": Array [ Object { "types": "./lib/foo.d.cts", }, "./lib/foo-node.cjs", ], }, "require": Array [ Object { "types": "./lib/foo.d.cts", }, "./lib/foo-require.cjs", ], "types": "./lib/foo-global.d.ts", }, "#fs": "node:fs", "#m/*": "./lib/*.mjs", "#ri": "resolve-import", "#ri/*": "resolve-import/*", "#root": "./root.mjs", "#xp": "xyz/package.json", }, "name": "@my/package", "scripts": Object { "preinstall": "node -e \\"import(process.argv[1]).catch(()=>{})\\" dist/.tshy-link-imports.mjs", }, "tshy": Object { "exports": Object { ".": "./src/index.ts", "./foo": Object { "default": "./lib/foo-browser.js", "import": Array [ Object { "types": "./lib/foo.d.mts", }, "./lib/foo-import.mjs", ], "node": Object { "import": Array [ Object { "types": "./lib/foo.d.mts", }, "./lib/foo-node.mjs", ], "require": Array [ Object { "types": "./lib/foo.d.cts", }, "./lib/foo-node.cjs", ], }, "require": Array [ Object { "types": "./lib/foo.d.cts", }, "./lib/foo-require.cjs", ], "types": "./lib/foo-global.d.ts", }, "./package.json": "./package.json", }, }, "type": "module", }, "src", ], ], Array [ "imports.link", Array [ Object { "exports": Object { ".": Object { "import": Object { "default": "./dist/esm/index.js", "types": "./dist/esm/index.d.ts", }, "require": Object { "default": "./dist/commonjs/index.js", "types": "./dist/commonjs/index.d.ts", }, }, "./foo": Object { "default": "./lib/foo-browser.js", "import": Array [ Object { "types": "./lib/foo.d.mts", }, "./lib/foo-import.mjs", ], "node": Object { "import": Array [ Object { "types": "./lib/foo.d.mts", }, "./lib/foo-node.mjs", ], "require": Array [ Object { "types": "./lib/foo.d.cts", }, "./lib/foo-node.cjs", ], }, "require": Array [ Object { "types": "./lib/foo.d.cts", }, "./lib/foo-require.cjs", ], "types": "./lib/foo-global.d.ts", }, "./package.json": "./package.json", }, "imports": Object { "#c/*": "./lib/*.cjs", "#foo": Object { "default": "./lib/foo-browser.js", "import": Array [ Object { "types": "./lib/foo.d.mts", }, "./lib/foo-import.mjs", ], "node": Object { "import": Array [ Object { "types": "./lib/foo.d.mts", }, "./lib/foo-node.mjs", ], "require": Array [ Object { "types": "./lib/foo.d.cts", }, "./lib/foo-node.cjs", ], }, "require": Array [ Object { "types": "./lib/foo.d.cts", }, "./lib/foo-require.cjs", ], "types": "./lib/foo-global.d.ts", }, "#fs": "node:fs", "#m/*": "./lib/*.mjs", "#ri": "resolve-import", "#ri/*": "resolve-import/*", "#root": "./root.mjs", "#xp": "xyz/package.json", }, "name": "@my/package", "scripts": Object { "preinstall": "node -e \\"import(process.argv[1]).catch(()=>{})\\" dist/.tshy-link-imports.mjs", }, "tshy": Object { "exports": Object { ".": "./src/index.ts", "./foo": Object { "default": "./lib/foo-browser.js", "import": Array [ Object { "types": "./lib/foo.d.mts", }, "./lib/foo-import.mjs", ], "node": Object { "import": Array [ Object { "types": "./lib/foo.d.mts", }, "./lib/foo-node.mjs", ], "require": Array [ Object { "types": "./lib/foo.d.cts", }, "./lib/foo-node.cjs", ], }, "require": Array [ Object { "types": "./lib/foo.d.cts", }, "./lib/foo-require.cjs", ], "types": "./lib/foo-global.d.ts", }, "./package.json": "./package.json", }, }, "type": "module", }, "src", ], ], Array [ "imports.unlink", Array [ Object { "exports": Object { ".": Object { "import": Object { "default": "./dist/esm/index.js", "types": "./dist/esm/index.d.ts", }, "require": Object { "default": "./dist/commonjs/index.js", "types": "./dist/commonjs/index.d.ts", }, }, "./foo": Object { "default": "./lib/foo-browser.js", "import": Array [ Object { "types": "./lib/foo.d.mts", }, "./lib/foo-import.mjs", ], "node": Object { "import": Array [ Object { "types": "./lib/foo.d.mts", }, "./lib/foo-node.mjs", ], "require": Array [ Object { "types": "./lib/foo.d.cts", }, "./lib/foo-node.cjs", ], }, "require": Array [ Object { "types": "./lib/foo.d.cts", }, "./lib/foo-require.cjs", ], "types": "./lib/foo-global.d.ts", }, "./package.json": "./package.json", }, "imports": Object { "#c/*": "./lib/*.cjs", "#foo": Object { "default": "./lib/foo-browser.js", "import": Array [ Object { "types": "./lib/foo.d.mts", }, "./lib/foo-import.mjs", ], "node": Object { "import": Array [ Object { "types": "./lib/foo.d.mts", }, "./lib/foo-node.mjs", ], "require": Array [ Object { "types": "./lib/foo.d.cts", }, "./lib/foo-node.cjs", ], }, "require": Array [ Object { "types": "./lib/foo.d.cts", }, "./lib/foo-require.cjs", ], "types": "./lib/foo-global.d.ts", }, "#fs": "node:fs", "#m/*": "./lib/*.mjs", "#ri": "resolve-import", "#ri/*": "resolve-import/*", "#root": "./root.mjs", "#xp": "xyz/package.json", }, "name": "@my/package", "scripts": Object { "preinstall": "node -e \\"import(process.argv[1]).catch(()=>{})\\" dist/.tshy-link-imports.mjs", }, "tshy": Object { "exports": Object { ".": "./src/index.ts", "./foo": Object { "default": "./lib/foo-browser.js", "import": Array [ Object { "types": "./lib/foo.d.mts", }, "./lib/foo-import.mjs", ], "node": Object { "import": Array [ Object { "types": "./lib/foo.d.mts", }, "./lib/foo-node.mjs", ], "require": Array [ Object { "types": "./lib/foo.d.cts", }, "./lib/foo-node.cjs", ], }, "require": Array [ Object { "types": "./lib/foo.d.cts", }, "./lib/foo-require.cjs", ], "types": "./lib/foo-global.d.ts", }, "./package.json": "./package.json", }, }, "type": "module", }, "src", ], ], Array [ "self-link.unlink", Array [ Object { "exports": Object { ".": Object { "import": Object { "default": "./dist/esm/index.js", "types": "./dist/esm/index.d.ts", }, "require": Object { "default": "./dist/commonjs/index.js", "types": "./dist/commonjs/index.d.ts", }, }, "./foo": Object { "default": "./lib/foo-browser.js", "import": Array [ Object { "types": "./lib/foo.d.mts", }, "./lib/foo-import.mjs", ], "node": Object { "import": Array [ Object { "types": "./lib/foo.d.mts", }, "./lib/foo-node.mjs", ], "require": Array [ Object { "types": "./lib/foo.d.cts", }, "./lib/foo-node.cjs", ], }, "require": Array [ Object { "types": "./lib/foo.d.cts", }, "./lib/foo-require.cjs", ], "types": "./lib/foo-global.d.ts", }, "./package.json": "./package.json", }, "imports": Object { "#c/*": "./lib/*.cjs", "#foo": Object { "default": "./lib/foo-browser.js", "import": Array [ Object { "types": "./lib/foo.d.mts", }, "./lib/foo-import.mjs", ], "node": Object { "import": Array [ Object { "types": "./lib/foo.d.mts", }, "./lib/foo-node.mjs", ], "require": Array [ Object { "types": "./lib/foo.d.cts", }, "./lib/foo-node.cjs", ], }, "require": Array [ Object { "types": "./lib/foo.d.cts", }, "./lib/foo-require.cjs", ], "types": "./lib/foo-global.d.ts", }, "#fs": "node:fs", "#m/*": "./lib/*.mjs", "#ri": "resolve-import", "#ri/*": "resolve-import/*", "#root": "./root.mjs", "#xp": "xyz/package.json", }, "name": "@my/package", "scripts": Object { "preinstall": "node -e \\"import(process.argv[1]).catch(()=>{})\\" dist/.tshy-link-imports.mjs", }, "tshy": Object { "exports": Object { ".": "./src/index.ts", "./foo": Object { "default": "./lib/foo-browser.js", "import": Array [ Object { "types": "./lib/foo.d.mts", }, "./lib/foo-import.mjs", ], "node": Object { "import": Array [ Object { "types": "./lib/foo.d.mts", }, "./lib/foo-node.mjs", ], "require": Array [ Object { "types": "./lib/foo.d.cts", }, "./lib/foo-node.cjs", ], }, "require": Array [ Object { "types": "./lib/foo.d.cts", }, "./lib/foo-require.cjs", ], "types": "./lib/foo-global.d.ts", }, "./package.json": "./package.json", }, }, "type": "module", }, "src", ], ], Array [ "self-link.link", Array [ Object { "exports": Object { ".": Object { "import": Object { "default": "./dist/esm/index.js", "types": "./dist/esm/index.d.ts", }, "require": Object { "default": "./dist/commonjs/index.js", "types": "./dist/commonjs/index.d.ts", }, }, "./foo": Object { "default": "./lib/foo-browser.js", "import": Array [ Object { "types": "./lib/foo.d.mts", }, "./lib/foo-import.mjs", ], "node": Object { "import": Array [ Object { "types": "./lib/foo.d.mts", }, "./lib/foo-node.mjs", ], "require": Array [ Object { "types": "./lib/foo.d.cts", }, "./lib/foo-node.cjs", ], }, "require": Array [ Object { "types": "./lib/foo.d.cts", }, "./lib/foo-require.cjs", ], "types": "./lib/foo-global.d.ts", }, "./package.json": "./package.json", }, "imports": Object { "#c/*": "./lib/*.cjs", "#foo": Object { "default": "./lib/foo-browser.js", "import": Array [ Object { "types": "./lib/foo.d.mts", }, "./lib/foo-import.mjs", ], "node": Object { "import": Array [ Object { "types": "./lib/foo.d.mts", }, "./lib/foo-node.mjs", ], "require": Array [ Object { "types": "./lib/foo.d.cts", }, "./lib/foo-node.cjs", ], }, "require": Array [ Object { "types": "./lib/foo.d.cts", }, "./lib/foo-require.cjs", ], "types": "./lib/foo-global.d.ts", }, "#fs": "node:fs", "#m/*": "./lib/*.mjs", "#ri": "resolve-import", "#ri/*": "resolve-import/*", "#root": "./root.mjs", "#xp": "xyz/package.json", }, "name": "@my/package", "scripts": Object { "preinstall": "node -e \\"import(process.argv[1]).catch(()=>{})\\" dist/.tshy-link-imports.mjs", }, "tshy": Object { "exports": Object { ".": "./src/index.ts", "./foo": Object { "default": "./lib/foo-browser.js", "import": Array [ Object { "types": "./lib/foo.d.mts", }, "./lib/foo-import.mjs", ], "node": Object { "import": Array [ Object { "types": "./lib/foo.d.mts", }, "./lib/foo-node.mjs", ], "require": Array [ Object { "types": "./lib/foo.d.cts", }, "./lib/foo-node.cjs", ], }, "require": Array [ Object { "types": "./lib/foo.d.cts", }, "./lib/foo-require.cjs", ], "types": "./lib/foo-global.d.ts", }, "./package.json": "./package.json", }, }, "type": "module", }, "dist", ], ], Array [ "imports.link", Array [ Object { "exports": Object { ".": Object { "import": Object { "default": "./dist/esm/index.js", "types": "./dist/esm/index.d.ts", }, "require": Object { "default": "./dist/commonjs/index.js", "types": "./dist/commonjs/index.d.ts", }, }, "./foo": Object { "default": "./lib/foo-browser.js", "import": Array [ Object { "types": "./lib/foo.d.mts", }, "./lib/foo-import.mjs", ], "node": Object { "import": Array [ Object { "types": "./lib/foo.d.mts", }, "./lib/foo-node.mjs", ], "require": Array [ Object { "types": "./lib/foo.d.cts", }, "./lib/foo-node.cjs", ], }, "require": Array [ Object { "types": "./lib/foo.d.cts", }, "./lib/foo-require.cjs", ], "types": "./lib/foo-global.d.ts", }, "./package.json": "./package.json", }, "imports": Object { "#c/*": "./lib/*.cjs", "#foo": Object { "default": "./lib/foo-browser.js", "import": Array [ Object { "types": "./lib/foo.d.mts", }, "./lib/foo-import.mjs", ], "node": Object { "import": Array [ Object { "types": "./lib/foo.d.mts", }, "./lib/foo-node.mjs", ], "require": Array [ Object { "types": "./lib/foo.d.cts", }, "./lib/foo-node.cjs", ], }, "require": Array [ Object { "types": "./lib/foo.d.cts", }, "./lib/foo-require.cjs", ], "types": "./lib/foo-global.d.ts", }, "#fs": "node:fs", "#m/*": "./lib/*.mjs", "#ri": "resolve-import", "#ri/*": "resolve-import/*", "#root": "./root.mjs", "#xp": "xyz/package.json", }, "name": "@my/package", "scripts": Object { "preinstall": "node -e \\"import(process.argv[1]).catch(()=>{})\\" dist/.tshy-link-imports.mjs", }, "tshy": Object { "exports": Object { ".": "./src/index.ts", "./foo": Object { "default": "./lib/foo-browser.js", "import": Array [ Object { "types": "./lib/foo.d.mts", }, "./lib/foo-import.mjs", ], "node": Object { "import": Array [ Object { "types": "./lib/foo.d.mts", }, "./lib/foo-node.mjs", ], "require": Array [ Object { "types": "./lib/foo.d.cts", }, "./lib/foo-node.cjs", ], }, "require": Array [ Object { "types": "./lib/foo.d.cts", }, "./lib/foo-require.cjs", ], "types": "./lib/foo-global.d.ts", }, "./package.json": "./package.json", }, }, "type": "module", }, "dist/commonjs", true, ], ], Array [ "imports.link", Array [ Object { "exports": Object { ".": Object { "import": Object { "default": "./dist/esm/index.js", "types": "./dist/esm/index.d.ts", }, "require": Object { "default": "./dist/commonjs/index.js", "types": "./dist/commonjs/index.d.ts", }, }, "./foo": Object { "default": "./lib/foo-browser.js", "import": Array [ Object { "types": "./lib/foo.d.mts", }, "./lib/foo-import.mjs", ], "node": Object { "import": Array [ Object { "types": "./lib/foo.d.mts", }, "./lib/foo-node.mjs", ], "require": Array [ Object { "types": "./lib/foo.d.cts", }, "./lib/foo-node.cjs", ], }, "require": Array [ Object { "types": "./lib/foo.d.cts", }, "./lib/foo-require.cjs", ], "types": "./lib/foo-global.d.ts", }, "./package.json": "./package.json", }, "imports": Object { "#c/*": "./lib/*.cjs", "#foo": Object { "default": "./lib/foo-browser.js", "import": Array [ Object { "types": "./lib/foo.d.mts", }, "./lib/foo-import.mjs", ], "node": Object { "import": Array [ Object { "types": "./lib/foo.d.mts", }, "./lib/foo-node.mjs", ], "require": Array [ Object { "types": "./lib/foo.d.cts", }, "./lib/foo-node.cjs", ], }, "require": Array [ Object { "types": "./lib/foo.d.cts", }, "./lib/foo-require.cjs", ], "types": "./lib/foo-global.d.ts", }, "#fs": "node:fs", "#m/*": "./lib/*.mjs", "#ri": "resolve-import", "#ri/*": "resolve-import/*", "#root": "./root.mjs", "#xp": "xyz/package.json", }, "name": "@my/package", "scripts": Object { "preinstall": "node -e \\"import(process.argv[1]).catch(()=>{})\\" dist/.tshy-link-imports.mjs", }, "tshy": Object { "exports": Object { ".": "./src/index.ts", "./foo": Object { "default": "./lib/foo-browser.js", "import": Array [ Object { "types": "./lib/foo.d.mts", }, "./lib/foo-import.mjs", ], "node": Object { "import": Array [ Object { "types": "./lib/foo.d.mts", }, "./lib/foo-node.mjs", ], "require": Array [ Object { "types": "./lib/foo.d.cts", }, "./lib/foo-node.cjs", ], }, "require": Array [ Object { "types": "./lib/foo.d.cts", }, "./lib/foo-require.cjs", ], "types": "./lib/foo-global.d.ts", }, "./package.json": "./package.json", }, }, "type": "module", }, "dist/esm", true, ], ], Array [ "imports.save", Array [ "dist/.tshy-link-imports.mjs", ], ], Array [ "self-link.link", Array [ Object { "name": "@my/package", "tshy": Object { "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, }, "type": "module", }, "src", ], ], Array [ "imports.link", Array [ Object { "name": "@my/package", "tshy": Object { "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, }, "type": "module", }, "src", ], ], Array [ "imports.unlink", Array [ Object { "name": "@my/package", "tshy": Object { "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, }, "type": "module", }, "src", ], ], Array [ "self-link.unlink", Array [ Object { "name": "@my/package", "tshy": Object { "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, }, "type": "module", }, "src", ], ], Array [ "self-link.link", Array [ Object { "name": "@my/package", "tshy": Object { "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, }, "type": "module", }, "dist", ], ], ] ` exports[`test/build.ts > TAP > imports linking > imports > must match snapshot 1`] = ` Array [ Array [ "self-link.link", Array [ Object { "tshy": Object { "dialects": Array [ "esm", "commonjs", ], "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, }, }, "src", ], ], Array [ "imports.link", Array [ Object { "tshy": Object { "dialects": Array [ "esm", "commonjs", ], "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, }, }, "src", ], ], Array [ "imports.unlink", Array [ Object { "tshy": Object { "dialects": Array [ "esm", "commonjs", ], "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, }, }, "src", ], ], Array [ "self-link.unlink", Array [ Object { "tshy": Object { "dialects": Array [ "esm", "commonjs", ], "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, }, }, "src", ], ], Array [ "self-link.link", Array [ Object { "tshy": Object { "dialects": Array [ "esm", "commonjs", ], "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, }, }, "dist", ], ], Array [ "self-link.link", Array [ Object { "tshy": Object { "dialects": Array [ "esm", "commonjs", ], "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, }, }, "src", ], ], Array [ "imports.link", Array [ Object { "tshy": Object { "dialects": Array [ "esm", "commonjs", ], "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, }, }, "src", ], ], Array [ "imports.unlink", Array [ Object { "tshy": Object { "dialects": Array [ "esm", "commonjs", ], "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, }, }, "src", ], ], Array [ "self-link.unlink", Array [ Object { "tshy": Object { "dialects": Array [ "esm", "commonjs", ], "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, }, }, "src", ], ], Array [ "self-link.link", Array [ Object { "tshy": Object { "dialects": Array [ "esm", "commonjs", ], "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, }, }, "dist", ], ], Array [ "self-link.link", Array [ Object { "tshy": Object { "dialects": Array [ "esm", "commonjs", ], "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, }, }, "src", ], ], Array [ "imports.link", Array [ Object { "tshy": Object { "dialects": Array [ "esm", "commonjs", ], "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, }, }, "src", ], ], Array [ "imports.unlink", Array [ Object { "tshy": Object { "dialects": Array [ "esm", "commonjs", ], "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, }, }, "src", ], ], Array [ "self-link.unlink", Array [ Object { "tshy": Object { "dialects": Array [ "esm", "commonjs", ], "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, }, }, "src", ], ], Array [ "self-link.link", Array [ Object { "tshy": Object { "dialects": Array [ "esm", "commonjs", ], "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, }, }, "dist", ], ], Array [ "self-link.link", Array [ Object { "tshy": Object { "dialects": Array [ "esm", "commonjs", ], "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, }, }, "src", ], ], Array [ "imports.link", Array [ Object { "tshy": Object { "dialects": Array [ "esm", "commonjs", ], "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, }, }, "src", ], ], Array [ "imports.unlink", Array [ Object { "tshy": Object { "dialects": Array [ "esm", "commonjs", ], "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, }, }, "src", ], ], Array [ "self-link.unlink", Array [ Object { "tshy": Object { "dialects": Array [ "esm", "commonjs", ], "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, }, }, "src", ], ], Array [ "self-link.link", Array [ Object { "tshy": Object { "dialects": Array [ "esm", "commonjs", ], "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, }, }, "dist", ], ], Array [ "self-link.link", Array [ Object { "tshy": Object { "dialects": Array [ "esm", "commonjs", ], "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, }, }, "src", ], ], Array [ "imports.link", Array [ Object { "tshy": Object { "dialects": Array [ "esm", "commonjs", ], "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, }, }, "src", ], ], Array [ "imports.unlink", Array [ Object { "tshy": Object { "dialects": Array [ "esm", "commonjs", ], "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, }, }, "src", ], ], Array [ "self-link.unlink", Array [ Object { "tshy": Object { "dialects": Array [ "esm", "commonjs", ], "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, }, }, "src", ], ], Array [ "self-link.link", Array [ Object { "tshy": Object { "dialects": Array [ "esm", "commonjs", ], "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, }, }, "dist", ], ], Array [ "self-link.link", Array [ Object { "tshy": Object { "dialects": Array [ "esm", "commonjs", ], "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, }, }, "src", ], ], Array [ "imports.link", Array [ Object { "tshy": Object { "dialects": Array [ "esm", "commonjs", ], "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, }, }, "src", ], ], Array [ "imports.unlink", Array [ Object { "tshy": Object { "dialects": Array [ "esm", "commonjs", ], "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, }, }, "src", ], ], Array [ "self-link.unlink", Array [ Object { "tshy": Object { "dialects": Array [ "esm", "commonjs", ], "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, }, }, "src", ], ], Array [ "self-link.link", Array [ Object { "tshy": Object { "dialects": Array [ "esm", "commonjs", ], "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, }, }, "dist", ], ], Array [ "self-link.link", Array [ Object { "tshy": Object { "dialects": Array [ "esm", "commonjs", ], "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, }, }, "src", ], ], Array [ "imports.link", Array [ Object { "tshy": Object { "dialects": Array [ "esm", "commonjs", ], "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, }, }, "src", ], ], Array [ "imports.unlink", Array [ Object { "tshy": Object { "dialects": Array [ "esm", "commonjs", ], "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, }, }, "src", ], ], Array [ "self-link.unlink", Array [ Object { "tshy": Object { "dialects": Array [ "esm", "commonjs", ], "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, }, }, "src", ], ], Array [ "self-link.link", Array [ Object { "tshy": Object { "dialects": Array [ "esm", "commonjs", ], "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, }, }, "dist", ], ], Array [ "self-link.link", Array [ Object { "imports": Object { "#foo": Object { "default": "./lib/foo-browser.js", "import": Array [ Object { "types": "./lib/foo.d.mts", }, "./lib/foo-import.mjs", ], "node": Object { "import": Array [ Object { "types": "./lib/foo.d.mts", }, "./lib/foo-node.mjs", ], "require": Array [ Object { "types": "./lib/foo.d.cts", }, "./lib/foo-node.cjs", ], }, "require": Array [ Object { "types": "./lib/foo.d.cts", }, "./lib/foo-require.cjs", ], "types": "./lib/foo-global.d.ts", }, "#fs": "node:fs", "#ri": "resolve-import", "#root": "./root.mjs", "#xp": "xyz/package.json", }, "name": "@my/package", "scripts": Object { "preinstall": "node -e \\"import(process.argv[1]).catch(()=>{})\\" dist/.tshy-link-imports.mjs", }, "tshy": Object { "exports": Object { ".": "./src/index.ts", "./foo": Object { "default": "./lib/foo-browser.js", "import": Array [ Object { "types": "./lib/foo.d.mts", }, "./lib/foo-import.mjs", ], "node": Object { "import": Array [ Object { "types": "./lib/foo.d.mts", }, "./lib/foo-node.mjs", ], "require": Array [ Object { "types": "./lib/foo.d.cts", }, "./lib/foo-node.cjs", ], }, "require": Array [ Object { "types": "./lib/foo.d.cts", }, "./lib/foo-require.cjs", ], "types": "./lib/foo-global.d.ts", }, "./package.json": "./package.json", }, }, "type": "module", }, "src", ], ], Array [ "imports.link", Array [ Object { "imports": Object { "#foo": Object { "default": "./lib/foo-browser.js", "import": Array [ Object { "types": "./lib/foo.d.mts", }, "./lib/foo-import.mjs", ], "node": Object { "import": Array [ Object { "types": "./lib/foo.d.mts", }, "./lib/foo-node.mjs", ], "require": Array [ Object { "types": "./lib/foo.d.cts", }, "./lib/foo-node.cjs", ], }, "require": Array [ Object { "types": "./lib/foo.d.cts", }, "./lib/foo-require.cjs", ], "types": "./lib/foo-global.d.ts", }, "#fs": "node:fs", "#ri": "resolve-import", "#root": "./root.mjs", "#xp": "xyz/package.json", }, "name": "@my/package", "scripts": Object { "preinstall": "node -e \\"import(process.argv[1]).catch(()=>{})\\" dist/.tshy-link-imports.mjs", }, "tshy": Object { "exports": Object { ".": "./src/index.ts", "./foo": Object { "default": "./lib/foo-browser.js", "import": Array [ Object { "types": "./lib/foo.d.mts", }, "./lib/foo-import.mjs", ], "node": Object { "import": Array [ Object { "types": "./lib/foo.d.mts", }, "./lib/foo-node.mjs", ], "require": Array [ Object { "types": "./lib/foo.d.cts", }, "./lib/foo-node.cjs", ], }, "require": Array [ Object { "types": "./lib/foo.d.cts", }, "./lib/foo-require.cjs", ], "types": "./lib/foo-global.d.ts", }, "./package.json": "./package.json", }, }, "type": "module", }, "src", ], ], Array [ "imports.unlink", Array [ Object { "imports": Object { "#foo": Object { "default": "./lib/foo-browser.js", "import": Array [ Object { "types": "./lib/foo.d.mts", }, "./lib/foo-import.mjs", ], "node": Object { "import": Array [ Object { "types": "./lib/foo.d.mts", }, "./lib/foo-node.mjs", ], "require": Array [ Object { "types": "./lib/foo.d.cts", }, "./lib/foo-node.cjs", ], }, "require": Array [ Object { "types": "./lib/foo.d.cts", }, "./lib/foo-require.cjs", ], "types": "./lib/foo-global.d.ts", }, "#fs": "node:fs", "#ri": "resolve-import", "#root": "./root.mjs", "#xp": "xyz/package.json", }, "name": "@my/package", "scripts": Object { "preinstall": "node -e \\"import(process.argv[1]).catch(()=>{})\\" dist/.tshy-link-imports.mjs", }, "tshy": Object { "exports": Object { ".": "./src/index.ts", "./foo": Object { "default": "./lib/foo-browser.js", "import": Array [ Object { "types": "./lib/foo.d.mts", }, "./lib/foo-import.mjs", ], "node": Object { "import": Array [ Object { "types": "./lib/foo.d.mts", }, "./lib/foo-node.mjs", ], "require": Array [ Object { "types": "./lib/foo.d.cts", }, "./lib/foo-node.cjs", ], }, "require": Array [ Object { "types": "./lib/foo.d.cts", }, "./lib/foo-require.cjs", ], "types": "./lib/foo-global.d.ts", }, "./package.json": "./package.json", }, }, "type": "module", }, "src", ], ], Array [ "self-link.unlink", Array [ Object { "imports": Object { "#foo": Object { "default": "./lib/foo-browser.js", "import": Array [ Object { "types": "./lib/foo.d.mts", }, "./lib/foo-import.mjs", ], "node": Object { "import": Array [ Object { "types": "./lib/foo.d.mts", }, "./lib/foo-node.mjs", ], "require": Array [ Object { "types": "./lib/foo.d.cts", }, "./lib/foo-node.cjs", ], }, "require": Array [ Object { "types": "./lib/foo.d.cts", }, "./lib/foo-require.cjs", ], "types": "./lib/foo-global.d.ts", }, "#fs": "node:fs", "#ri": "resolve-import", "#root": "./root.mjs", "#xp": "xyz/package.json", }, "name": "@my/package", "scripts": Object { "preinstall": "node -e \\"import(process.argv[1]).catch(()=>{})\\" dist/.tshy-link-imports.mjs", }, "tshy": Object { "exports": Object { ".": "./src/index.ts", "./foo": Object { "default": "./lib/foo-browser.js", "import": Array [ Object { "types": "./lib/foo.d.mts", }, "./lib/foo-import.mjs", ], "node": Object { "import": Array [ Object { "types": "./lib/foo.d.mts", }, "./lib/foo-node.mjs", ], "require": Array [ Object { "types": "./lib/foo.d.cts", }, "./lib/foo-node.cjs", ], }, "require": Array [ Object { "types": "./lib/foo.d.cts", }, "./lib/foo-require.cjs", ], "types": "./lib/foo-global.d.ts", }, "./package.json": "./package.json", }, }, "type": "module", }, "src", ], ], Array [ "self-link.link", Array [ Object { "imports": Object { "#foo": Object { "default": "./lib/foo-browser.js", "import": Array [ Object { "types": "./lib/foo.d.mts", }, "./lib/foo-import.mjs", ], "node": Object { "import": Array [ Object { "types": "./lib/foo.d.mts", }, "./lib/foo-node.mjs", ], "require": Array [ Object { "types": "./lib/foo.d.cts", }, "./lib/foo-node.cjs", ], }, "require": Array [ Object { "types": "./lib/foo.d.cts", }, "./lib/foo-require.cjs", ], "types": "./lib/foo-global.d.ts", }, "#fs": "node:fs", "#ri": "resolve-import", "#root": "./root.mjs", "#xp": "xyz/package.json", }, "name": "@my/package", "scripts": Object { "preinstall": "node -e \\"import(process.argv[1]).catch(()=>{})\\" dist/.tshy-link-imports.mjs", }, "tshy": Object { "exports": Object { ".": "./src/index.ts", "./foo": Object { "default": "./lib/foo-browser.js", "import": Array [ Object { "types": "./lib/foo.d.mts", }, "./lib/foo-import.mjs", ], "node": Object { "import": Array [ Object { "types": "./lib/foo.d.mts", }, "./lib/foo-node.mjs", ], "require": Array [ Object { "types": "./lib/foo.d.cts", }, "./lib/foo-node.cjs", ], }, "require": Array [ Object { "types": "./lib/foo.d.cts", }, "./lib/foo-require.cjs", ], "types": "./lib/foo-global.d.ts", }, "./package.json": "./package.json", }, }, "type": "module", }, "dist", ], ], Array [ "imports.link", Array [ Object { "imports": Object { "#foo": Object { "default": "./lib/foo-browser.js", "import": Array [ Object { "types": "./lib/foo.d.mts", }, "./lib/foo-import.mjs", ], "node": Object { "import": Array [ Object { "types": "./lib/foo.d.mts", }, "./lib/foo-node.mjs", ], "require": Array [ Object { "types": "./lib/foo.d.cts", }, "./lib/foo-node.cjs", ], }, "require": Array [ Object { "types": "./lib/foo.d.cts", }, "./lib/foo-require.cjs", ], "types": "./lib/foo-global.d.ts", }, "#fs": "node:fs", "#ri": "resolve-import", "#root": "./root.mjs", "#xp": "xyz/package.json", }, "name": "@my/package", "scripts": Object { "preinstall": "node -e \\"import(process.argv[1]).catch(()=>{})\\" dist/.tshy-link-imports.mjs", }, "tshy": Object { "exports": Object { ".": "./src/index.ts", "./foo": Object { "default": "./lib/foo-browser.js", "import": Array [ Object { "types": "./lib/foo.d.mts", }, "./lib/foo-import.mjs", ], "node": Object { "import": Array [ Object { "types": "./lib/foo.d.mts", }, "./lib/foo-node.mjs", ], "require": Array [ Object { "types": "./lib/foo.d.cts", }, "./lib/foo-node.cjs", ], }, "require": Array [ Object { "types": "./lib/foo.d.cts", }, "./lib/foo-require.cjs", ], "types": "./lib/foo-global.d.ts", }, "./package.json": "./package.json", }, }, "type": "module", }, "dist/commonjs", true, ], ], Array [ "imports.link", Array [ Object { "imports": Object { "#foo": Object { "default": "./lib/foo-browser.js", "import": Array [ Object { "types": "./lib/foo.d.mts", }, "./lib/foo-import.mjs", ], "node": Object { "import": Array [ Object { "types": "./lib/foo.d.mts", }, "./lib/foo-node.mjs", ], "require": Array [ Object { "types": "./lib/foo.d.cts", }, "./lib/foo-node.cjs", ], }, "require": Array [ Object { "types": "./lib/foo.d.cts", }, "./lib/foo-require.cjs", ], "types": "./lib/foo-global.d.ts", }, "#fs": "node:fs", "#ri": "resolve-import", "#root": "./root.mjs", "#xp": "xyz/package.json", }, "name": "@my/package", "scripts": Object { "preinstall": "node -e \\"import(process.argv[1]).catch(()=>{})\\" dist/.tshy-link-imports.mjs", }, "tshy": Object { "exports": Object { ".": "./src/index.ts", "./foo": Object { "default": "./lib/foo-browser.js", "import": Array [ Object { "types": "./lib/foo.d.mts", }, "./lib/foo-import.mjs", ], "node": Object { "import": Array [ Object { "types": "./lib/foo.d.mts", }, "./lib/foo-node.mjs", ], "require": Array [ Object { "types": "./lib/foo.d.cts", }, "./lib/foo-node.cjs", ], }, "require": Array [ Object { "types": "./lib/foo.d.cts", }, "./lib/foo-require.cjs", ], "types": "./lib/foo-global.d.ts", }, "./package.json": "./package.json", }, }, "type": "module", }, "dist/esm", true, ], ], Array [ "imports.save", Array [ "dist/.tshy-link-imports.mjs", ], ], ] ` exports[`test/build.ts > TAP > imports linking > imports-with-star > must match snapshot 1`] = ` Array [ Array [ "self-link.link", Array [ Object { "tshy": Object { "dialects": Array [ "esm", "commonjs", ], "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, }, }, "src", ], ], Array [ "imports.link", Array [ Object { "tshy": Object { "dialects": Array [ "esm", "commonjs", ], "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, }, }, "src", ], ], Array [ "imports.unlink", Array [ Object { "tshy": Object { "dialects": Array [ "esm", "commonjs", ], "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, }, }, "src", ], ], Array [ "self-link.unlink", Array [ Object { "tshy": Object { "dialects": Array [ "esm", "commonjs", ], "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, }, }, "src", ], ], Array [ "self-link.link", Array [ Object { "tshy": Object { "dialects": Array [ "esm", "commonjs", ], "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, }, }, "dist", ], ], Array [ "self-link.link", Array [ Object { "tshy": Object { "dialects": Array [ "esm", "commonjs", ], "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, }, }, "src", ], ], Array [ "imports.link", Array [ Object { "tshy": Object { "dialects": Array [ "esm", "commonjs", ], "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, }, }, "src", ], ], Array [ "imports.unlink", Array [ Object { "tshy": Object { "dialects": Array [ "esm", "commonjs", ], "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, }, }, "src", ], ], Array [ "self-link.unlink", Array [ Object { "tshy": Object { "dialects": Array [ "esm", "commonjs", ], "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, }, }, "src", ], ], Array [ "self-link.link", Array [ Object { "tshy": Object { "dialects": Array [ "esm", "commonjs", ], "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, }, }, "dist", ], ], Array [ "self-link.link", Array [ Object { "tshy": Object { "dialects": Array [ "esm", "commonjs", ], "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, }, }, "src", ], ], Array [ "imports.link", Array [ Object { "tshy": Object { "dialects": Array [ "esm", "commonjs", ], "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, }, }, "src", ], ], Array [ "imports.unlink", Array [ Object { "tshy": Object { "dialects": Array [ "esm", "commonjs", ], "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, }, }, "src", ], ], Array [ "self-link.unlink", Array [ Object { "tshy": Object { "dialects": Array [ "esm", "commonjs", ], "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, }, }, "src", ], ], Array [ "self-link.link", Array [ Object { "tshy": Object { "dialects": Array [ "esm", "commonjs", ], "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, }, }, "dist", ], ], Array [ "self-link.link", Array [ Object { "tshy": Object { "dialects": Array [ "esm", "commonjs", ], "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, }, }, "src", ], ], Array [ "imports.link", Array [ Object { "tshy": Object { "dialects": Array [ "esm", "commonjs", ], "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, }, }, "src", ], ], Array [ "imports.unlink", Array [ Object { "tshy": Object { "dialects": Array [ "esm", "commonjs", ], "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, }, }, "src", ], ], Array [ "self-link.unlink", Array [ Object { "tshy": Object { "dialects": Array [ "esm", "commonjs", ], "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, }, }, "src", ], ], Array [ "self-link.link", Array [ Object { "tshy": Object { "dialects": Array [ "esm", "commonjs", ], "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, }, }, "dist", ], ], Array [ "self-link.link", Array [ Object { "tshy": Object { "dialects": Array [ "esm", "commonjs", ], "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, }, }, "src", ], ], Array [ "imports.link", Array [ Object { "tshy": Object { "dialects": Array [ "esm", "commonjs", ], "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, }, }, "src", ], ], Array [ "imports.unlink", Array [ Object { "tshy": Object { "dialects": Array [ "esm", "commonjs", ], "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, }, }, "src", ], ], Array [ "self-link.unlink", Array [ Object { "tshy": Object { "dialects": Array [ "esm", "commonjs", ], "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, }, }, "src", ], ], Array [ "self-link.link", Array [ Object { "tshy": Object { "dialects": Array [ "esm", "commonjs", ], "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, }, }, "dist", ], ], Array [ "self-link.link", Array [ Object { "tshy": Object { "dialects": Array [ "esm", "commonjs", ], "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, }, }, "src", ], ], Array [ "imports.link", Array [ Object { "tshy": Object { "dialects": Array [ "esm", "commonjs", ], "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, }, }, "src", ], ], Array [ "imports.unlink", Array [ Object { "tshy": Object { "dialects": Array [ "esm", "commonjs", ], "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, }, }, "src", ], ], Array [ "self-link.unlink", Array [ Object { "tshy": Object { "dialects": Array [ "esm", "commonjs", ], "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, }, }, "src", ], ], Array [ "self-link.link", Array [ Object { "tshy": Object { "dialects": Array [ "esm", "commonjs", ], "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, }, }, "dist", ], ], Array [ "self-link.link", Array [ Object { "tshy": Object { "dialects": Array [ "esm", "commonjs", ], "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, }, }, "src", ], ], Array [ "imports.link", Array [ Object { "tshy": Object { "dialects": Array [ "esm", "commonjs", ], "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, }, }, "src", ], ], Array [ "imports.unlink", Array [ Object { "tshy": Object { "dialects": Array [ "esm", "commonjs", ], "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, }, }, "src", ], ], Array [ "self-link.unlink", Array [ Object { "tshy": Object { "dialects": Array [ "esm", "commonjs", ], "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, }, }, "src", ], ], Array [ "self-link.link", Array [ Object { "tshy": Object { "dialects": Array [ "esm", "commonjs", ], "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, }, }, "dist", ], ], Array [ "self-link.link", Array [ Object { "imports": Object { "#foo": Object { "default": "./lib/foo-browser.js", "import": Array [ Object { "types": "./lib/foo.d.mts", }, "./lib/foo-import.mjs", ], "node": Object { "import": Array [ Object { "types": "./lib/foo.d.mts", }, "./lib/foo-node.mjs", ], "require": Array [ Object { "types": "./lib/foo.d.cts", }, "./lib/foo-node.cjs", ], }, "require": Array [ Object { "types": "./lib/foo.d.cts", }, "./lib/foo-require.cjs", ], "types": "./lib/foo-global.d.ts", }, "#fs": "node:fs", "#ri": "resolve-import", "#root": "./root.mjs", "#xp": "xyz/package.json", }, "name": "@my/package", "scripts": Object { "preinstall": "node -e \\"import(process.argv[1]).catch(()=>{})\\" dist/.tshy-link-imports.mjs", }, "tshy": Object { "exports": Object { ".": "./src/index.ts", "./foo": Object { "default": "./lib/foo-browser.js", "import": Array [ Object { "types": "./lib/foo.d.mts", }, "./lib/foo-import.mjs", ], "node": Object { "import": Array [ Object { "types": "./lib/foo.d.mts", }, "./lib/foo-node.mjs", ], "require": Array [ Object { "types": "./lib/foo.d.cts", }, "./lib/foo-node.cjs", ], }, "require": Array [ Object { "types": "./lib/foo.d.cts", }, "./lib/foo-require.cjs", ], "types": "./lib/foo-global.d.ts", }, "./package.json": "./package.json", }, }, "type": "module", }, "src", ], ], Array [ "imports.link", Array [ Object { "imports": Object { "#foo": Object { "default": "./lib/foo-browser.js", "import": Array [ Object { "types": "./lib/foo.d.mts", }, "./lib/foo-import.mjs", ], "node": Object { "import": Array [ Object { "types": "./lib/foo.d.mts", }, "./lib/foo-node.mjs", ], "require": Array [ Object { "types": "./lib/foo.d.cts", }, "./lib/foo-node.cjs", ], }, "require": Array [ Object { "types": "./lib/foo.d.cts", }, "./lib/foo-require.cjs", ], "types": "./lib/foo-global.d.ts", }, "#fs": "node:fs", "#ri": "resolve-import", "#root": "./root.mjs", "#xp": "xyz/package.json", }, "name": "@my/package", "scripts": Object { "preinstall": "node -e \\"import(process.argv[1]).catch(()=>{})\\" dist/.tshy-link-imports.mjs", }, "tshy": Object { "exports": Object { ".": "./src/index.ts", "./foo": Object { "default": "./lib/foo-browser.js", "import": Array [ Object { "types": "./lib/foo.d.mts", }, "./lib/foo-import.mjs", ], "node": Object { "import": Array [ Object { "types": "./lib/foo.d.mts", }, "./lib/foo-node.mjs", ], "require": Array [ Object { "types": "./lib/foo.d.cts", }, "./lib/foo-node.cjs", ], }, "require": Array [ Object { "types": "./lib/foo.d.cts", }, "./lib/foo-require.cjs", ], "types": "./lib/foo-global.d.ts", }, "./package.json": "./package.json", }, }, "type": "module", }, "src", ], ], Array [ "imports.unlink", Array [ Object { "imports": Object { "#foo": Object { "default": "./lib/foo-browser.js", "import": Array [ Object { "types": "./lib/foo.d.mts", }, "./lib/foo-import.mjs", ], "node": Object { "import": Array [ Object { "types": "./lib/foo.d.mts", }, "./lib/foo-node.mjs", ], "require": Array [ Object { "types": "./lib/foo.d.cts", }, "./lib/foo-node.cjs", ], }, "require": Array [ Object { "types": "./lib/foo.d.cts", }, "./lib/foo-require.cjs", ], "types": "./lib/foo-global.d.ts", }, "#fs": "node:fs", "#ri": "resolve-import", "#root": "./root.mjs", "#xp": "xyz/package.json", }, "name": "@my/package", "scripts": Object { "preinstall": "node -e \\"import(process.argv[1]).catch(()=>{})\\" dist/.tshy-link-imports.mjs", }, "tshy": Object { "exports": Object { ".": "./src/index.ts", "./foo": Object { "default": "./lib/foo-browser.js", "import": Array [ Object { "types": "./lib/foo.d.mts", }, "./lib/foo-import.mjs", ], "node": Object { "import": Array [ Object { "types": "./lib/foo.d.mts", }, "./lib/foo-node.mjs", ], "require": Array [ Object { "types": "./lib/foo.d.cts", }, "./lib/foo-node.cjs", ], }, "require": Array [ Object { "types": "./lib/foo.d.cts", }, "./lib/foo-require.cjs", ], "types": "./lib/foo-global.d.ts", }, "./package.json": "./package.json", }, }, "type": "module", }, "src", ], ], Array [ "self-link.unlink", Array [ Object { "imports": Object { "#foo": Object { "default": "./lib/foo-browser.js", "import": Array [ Object { "types": "./lib/foo.d.mts", }, "./lib/foo-import.mjs", ], "node": Object { "import": Array [ Object { "types": "./lib/foo.d.mts", }, "./lib/foo-node.mjs", ], "require": Array [ Object { "types": "./lib/foo.d.cts", }, "./lib/foo-node.cjs", ], }, "require": Array [ Object { "types": "./lib/foo.d.cts", }, "./lib/foo-require.cjs", ], "types": "./lib/foo-global.d.ts", }, "#fs": "node:fs", "#ri": "resolve-import", "#root": "./root.mjs", "#xp": "xyz/package.json", }, "name": "@my/package", "scripts": Object { "preinstall": "node -e \\"import(process.argv[1]).catch(()=>{})\\" dist/.tshy-link-imports.mjs", }, "tshy": Object { "exports": Object { ".": "./src/index.ts", "./foo": Object { "default": "./lib/foo-browser.js", "import": Array [ Object { "types": "./lib/foo.d.mts", }, "./lib/foo-import.mjs", ], "node": Object { "import": Array [ Object { "types": "./lib/foo.d.mts", }, "./lib/foo-node.mjs", ], "require": Array [ Object { "types": "./lib/foo.d.cts", }, "./lib/foo-node.cjs", ], }, "require": Array [ Object { "types": "./lib/foo.d.cts", }, "./lib/foo-require.cjs", ], "types": "./lib/foo-global.d.ts", }, "./package.json": "./package.json", }, }, "type": "module", }, "src", ], ], Array [ "self-link.link", Array [ Object { "imports": Object { "#foo": Object { "default": "./lib/foo-browser.js", "import": Array [ Object { "types": "./lib/foo.d.mts", }, "./lib/foo-import.mjs", ], "node": Object { "import": Array [ Object { "types": "./lib/foo.d.mts", }, "./lib/foo-node.mjs", ], "require": Array [ Object { "types": "./lib/foo.d.cts", }, "./lib/foo-node.cjs", ], }, "require": Array [ Object { "types": "./lib/foo.d.cts", }, "./lib/foo-require.cjs", ], "types": "./lib/foo-global.d.ts", }, "#fs": "node:fs", "#ri": "resolve-import", "#root": "./root.mjs", "#xp": "xyz/package.json", }, "name": "@my/package", "scripts": Object { "preinstall": "node -e \\"import(process.argv[1]).catch(()=>{})\\" dist/.tshy-link-imports.mjs", }, "tshy": Object { "exports": Object { ".": "./src/index.ts", "./foo": Object { "default": "./lib/foo-browser.js", "import": Array [ Object { "types": "./lib/foo.d.mts", }, "./lib/foo-import.mjs", ], "node": Object { "import": Array [ Object { "types": "./lib/foo.d.mts", }, "./lib/foo-node.mjs", ], "require": Array [ Object { "types": "./lib/foo.d.cts", }, "./lib/foo-node.cjs", ], }, "require": Array [ Object { "types": "./lib/foo.d.cts", }, "./lib/foo-require.cjs", ], "types": "./lib/foo-global.d.ts", }, "./package.json": "./package.json", }, }, "type": "module", }, "dist", ], ], Array [ "imports.link", Array [ Object { "imports": Object { "#foo": Object { "default": "./lib/foo-browser.js", "import": Array [ Object { "types": "./lib/foo.d.mts", }, "./lib/foo-import.mjs", ], "node": Object { "import": Array [ Object { "types": "./lib/foo.d.mts", }, "./lib/foo-node.mjs", ], "require": Array [ Object { "types": "./lib/foo.d.cts", }, "./lib/foo-node.cjs", ], }, "require": Array [ Object { "types": "./lib/foo.d.cts", }, "./lib/foo-require.cjs", ], "types": "./lib/foo-global.d.ts", }, "#fs": "node:fs", "#ri": "resolve-import", "#root": "./root.mjs", "#xp": "xyz/package.json", }, "name": "@my/package", "scripts": Object { "preinstall": "node -e \\"import(process.argv[1]).catch(()=>{})\\" dist/.tshy-link-imports.mjs", }, "tshy": Object { "exports": Object { ".": "./src/index.ts", "./foo": Object { "default": "./lib/foo-browser.js", "import": Array [ Object { "types": "./lib/foo.d.mts", }, "./lib/foo-import.mjs", ], "node": Object { "import": Array [ Object { "types": "./lib/foo.d.mts", }, "./lib/foo-node.mjs", ], "require": Array [ Object { "types": "./lib/foo.d.cts", }, "./lib/foo-node.cjs", ], }, "require": Array [ Object { "types": "./lib/foo.d.cts", }, "./lib/foo-require.cjs", ], "types": "./lib/foo-global.d.ts", }, "./package.json": "./package.json", }, }, "type": "module", }, "dist/commonjs", true, ], ], Array [ "imports.link", Array [ Object { "imports": Object { "#foo": Object { "default": "./lib/foo-browser.js", "import": Array [ Object { "types": "./lib/foo.d.mts", }, "./lib/foo-import.mjs", ], "node": Object { "import": Array [ Object { "types": "./lib/foo.d.mts", }, "./lib/foo-node.mjs", ], "require": Array [ Object { "types": "./lib/foo.d.cts", }, "./lib/foo-node.cjs", ], }, "require": Array [ Object { "types": "./lib/foo.d.cts", }, "./lib/foo-require.cjs", ], "types": "./lib/foo-global.d.ts", }, "#fs": "node:fs", "#ri": "resolve-import", "#root": "./root.mjs", "#xp": "xyz/package.json", }, "name": "@my/package", "scripts": Object { "preinstall": "node -e \\"import(process.argv[1]).catch(()=>{})\\" dist/.tshy-link-imports.mjs", }, "tshy": Object { "exports": Object { ".": "./src/index.ts", "./foo": Object { "default": "./lib/foo-browser.js", "import": Array [ Object { "types": "./lib/foo.d.mts", }, "./lib/foo-import.mjs", ], "node": Object { "import": Array [ Object { "types": "./lib/foo.d.mts", }, "./lib/foo-node.mjs", ], "require": Array [ Object { "types": "./lib/foo.d.cts", }, "./lib/foo-node.cjs", ], }, "require": Array [ Object { "types": "./lib/foo.d.cts", }, "./lib/foo-require.cjs", ], "types": "./lib/foo-global.d.ts", }, "./package.json": "./package.json", }, }, "type": "module", }, "dist/esm", true, ], ], Array [ "imports.save", Array [ "dist/.tshy-link-imports.mjs", ], ], Array [ "self-link.link", Array [ Object { "exports": Object { ".": Object { "import": Object { "default": "./dist/esm/index.js", "types": "./dist/esm/index.d.ts", }, "require": Object { "default": "./dist/commonjs/index.js", "types": "./dist/commonjs/index.d.ts", }, }, "./foo": Object { "default": "./lib/foo-browser.js", "import": Array [ Object { "types": "./lib/foo.d.mts", }, "./lib/foo-import.mjs", ], "node": Object { "import": Array [ Object { "types": "./lib/foo.d.mts", }, "./lib/foo-node.mjs", ], "require": Array [ Object { "types": "./lib/foo.d.cts", }, "./lib/foo-node.cjs", ], }, "require": Array [ Object { "types": "./lib/foo.d.cts", }, "./lib/foo-require.cjs", ], "types": "./lib/foo-global.d.ts", }, "./package.json": "./package.json", }, "imports": Object { "#c/*": "./lib/*.cjs", "#foo": Object { "default": "./lib/foo-browser.js", "import": Array [ Object { "types": "./lib/foo.d.mts", }, "./lib/foo-import.mjs", ], "node": Object { "import": Array [ Object { "types": "./lib/foo.d.mts", }, "./lib/foo-node.mjs", ], "require": Array [ Object { "types": "./lib/foo.d.cts", }, "./lib/foo-node.cjs", ], }, "require": Array [ Object { "types": "./lib/foo.d.cts", }, "./lib/foo-require.cjs", ], "types": "./lib/foo-global.d.ts", }, "#fs": "node:fs", "#m/*": "./lib/*.mjs", "#ri": "resolve-import", "#ri/*": "resolve-import/*", "#root": "./root.mjs", "#xp": "xyz/package.json", }, "name": "@my/package", "scripts": Object { "preinstall": "node -e \\"import(process.argv[1]).catch(()=>{})\\" dist/.tshy-link-imports.mjs", }, "tshy": Object { "exports": Object { ".": "./src/index.ts", "./foo": Object { "default": "./lib/foo-browser.js", "import": Array [ Object { "types": "./lib/foo.d.mts", }, "./lib/foo-import.mjs", ], "node": Object { "import": Array [ Object { "types": "./lib/foo.d.mts", }, "./lib/foo-node.mjs", ], "require": Array [ Object { "types": "./lib/foo.d.cts", }, "./lib/foo-node.cjs", ], }, "require": Array [ Object { "types": "./lib/foo.d.cts", }, "./lib/foo-require.cjs", ], "types": "./lib/foo-global.d.ts", }, "./package.json": "./package.json", }, }, "type": "module", }, "src", ], ], Array [ "imports.link", Array [ Object { "exports": Object { ".": Object { "import": Object { "default": "./dist/esm/index.js", "types": "./dist/esm/index.d.ts", }, "require": Object { "default": "./dist/commonjs/index.js", "types": "./dist/commonjs/index.d.ts", }, }, "./foo": Object { "default": "./lib/foo-browser.js", "import": Array [ Object { "types": "./lib/foo.d.mts", }, "./lib/foo-import.mjs", ], "node": Object { "import": Array [ Object { "types": "./lib/foo.d.mts", }, "./lib/foo-node.mjs", ], "require": Array [ Object { "types": "./lib/foo.d.cts", }, "./lib/foo-node.cjs", ], }, "require": Array [ Object { "types": "./lib/foo.d.cts", }, "./lib/foo-require.cjs", ], "types": "./lib/foo-global.d.ts", }, "./package.json": "./package.json", }, "imports": Object { "#c/*": "./lib/*.cjs", "#foo": Object { "default": "./lib/foo-browser.js", "import": Array [ Object { "types": "./lib/foo.d.mts", }, "./lib/foo-import.mjs", ], "node": Object { "import": Array [ Object { "types": "./lib/foo.d.mts", }, "./lib/foo-node.mjs", ], "require": Array [ Object { "types": "./lib/foo.d.cts", }, "./lib/foo-node.cjs", ], }, "require": Array [ Object { "types": "./lib/foo.d.cts", }, "./lib/foo-require.cjs", ], "types": "./lib/foo-global.d.ts", }, "#fs": "node:fs", "#m/*": "./lib/*.mjs", "#ri": "resolve-import", "#ri/*": "resolve-import/*", "#root": "./root.mjs", "#xp": "xyz/package.json", }, "name": "@my/package", "scripts": Object { "preinstall": "node -e \\"import(process.argv[1]).catch(()=>{})\\" dist/.tshy-link-imports.mjs", }, "tshy": Object { "exports": Object { ".": "./src/index.ts", "./foo": Object { "default": "./lib/foo-browser.js", "import": Array [ Object { "types": "./lib/foo.d.mts", }, "./lib/foo-import.mjs", ], "node": Object { "import": Array [ Object { "types": "./lib/foo.d.mts", }, "./lib/foo-node.mjs", ], "require": Array [ Object { "types": "./lib/foo.d.cts", }, "./lib/foo-node.cjs", ], }, "require": Array [ Object { "types": "./lib/foo.d.cts", }, "./lib/foo-require.cjs", ], "types": "./lib/foo-global.d.ts", }, "./package.json": "./package.json", }, }, "type": "module", }, "src", ], ], Array [ "imports.unlink", Array [ Object { "exports": Object { ".": Object { "import": Object { "default": "./dist/esm/index.js", "types": "./dist/esm/index.d.ts", }, "require": Object { "default": "./dist/commonjs/index.js", "types": "./dist/commonjs/index.d.ts", }, }, "./foo": Object { "default": "./lib/foo-browser.js", "import": Array [ Object { "types": "./lib/foo.d.mts", }, "./lib/foo-import.mjs", ], "node": Object { "import": Array [ Object { "types": "./lib/foo.d.mts", }, "./lib/foo-node.mjs", ], "require": Array [ Object { "types": "./lib/foo.d.cts", }, "./lib/foo-node.cjs", ], }, "require": Array [ Object { "types": "./lib/foo.d.cts", }, "./lib/foo-require.cjs", ], "types": "./lib/foo-global.d.ts", }, "./package.json": "./package.json", }, "imports": Object { "#c/*": "./lib/*.cjs", "#foo": Object { "default": "./lib/foo-browser.js", "import": Array [ Object { "types": "./lib/foo.d.mts", }, "./lib/foo-import.mjs", ], "node": Object { "import": Array [ Object { "types": "./lib/foo.d.mts", }, "./lib/foo-node.mjs", ], "require": Array [ Object { "types": "./lib/foo.d.cts", }, "./lib/foo-node.cjs", ], }, "require": Array [ Object { "types": "./lib/foo.d.cts", }, "./lib/foo-require.cjs", ], "types": "./lib/foo-global.d.ts", }, "#fs": "node:fs", "#m/*": "./lib/*.mjs", "#ri": "resolve-import", "#ri/*": "resolve-import/*", "#root": "./root.mjs", "#xp": "xyz/package.json", }, "name": "@my/package", "scripts": Object { "preinstall": "node -e \\"import(process.argv[1]).catch(()=>{})\\" dist/.tshy-link-imports.mjs", }, "tshy": Object { "exports": Object { ".": "./src/index.ts", "./foo": Object { "default": "./lib/foo-browser.js", "import": Array [ Object { "types": "./lib/foo.d.mts", }, "./lib/foo-import.mjs", ], "node": Object { "import": Array [ Object { "types": "./lib/foo.d.mts", }, "./lib/foo-node.mjs", ], "require": Array [ Object { "types": "./lib/foo.d.cts", }, "./lib/foo-node.cjs", ], }, "require": Array [ Object { "types": "./lib/foo.d.cts", }, "./lib/foo-require.cjs", ], "types": "./lib/foo-global.d.ts", }, "./package.json": "./package.json", }, }, "type": "module", }, "src", ], ], Array [ "self-link.unlink", Array [ Object { "exports": Object { ".": Object { "import": Object { "default": "./dist/esm/index.js", "types": "./dist/esm/index.d.ts", }, "require": Object { "default": "./dist/commonjs/index.js", "types": "./dist/commonjs/index.d.ts", }, }, "./foo": Object { "default": "./lib/foo-browser.js", "import": Array [ Object { "types": "./lib/foo.d.mts", }, "./lib/foo-import.mjs", ], "node": Object { "import": Array [ Object { "types": "./lib/foo.d.mts", }, "./lib/foo-node.mjs", ], "require": Array [ Object { "types": "./lib/foo.d.cts", }, "./lib/foo-node.cjs", ], }, "require": Array [ Object { "types": "./lib/foo.d.cts", }, "./lib/foo-require.cjs", ], "types": "./lib/foo-global.d.ts", }, "./package.json": "./package.json", }, "imports": Object { "#c/*": "./lib/*.cjs", "#foo": Object { "default": "./lib/foo-browser.js", "import": Array [ Object { "types": "./lib/foo.d.mts", }, "./lib/foo-import.mjs", ], "node": Object { "import": Array [ Object { "types": "./lib/foo.d.mts", }, "./lib/foo-node.mjs", ], "require": Array [ Object { "types": "./lib/foo.d.cts", }, "./lib/foo-node.cjs", ], }, "require": Array [ Object { "types": "./lib/foo.d.cts", }, "./lib/foo-require.cjs", ], "types": "./lib/foo-global.d.ts", }, "#fs": "node:fs", "#m/*": "./lib/*.mjs", "#ri": "resolve-import", "#ri/*": "resolve-import/*", "#root": "./root.mjs", "#xp": "xyz/package.json", }, "name": "@my/package", "scripts": Object { "preinstall": "node -e \\"import(process.argv[1]).catch(()=>{})\\" dist/.tshy-link-imports.mjs", }, "tshy": Object { "exports": Object { ".": "./src/index.ts", "./foo": Object { "default": "./lib/foo-browser.js", "import": Array [ Object { "types": "./lib/foo.d.mts", }, "./lib/foo-import.mjs", ], "node": Object { "import": Array [ Object { "types": "./lib/foo.d.mts", }, "./lib/foo-node.mjs", ], "require": Array [ Object { "types": "./lib/foo.d.cts", }, "./lib/foo-node.cjs", ], }, "require": Array [ Object { "types": "./lib/foo.d.cts", }, "./lib/foo-require.cjs", ], "types": "./lib/foo-global.d.ts", }, "./package.json": "./package.json", }, }, "type": "module", }, "src", ], ], Array [ "self-link.link", Array [ Object { "exports": Object { ".": Object { "import": Object { "default": "./dist/esm/index.js", "types": "./dist/esm/index.d.ts", }, "require": Object { "default": "./dist/commonjs/index.js", "types": "./dist/commonjs/index.d.ts", }, }, "./foo": Object { "default": "./lib/foo-browser.js", "import": Array [ Object { "types": "./lib/foo.d.mts", }, "./lib/foo-import.mjs", ], "node": Object { "import": Array [ Object { "types": "./lib/foo.d.mts", }, "./lib/foo-node.mjs", ], "require": Array [ Object { "types": "./lib/foo.d.cts", }, "./lib/foo-node.cjs", ], }, "require": Array [ Object { "types": "./lib/foo.d.cts", }, "./lib/foo-require.cjs", ], "types": "./lib/foo-global.d.ts", }, "./package.json": "./package.json", }, "imports": Object { "#c/*": "./lib/*.cjs", "#foo": Object { "default": "./lib/foo-browser.js", "import": Array [ Object { "types": "./lib/foo.d.mts", }, "./lib/foo-import.mjs", ], "node": Object { "import": Array [ Object { "types": "./lib/foo.d.mts", }, "./lib/foo-node.mjs", ], "require": Array [ Object { "types": "./lib/foo.d.cts", }, "./lib/foo-node.cjs", ], }, "require": Array [ Object { "types": "./lib/foo.d.cts", }, "./lib/foo-require.cjs", ], "types": "./lib/foo-global.d.ts", }, "#fs": "node:fs", "#m/*": "./lib/*.mjs", "#ri": "resolve-import", "#ri/*": "resolve-import/*", "#root": "./root.mjs", "#xp": "xyz/package.json", }, "name": "@my/package", "scripts": Object { "preinstall": "node -e \\"import(process.argv[1]).catch(()=>{})\\" dist/.tshy-link-imports.mjs", }, "tshy": Object { "exports": Object { ".": "./src/index.ts", "./foo": Object { "default": "./lib/foo-browser.js", "import": Array [ Object { "types": "./lib/foo.d.mts", }, "./lib/foo-import.mjs", ], "node": Object { "import": Array [ Object { "types": "./lib/foo.d.mts", }, "./lib/foo-node.mjs", ], "require": Array [ Object { "types": "./lib/foo.d.cts", }, "./lib/foo-node.cjs", ], }, "require": Array [ Object { "types": "./lib/foo.d.cts", }, "./lib/foo-require.cjs", ], "types": "./lib/foo-global.d.ts", }, "./package.json": "./package.json", }, }, "type": "module", }, "dist", ], ], Array [ "imports.link", Array [ Object { "exports": Object { ".": Object { "import": Object { "default": "./dist/esm/index.js", "types": "./dist/esm/index.d.ts", }, "require": Object { "default": "./dist/commonjs/index.js", "types": "./dist/commonjs/index.d.ts", }, }, "./foo": Object { "default": "./lib/foo-browser.js", "import": Array [ Object { "types": "./lib/foo.d.mts", }, "./lib/foo-import.mjs", ], "node": Object { "import": Array [ Object { "types": "./lib/foo.d.mts", }, "./lib/foo-node.mjs", ], "require": Array [ Object { "types": "./lib/foo.d.cts", }, "./lib/foo-node.cjs", ], }, "require": Array [ Object { "types": "./lib/foo.d.cts", }, "./lib/foo-require.cjs", ], "types": "./lib/foo-global.d.ts", }, "./package.json": "./package.json", }, "imports": Object { "#c/*": "./lib/*.cjs", "#foo": Object { "default": "./lib/foo-browser.js", "import": Array [ Object { "types": "./lib/foo.d.mts", }, "./lib/foo-import.mjs", ], "node": Object { "import": Array [ Object { "types": "./lib/foo.d.mts", }, "./lib/foo-node.mjs", ], "require": Array [ Object { "types": "./lib/foo.d.cts", }, "./lib/foo-node.cjs", ], }, "require": Array [ Object { "types": "./lib/foo.d.cts", }, "./lib/foo-require.cjs", ], "types": "./lib/foo-global.d.ts", }, "#fs": "node:fs", "#m/*": "./lib/*.mjs", "#ri": "resolve-import", "#ri/*": "resolve-import/*", "#root": "./root.mjs", "#xp": "xyz/package.json", }, "name": "@my/package", "scripts": Object { "preinstall": "node -e \\"import(process.argv[1]).catch(()=>{})\\" dist/.tshy-link-imports.mjs", }, "tshy": Object { "exports": Object { ".": "./src/index.ts", "./foo": Object { "default": "./lib/foo-browser.js", "import": Array [ Object { "types": "./lib/foo.d.mts", }, "./lib/foo-import.mjs", ], "node": Object { "import": Array [ Object { "types": "./lib/foo.d.mts", }, "./lib/foo-node.mjs", ], "require": Array [ Object { "types": "./lib/foo.d.cts", }, "./lib/foo-node.cjs", ], }, "require": Array [ Object { "types": "./lib/foo.d.cts", }, "./lib/foo-require.cjs", ], "types": "./lib/foo-global.d.ts", }, "./package.json": "./package.json", }, }, "type": "module", }, "dist/commonjs", true, ], ], Array [ "imports.link", Array [ Object { "exports": Object { ".": Object { "import": Object { "default": "./dist/esm/index.js", "types": "./dist/esm/index.d.ts", }, "require": Object { "default": "./dist/commonjs/index.js", "types": "./dist/commonjs/index.d.ts", }, }, "./foo": Object { "default": "./lib/foo-browser.js", "import": Array [ Object { "types": "./lib/foo.d.mts", }, "./lib/foo-import.mjs", ], "node": Object { "import": Array [ Object { "types": "./lib/foo.d.mts", }, "./lib/foo-node.mjs", ], "require": Array [ Object { "types": "./lib/foo.d.cts", }, "./lib/foo-node.cjs", ], }, "require": Array [ Object { "types": "./lib/foo.d.cts", }, "./lib/foo-require.cjs", ], "types": "./lib/foo-global.d.ts", }, "./package.json": "./package.json", }, "imports": Object { "#c/*": "./lib/*.cjs", "#foo": Object { "default": "./lib/foo-browser.js", "import": Array [ Object { "types": "./lib/foo.d.mts", }, "./lib/foo-import.mjs", ], "node": Object { "import": Array [ Object { "types": "./lib/foo.d.mts", }, "./lib/foo-node.mjs", ], "require": Array [ Object { "types": "./lib/foo.d.cts", }, "./lib/foo-node.cjs", ], }, "require": Array [ Object { "types": "./lib/foo.d.cts", }, "./lib/foo-require.cjs", ], "types": "./lib/foo-global.d.ts", }, "#fs": "node:fs", "#m/*": "./lib/*.mjs", "#ri": "resolve-import", "#ri/*": "resolve-import/*", "#root": "./root.mjs", "#xp": "xyz/package.json", }, "name": "@my/package", "scripts": Object { "preinstall": "node -e \\"import(process.argv[1]).catch(()=>{})\\" dist/.tshy-link-imports.mjs", }, "tshy": Object { "exports": Object { ".": "./src/index.ts", "./foo": Object { "default": "./lib/foo-browser.js", "import": Array [ Object { "types": "./lib/foo.d.mts", }, "./lib/foo-import.mjs", ], "node": Object { "import": Array [ Object { "types": "./lib/foo.d.mts", }, "./lib/foo-node.mjs", ], "require": Array [ Object { "types": "./lib/foo.d.cts", }, "./lib/foo-node.cjs", ], }, "require": Array [ Object { "types": "./lib/foo.d.cts", }, "./lib/foo-require.cjs", ], "types": "./lib/foo-global.d.ts", }, "./package.json": "./package.json", }, }, "type": "module", }, "dist/esm", true, ], ], Array [ "imports.save", Array [ "dist/.tshy-link-imports.mjs", ], ], ] ` exports[`test/build.ts > TAP > liveDev > no envs > must match snapshot 1`] = ` Array [ Array [ "self-link.link", Array [ Object { "tshy": Object { "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, "liveDev": true, }, }, "src", ], ], Array [ "imports.link", Array [ Object { "tshy": Object { "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, "liveDev": true, }, }, "src", ], ], Array [ "imports.unlink", Array [ Object { "tshy": Object { "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, "liveDev": true, }, }, "src", ], ], Array [ "self-link.unlink", Array [ Object { "tshy": Object { "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, "liveDev": true, }, }, "src", ], ], Array [ "self-link.link", Array [ Object { "tshy": Object { "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, "liveDev": true, }, }, "dist", ], ], Array [ "self-link.link", Array [ Object { "tshy": Object { "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, "liveDev": true, }, }, "src", ], ], Array [ "imports.link", Array [ Object { "tshy": Object { "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, "liveDev": true, }, }, "src", ], ], Array [ "imports.unlink", Array [ Object { "tshy": Object { "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, "liveDev": true, }, }, "src", ], ], Array [ "self-link.unlink", Array [ Object { "tshy": Object { "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, "liveDev": true, }, }, "src", ], ], Array [ "self-link.link", Array [ Object { "tshy": Object { "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, "liveDev": true, }, }, "dist", ], ], ] ` exports[`test/build.ts > TAP > liveDev > pack > must match snapshot 1`] = ` Array [ Array [ "self-link.link", Array [ Object { "tshy": Object { "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, "liveDev": true, }, }, "src", ], ], Array [ "imports.link", Array [ Object { "tshy": Object { "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, "liveDev": true, }, }, "src", ], ], Array [ "imports.unlink", Array [ Object { "tshy": Object { "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, "liveDev": true, }, }, "src", ], ], Array [ "self-link.unlink", Array [ Object { "tshy": Object { "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, "liveDev": true, }, }, "src", ], ], Array [ "self-link.link", Array [ Object { "tshy": Object { "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, "liveDev": true, }, }, "dist", ], ], Array [ "self-link.link", Array [ Object { "tshy": Object { "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, "liveDev": true, }, }, "src", ], ], Array [ "imports.link", Array [ Object { "tshy": Object { "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, "liveDev": true, }, }, "src", ], ], Array [ "imports.unlink", Array [ Object { "tshy": Object { "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, "liveDev": true, }, }, "src", ], ], Array [ "self-link.unlink", Array [ Object { "tshy": Object { "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, "liveDev": true, }, }, "src", ], ], Array [ "self-link.link", Array [ Object { "tshy": Object { "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, "liveDev": true, }, }, "dist", ], ], Array [ "self-link.link", Array [ Object { "tshy": Object { "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, "liveDev": true, }, }, "src", ], ], Array [ "imports.link", Array [ Object { "tshy": Object { "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, "liveDev": true, }, }, "src", ], ], Array [ "imports.unlink", Array [ Object { "tshy": Object { "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, "liveDev": true, }, }, "src", ], ], Array [ "self-link.unlink", Array [ Object { "tshy": Object { "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, "liveDev": true, }, }, "src", ], ], Array [ "self-link.link", Array [ Object { "tshy": Object { "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, "liveDev": true, }, }, "dist", ], ], ] ` exports[`test/build.ts > TAP > liveDev > publish > must match snapshot 1`] = ` Array [ Array [ "self-link.link", Array [ Object { "tshy": Object { "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, "liveDev": true, }, }, "src", ], ], Array [ "imports.link", Array [ Object { "tshy": Object { "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, "liveDev": true, }, }, "src", ], ], Array [ "imports.unlink", Array [ Object { "tshy": Object { "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, "liveDev": true, }, }, "src", ], ], Array [ "self-link.unlink", Array [ Object { "tshy": Object { "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, "liveDev": true, }, }, "src", ], ], Array [ "self-link.link", Array [ Object { "tshy": Object { "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, "liveDev": true, }, }, "dist", ], ], Array [ "self-link.link", Array [ Object { "tshy": Object { "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, "liveDev": true, }, }, "src", ], ], Array [ "imports.link", Array [ Object { "tshy": Object { "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, "liveDev": true, }, }, "src", ], ], Array [ "imports.unlink", Array [ Object { "tshy": Object { "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, "liveDev": true, }, }, "src", ], ], Array [ "self-link.unlink", Array [ Object { "tshy": Object { "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, "liveDev": true, }, }, "src", ], ], Array [ "self-link.link", Array [ Object { "tshy": Object { "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, "liveDev": true, }, }, "dist", ], ], Array [ "self-link.link", Array [ Object { "tshy": Object { "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, "liveDev": true, }, }, "src", ], ], Array [ "imports.link", Array [ Object { "tshy": Object { "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, "liveDev": true, }, }, "src", ], ], Array [ "imports.unlink", Array [ Object { "tshy": Object { "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, "liveDev": true, }, }, "src", ], ], Array [ "self-link.unlink", Array [ Object { "tshy": Object { "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, "liveDev": true, }, }, "src", ], ], Array [ "self-link.link", Array [ Object { "tshy": Object { "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, "liveDev": true, }, }, "dist", ], ], Array [ "self-link.link", Array [ Object { "tshy": Object { "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, "liveDev": true, }, }, "src", ], ], Array [ "imports.link", Array [ Object { "tshy": Object { "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, "liveDev": true, }, }, "src", ], ], Array [ "imports.unlink", Array [ Object { "tshy": Object { "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, "liveDev": true, }, }, "src", ], ], Array [ "self-link.unlink", Array [ Object { "tshy": Object { "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, "liveDev": true, }, }, "src", ], ], Array [ "self-link.link", Array [ Object { "tshy": Object { "exports": Object { ".": "./src/index.ts", "./package.json": "./package.json", }, "liveDev": true, }, }, "dist", ], ], ] ` isaacs-tshy-bded619/tap-snapshots/test/config.ts.test.cjs000066400000000000000000000031231464240215000235730ustar00rootroot00000000000000/* IMPORTANT * This snapshot file is auto-generated, but designed for humans. * It should be checked into source control and tracked carefully. * Re-generate by setting TAP_SNAPSHOT=1 and running tests. * Make sure to inspect the output below. Do not ignore changes! */ 'use strict' exports[`test/config.ts > TAP > basic parsing cases > {"config":{"dialects":"yolo"},"sources":[],"ok":false} > must match snapshot 1`] = ` tshy.dialects must be an array including "esm" and/or "commonjs", got: "yolo" ` exports[`test/config.ts > TAP > basic parsing cases > {"config":{"exports":{"./blah":{"require":"./src/notallowed"}}},"sources":[],"ok":false} > must match snapshot 1`] = ` tshy.exports ./blah unbuilt exports must not be in ./src, and exports in src must be string values. got: {"require":"./src/notallowed"} ` exports[`test/config.ts > TAP > basic parsing cases > {"config":{"imports":"blah"},"sources":[],"ok":false} > must match snapshot 1`] = ` invalid imports module specifier: 0 ` exports[`test/config.ts > TAP > basic parsing cases > {"config":{"imports":["blah"]},"sources":[],"ok":false} > must match snapshot 1`] = ` invalid imports module specifier: 0 ` exports[`test/config.ts > TAP > basic parsing cases > {"config":{"main":"blah"},"sources":[],"ok":false} > must match snapshot 1`] = ` tshy.main must be a boolean value if specified, got: blah ` exports[`test/config.ts > TAP > basic parsing cases > {"config":{"project":"thisFileDoesNotExist.json"},"sources":[],"ok":false} > must match snapshot 1`] = ` tshy.project must point to a tsconfig file on disk, got: "thisFileDoesNotExist.json" ` isaacs-tshy-bded619/tap-snapshots/test/exports.ts.test.cjs000066400000000000000000000271411464240215000240400ustar00rootroot00000000000000/* IMPORTANT * This snapshot file is auto-generated, but designed for humans. * It should be checked into source control and tracked carefully. * Re-generate by setting TAP_SNAPSHOT=1 and running tests. * Make sure to inspect the output below. Do not ignore changes! */ 'use strict' exports[`test/exports.ts > TAP > extra dialects > commonjs > extras=false > must match snapshot 1`] = ` Object { ".": Object { "require": Object { "source": "./src/index.ts", "types": "./dist/commonjs/index.d.ts", "default": "./dist/commonjs/index.js", }, }, "./foo": Object { "require": Object { "source": "./src/foo.ts", "types": "./dist/commonjs/foo.d.ts", "default": "./dist/commonjs/foo.js", }, }, } ` exports[`test/exports.ts > TAP > extra dialects > commonjs > extras=true > must match snapshot 1`] = ` Object { ".": Object { "blah": Object { "source": "./src/index.ts", "my-source": "./src/index.ts", "types": "./dist/blah/index.d.ts", "default": "./dist/blah/index.js", }, "require": Object { "source": "./src/index.ts", "types": "./dist/commonjs/index.d.ts", "default": "./dist/commonjs/index.js", }, }, "./foo": Object { "blah": Object { "source": "./src/foo.ts", "my-source": "./src/foo.ts", "types": "./dist/blah/foo.d.ts", "default": "./dist/blah/foo.js", }, "require": Object { "source": "./src/foo.ts", "types": "./dist/commonjs/foo.d.ts", "default": "./dist/commonjs/foo.js", }, }, } ` exports[`test/exports.ts > TAP > extra dialects > esm > extras=false > must match snapshot 1`] = ` Object { ".": Object { "import": Object { "source": "./src/index.ts", "types": "./dist/esm/index.d.ts", "default": "./dist/esm/index.js", }, }, "./foo": Object { "import": Object { "source": "./src/foo.ts", "types": "./dist/esm/foo.d.ts", "default": "./dist/esm/foo.js", }, }, } ` exports[`test/exports.ts > TAP > extra dialects > esm > extras=true > must match snapshot 1`] = ` Object { ".": Object { "deno": Object { "source": "./src/index.ts", "my-source": "./src/index.ts", "types": "./dist/deno/index.d.ts", "default": "./dist/deno/index.js", }, "no-overrides": Object { "source": "./src/index.ts", "my-source": "./src/index.ts", "types": "./dist/no-overrides/index.d.ts", "default": "./dist/no-overrides/index.js", }, "import": Object { "source": "./src/index.ts", "types": "./dist/esm/index.d.ts", "default": "./dist/esm/index.js", }, }, "./foo": Object { "deno": Object { "source": "./src/foo.ts", "my-source": "./src/foo.ts", "types": "./dist/deno/foo.d.ts", "default": "./dist/deno/foo.js", }, "no-overrides": Object { "source": "./src/foo.ts", "my-source": "./src/foo.ts", "types": "./dist/no-overrides/foo.d.ts", "default": "./dist/no-overrides/foo.js", }, "import": Object { "source": "./src/foo.ts", "types": "./dist/esm/foo.d.ts", "default": "./dist/esm/foo.js", }, }, } ` exports[`test/exports.ts > TAP > extra dialects > undefined > extras=false > must match snapshot 1`] = ` Object { ".": Object { "import": Object { "source": "./src/index.ts", "types": "./dist/esm/index.d.ts", "default": "./dist/esm/index.js", }, "require": Object { "source": "./src/index.ts", "types": "./dist/commonjs/index.d.ts", "default": "./dist/commonjs/index.js", }, }, "./foo": Object { "import": Object { "source": "./src/foo.ts", "types": "./dist/esm/foo.d.ts", "default": "./dist/esm/foo.js", }, "require": Object { "source": "./src/foo.ts", "types": "./dist/commonjs/foo.d.ts", "default": "./dist/commonjs/foo.js", }, }, } ` exports[`test/exports.ts > TAP > extra dialects > undefined > extras=true > must match snapshot 1`] = ` Object { ".": Object { "deno": Object { "source": "./src/index.ts", "my-source": "./src/index.ts", "types": "./dist/deno/index.d.ts", "default": "./dist/deno/index.js", }, "no-overrides": Object { "source": "./src/index.ts", "my-source": "./src/index.ts", "types": "./dist/no-overrides/index.d.ts", "default": "./dist/no-overrides/index.js", }, "blah": Object { "source": "./src/index.ts", "my-source": "./src/index.ts", "types": "./dist/blah/index.d.ts", "default": "./dist/blah/index.js", }, "import": Object { "source": "./src/index.ts", "types": "./dist/esm/index.d.ts", "default": "./dist/esm/index.js", }, "require": Object { "source": "./src/index.ts", "types": "./dist/commonjs/index.d.ts", "default": "./dist/commonjs/index.js", }, }, "./foo": Object { "deno": Object { "source": "./src/foo.ts", "my-source": "./src/foo.ts", "types": "./dist/deno/foo.d.ts", "default": "./dist/deno/foo.js", }, "no-overrides": Object { "source": "./src/foo.ts", "my-source": "./src/foo.ts", "types": "./dist/no-overrides/foo.d.ts", "default": "./dist/no-overrides/foo.js", }, "blah": Object { "source": "./src/foo.ts", "my-source": "./src/foo.ts", "types": "./dist/blah/foo.d.ts", "default": "./dist/blah/foo.js", }, "import": Object { "source": "./src/foo.ts", "types": "./dist/esm/foo.d.ts", "default": "./dist/esm/foo.js", }, "require": Object { "source": "./src/foo.ts", "types": "./dist/commonjs/foo.d.ts", "default": "./dist/commonjs/foo.js", }, }, } ` exports[`test/exports.ts > TAP > liveDev > no envs > must match snapshot 1`] = ` Object { ".": Object { "deno": Object { "source": "./src/index.ts", "default": "./dist/deno/index.ts", }, "blah": Object { "source": "./src/index.ts", "default": "./dist/blah/index.ts", }, "import": Object { "source": "./src/index.ts", "default": "./dist/esm/index.ts", }, "require": Object { "source": "./src/index.ts", "default": "./dist/commonjs/index.ts", }, }, "./package.json": "./package.json", "./foo": Object { "deno": Object { "source": "./src/foo.mts", "default": "./dist/deno/foo.mts", }, "import": Object { "source": "./src/foo.mts", "default": "./dist/esm/foo.mts", }, }, "./foo-cjs": Object { "blah": Object { "source": "./src/foo.cts", "default": "./dist/blah/foo.cts", }, "require": Object { "source": "./src/foo.cts", "default": "./dist/commonjs/foo.cts", }, }, "./fill": Object { "deno": Object { "source": "./src/fill.ts", "default": "./dist/deno/fill.ts", }, "blah": Object { "source": "./src/fill.ts", "default": "./dist/blah/fill.ts", }, "import": Object { "source": "./src/fill.ts", "default": "./dist/esm/fill.ts", }, "require": Object { "source": "./src/fill.ts", "default": "./dist/commonjs/fill.ts", }, }, } ` exports[`test/exports.ts > TAP > liveDev > pack > must match snapshot 1`] = ` Object { ".": Object { "deno": Object { "source": "./src/index.ts", "types": "./dist/deno/index.d.ts", "default": "./dist/deno/index.js", }, "blah": Object { "source": "./src/index.ts", "types": "./dist/blah/index.d.ts", "default": "./dist/blah/index.js", }, "import": Object { "source": "./src/index.ts", "types": "./dist/esm/index.d.ts", "default": "./dist/esm/index.js", }, "require": Object { "source": "./src/index.ts", "types": "./dist/commonjs/index.d.ts", "default": "./dist/commonjs/index.js", }, }, "./package.json": "./package.json", "./foo": Object { "deno": Object { "source": "./src/foo.mts", "types": "./dist/deno/foo.mjs", "default": "./dist/deno/foo.mjs", }, "import": Object { "source": "./src/foo.mts", "types": "./dist/esm/foo.d.mts", "default": "./dist/esm/foo.mjs", }, }, "./foo-cjs": Object { "blah": Object { "source": "./src/foo.cts", "types": "./dist/blah/foo.cjs", "default": "./dist/blah/foo.cjs", }, "require": Object { "source": "./src/foo.cts", "types": "./dist/commonjs/foo.d.cts", "default": "./dist/commonjs/foo.cjs", }, }, "./fill": Object { "deno": Object { "source": "./src/fill.ts", "types": "./dist/deno/fill.d.ts", "default": "./dist/deno/fill.js", }, "blah": Object { "source": "./src/fill.ts", "types": "./dist/blah/fill.d.ts", "default": "./dist/blah/fill.js", }, "import": Object { "source": "./src/fill.ts", "types": "./dist/esm/fill.d.ts", "default": "./dist/esm/fill.js", }, "require": Object { "source": "./src/fill.ts", "types": "./dist/commonjs/fill.d.ts", "default": "./dist/commonjs/fill.js", }, }, } ` exports[`test/exports.ts > TAP > liveDev > publish > must match snapshot 1`] = ` Object { ".": Object { "deno": Object { "source": "./src/index.ts", "types": "./dist/deno/index.d.ts", "default": "./dist/deno/index.js", }, "blah": Object { "source": "./src/index.ts", "types": "./dist/blah/index.d.ts", "default": "./dist/blah/index.js", }, "import": Object { "source": "./src/index.ts", "types": "./dist/esm/index.d.ts", "default": "./dist/esm/index.js", }, "require": Object { "source": "./src/index.ts", "types": "./dist/commonjs/index.d.ts", "default": "./dist/commonjs/index.js", }, }, "./package.json": "./package.json", "./foo": Object { "deno": Object { "source": "./src/foo.mts", "types": "./dist/deno/foo.mjs", "default": "./dist/deno/foo.mjs", }, "import": Object { "source": "./src/foo.mts", "types": "./dist/esm/foo.d.mts", "default": "./dist/esm/foo.mjs", }, }, "./foo-cjs": Object { "blah": Object { "source": "./src/foo.cts", "types": "./dist/blah/foo.cjs", "default": "./dist/blah/foo.cjs", }, "require": Object { "source": "./src/foo.cts", "types": "./dist/commonjs/foo.d.cts", "default": "./dist/commonjs/foo.cjs", }, }, "./fill": Object { "deno": Object { "source": "./src/fill.ts", "types": "./dist/deno/fill.d.ts", "default": "./dist/deno/fill.js", }, "blah": Object { "source": "./src/fill.ts", "types": "./dist/blah/fill.d.ts", "default": "./dist/blah/fill.js", }, "import": Object { "source": "./src/fill.ts", "types": "./dist/esm/fill.d.ts", "default": "./dist/esm/fill.js", }, "require": Object { "source": "./src/fill.ts", "types": "./dist/commonjs/fill.d.ts", "default": "./dist/commonjs/fill.js", }, }, } ` exports[`test/exports.ts > TAP > setting top level main > invalid main commonjs, no exports > must match snapshot 1`] = ` Array [ Array [ "could not resolve exports['.'] for tshy.main 'require'", ], ] ` exports[`test/exports.ts > TAP > setting top level main > invalid module esm, no exports > must match snapshot 1`] = ` Array [ Array [ "could not resolve exports['.'] for tshy.module 'import'", ], ] ` exports[`test/exports.ts > TAP > setting top level main > main explicit true, no commonjs module > must match snapshot 1`] = ` Array [ Array [ "could not resolve exports['.'] for tshy.main 'require'", ], ] ` isaacs-tshy-bded619/tap-snapshots/test/fail.ts.test.cjs000066400000000000000000000014031464240215000232400ustar00rootroot00000000000000/* IMPORTANT * This snapshot file is auto-generated, but designed for humans. * It should be checked into source control and tracked carefully. * Re-generate by setting TAP_SNAPSHOT=1 and running tests. * Make sure to inspect the output below. Do not ignore changes! */ 'use strict' exports[`test/fail.ts > TAP > must match snapshot 1`] = ` Array [ Array [ "console.error", Array [ "\\u001b[31m\\u001b[1mno error\\u001b[22m\\u001b[39m", ], ], Array [ "console.print", Array [], ], Array [ "console.error", Array [ "\\u001b[31m\\u001b[1mwith error\\u001b[22m\\u001b[39m", ], ], Array [ "console.error", Array [ "error message", ], ], Array [ "console.print", Array [], ], ] ` isaacs-tshy-bded619/tap-snapshots/test/polyfills.ts.test.cjs000066400000000000000000000012141464240215000243420ustar00rootroot00000000000000/* IMPORTANT * This snapshot file is auto-generated, but designed for humans. * It should be checked into source control and tracked carefully. * Re-generate by setting TAP_SNAPSHOT=1 and running tests. * Make sure to inspect the output below. Do not ignore changes! */ 'use strict' exports[`test/polyfills.ts > TAP > must match snapshot 1`] = ` Map(3) { 'cjs' => [ 'cjs', Map(2) { './src/foo-cjs.cts' => './src/foo.ts', './src/jsx-cjs.cts' => './src/jsx.tsx' } ], 'blah' => [ 'blah', Map(1) { './src/foo-blah.cts' => './src/foo.ts' } ], 'deno' => [ 'deno', Map(1) { './src/foo-deno.mts' => './src/foo.ts' } ] } ` isaacs-tshy-bded619/tap-snapshots/test/prevent-verbatim-module-syntax.ts.test.cjs000066400000000000000000000013361464240215000304330ustar00rootroot00000000000000/* IMPORTANT * This snapshot file is auto-generated, but designed for humans. * It should be checked into source control and tracked carefully. * Re-generate by setting TAP_SNAPSHOT=1 and running tests. * Make sure to inspect the output below. Do not ignore changes! */ 'use strict' exports[`test/prevent-verbatim-module-syntax.ts > TAP > is set, many worries > must match snapshot 1`] = ` verbatimModuleSyntax detected verbatimModuleSyntax is incompatible with multi-dialect builds. Either remove this field from tsconfig.json, or set a single dialect in the "dialects" field in package.json, for example: { "tshy": { "dialects": ["esm"] } } or { "tshy": { "dialects": ["commonjs"] } } ` isaacs-tshy-bded619/tap-snapshots/test/self-dep.ts.test.cjs000066400000000000000000000055061464240215000240340ustar00rootroot00000000000000/* IMPORTANT * This snapshot file is auto-generated, but designed for humans. * It should be checked into source control and tracked carefully. * Re-generate by setting TAP_SNAPSHOT=1 and running tests. * Make sure to inspect the output below. Do not ignore changes! */ 'use strict' exports[`test/self-dep.ts > TAP > link, but no dirs made > mkdirps 1`] = ` Array [ Array [ "{CWD}/some/path/node_modules", ], ] ` exports[`test/self-dep.ts > TAP > link, but no dirs made > rimrafs 1`] = ` Array [ Array [ "{CWD}/some/path/node_modules/name", ], ] ` exports[`test/self-dep.ts > TAP > link, but no dirs made > symlinks 1`] = ` Array [ Array [ "../../..", "{CWD}/some/path/node_modules/name", ], ] ` exports[`test/self-dep.ts > TAP > made dir, clean up > mkdirps 1`] = ` Array [ Array [ "{CWD}/some/path/node_modules", ], ] ` exports[`test/self-dep.ts > TAP > made dir, clean up > rimrafs 1`] = ` Array [ Array [ "{CWD}/some/path/node_modules/name", ], Array [ "some", ], ] ` exports[`test/self-dep.ts > TAP > made dir, clean up > symlinks 1`] = ` Array [ Array [ "../../..", "{CWD}/some/path/node_modules/name", ], ] ` exports[`test/self-dep.ts > TAP > throw both times, but accept if best-effort > mkdirps 1`] = ` Array [ Array [ "{CWD}/some/path/node_modules", ], ] ` exports[`test/self-dep.ts > TAP > throw both times, but accept if best-effort > rimrafs 1`] = ` Array [ Array [ "{CWD}/some/path/node_modules/name", ], ] ` exports[`test/self-dep.ts > TAP > throw both times, but accept if best-effort > symlinks 1`] = ` Array [ Array [ "../../..", "{CWD}/some/path/node_modules/name", ], Array [ "../../..", "{CWD}/some/path/node_modules/name", ], ] ` exports[`test/self-dep.ts > TAP > throw both times, but self-link is required > mkdirps 1`] = ` Array [ Array [ "{CWD}/some/path/node_modules", ], ] ` exports[`test/self-dep.ts > TAP > throw both times, but self-link is required > rimrafs 1`] = ` Array [ Array [ "{CWD}/some/path/node_modules/name", ], ] ` exports[`test/self-dep.ts > TAP > throw both times, but self-link is required > symlinks 1`] = ` Array [ Array [ "../../..", "{CWD}/some/path/node_modules/name", ], Array [ "../../..", "{CWD}/some/path/node_modules/name", ], ] ` exports[`test/self-dep.ts > TAP > try one more time if it fails > mkdirps 1`] = ` Array [ Array [ "{CWD}/some/path/node_modules", ], ] ` exports[`test/self-dep.ts > TAP > try one more time if it fails > rimrafs 1`] = ` Array [ Array [ "{CWD}/some/path/node_modules/name", ], ] ` exports[`test/self-dep.ts > TAP > try one more time if it fails > symlinks 1`] = ` Array [ Array [ "../../..", "{CWD}/some/path/node_modules/name", ], Array [ "../../..", "{CWD}/some/path/node_modules/name", ], ] ` isaacs-tshy-bded619/tap-snapshots/test/tsconfig.ts.test.cjs000066400000000000000000000146471464240215000241570ustar00rootroot00000000000000/* IMPORTANT * This snapshot file is auto-generated, but designed for humans. * It should be checked into source control and tracked carefully. * Re-generate by setting TAP_SNAPSHOT=1 and running tests. * Make sure to inspect the output below. Do not ignore changes! */ 'use strict' exports[`test/tsconfig.ts > TAP > with custom project tsconfig name > .tshy/build.json 1`] = ` Object { "compilerOptions": Object { "module": "nodenext", "moduleResolution": "nodenext", "rootDir": "../src", "target": "es2022", }, "extends": "../custom.json", } ` exports[`test/tsconfig.ts > TAP > with custom project tsconfig name > .tshy/commonjs.json 1`] = ` Object { "compilerOptions": Object { "outDir": "../.tshy-build/commonjs", }, "exclude": Array [ "../src/**/*.mts", "../src/package.json", "../src/index-deno.mts", ], "extends": "./build.json", "include": Array [ "../src/**/*.ts", "../src/**/*.cts", "../src/**/*.tsx", "../src/**/*.json", ], } ` exports[`test/tsconfig.ts > TAP > with custom project tsconfig name > .tshy/deno.json 1`] = ` Object { "compilerOptions": Object { "outDir": "../.tshy-build/deno", }, "exclude": Array [ "../src/package.json", "../src/index-cjs.cts", ], "extends": "./build.json", "include": Array [ "../src/**/*.ts", "../src/**/*.mts", "../src/**/*.tsx", "../src/**/*.json", ], } ` exports[`test/tsconfig.ts > TAP > with custom project tsconfig name > .tshy/esm.json 1`] = ` Object { "compilerOptions": Object { "outDir": "../.tshy-build/esm", }, "exclude": Array [ "../src/package.json", "../src/index-cjs.cts", "../src/index-deno.mts", ], "extends": "./build.json", "include": Array [ "../src/**/*.ts", "../src/**/*.mts", "../src/**/*.tsx", "../src/**/*.json", ], } ` exports[`test/tsconfig.ts > TAP > with custom project tsconfig name > .tshy/webpack.json 1`] = ` Object { "compilerOptions": Object { "outDir": "../.tshy-build/webpack", }, "exclude": Array [ "../src/**/*.mts", "../src/package.json", "../src/index-cjs.cts", "../src/index-deno.mts", ], "extends": "./build.json", "include": Array [ "../src/**/*.ts", "../src/**/*.cts", "../src/**/*.tsx", "../src/**/*.json", ], } ` exports[`test/tsconfig.ts > TAP > with custom project tsconfig name > custom.json 1`] = ` Object { "compilerOptions": Object { "this_data": "is preserved", "yolo": "🍑", }, } ` exports[`test/tsconfig.ts > TAP > with tsconfig.json file > .tshy/build.json 1`] = ` Object { "compilerOptions": Object { "module": "nodenext", "moduleResolution": "nodenext", "rootDir": "../src", "target": "es2022", }, "extends": "../tsconfig.json", } ` exports[`test/tsconfig.ts > TAP > with tsconfig.json file > .tshy/build.json generate everything 1`] = ` Object { "compilerOptions": Object { "module": "nodenext", "moduleResolution": "nodenext", "rootDir": "../src", }, "extends": "../tsconfig.json", } ` exports[`test/tsconfig.ts > TAP > with tsconfig.json file > .tshy/commonjs.json 1`] = ` Object { "compilerOptions": Object { "outDir": "../.tshy-build/commonjs", }, "exclude": Array [ "../src/**/*.test.ts", "../src/**/*.mts", "../src/package.json", "../src/index-deno.mts", ], "extends": "./build.json", "include": Array [ "../src/**/*.ts", "../src/**/*.cts", "../src/**/*.tsx", "../src/**/*.json", ], } ` exports[`test/tsconfig.ts > TAP > with tsconfig.json file > .tshy/commonjs.json generate everything 1`] = ` Object { "compilerOptions": Object { "outDir": "../.tshy-build/commonjs", }, "exclude": Array [ "../src/**/*.test.ts", "../src/**/*.mts", "../src/package.json", "../src/index-deno.mts", ], "extends": "./build.json", "include": Array [ "../src/**/*.ts", "../src/**/*.cts", "../src/**/*.tsx", "../src/**/*.json", ], } ` exports[`test/tsconfig.ts > TAP > with tsconfig.json file > .tshy/deno.json 1`] = ` Object { "compilerOptions": Object { "outDir": "../.tshy-build/deno", }, "exclude": Array [ "../src/**/*.test.ts", "../src/package.json", "../src/index-cjs.cts", ], "extends": "./build.json", "include": Array [ "../src/**/*.ts", "../src/**/*.mts", "../src/**/*.tsx", "../src/**/*.json", ], } ` exports[`test/tsconfig.ts > TAP > with tsconfig.json file > .tshy/esm.json 1`] = ` Object { "compilerOptions": Object { "outDir": "../.tshy-build/esm", }, "exclude": Array [ "../src/**/*.test.ts", "../src/package.json", "../src/index-cjs.cts", "../src/index-deno.mts", ], "extends": "./build.json", "include": Array [ "../src/**/*.ts", "../src/**/*.mts", "../src/**/*.tsx", "../src/**/*.json", ], } ` exports[`test/tsconfig.ts > TAP > with tsconfig.json file > .tshy/esm.json generate everything 1`] = ` Object { "compilerOptions": Object { "outDir": "../.tshy-build/esm", }, "exclude": Array [ "../src/**/*.test.ts", "../src/package.json", "../src/index-cjs.cts", "../src/index-deno.mts", ], "extends": "./build.json", "include": Array [ "../src/**/*.ts", "../src/**/*.mts", "../src/**/*.tsx", "../src/**/*.json", ], } ` exports[`test/tsconfig.ts > TAP > with tsconfig.json file > .tshy/webpack.json 1`] = ` Object { "compilerOptions": Object { "outDir": "../.tshy-build/webpack", }, "exclude": Array [ "../src/**/*.test.ts", "../src/**/*.mts", "../src/package.json", "../src/index-cjs.cts", "../src/index-deno.mts", ], "extends": "./build.json", "include": Array [ "../src/**/*.ts", "../src/**/*.cts", "../src/**/*.tsx", "../src/**/*.json", ], } ` exports[`test/tsconfig.ts > TAP > with tsconfig.json file > tsconfig.json 1`] = ` Object { "compilerOptions": Object { "this_data": "is preserved", "yolo": "🍑", }, } ` exports[`test/tsconfig.ts > TAP > with tsconfig.json file > tsconfig.json generate everything 1`] = ` Object { "compilerOptions": Object { "declaration": true, "declarationMap": true, "esModuleInterop": true, "forceConsistentCasingInFileNames": true, "inlineSources": true, "jsx": "react", "module": "nodenext", "moduleResolution": "nodenext", "noUncheckedIndexedAccess": true, "resolveJsonModule": true, "skipLibCheck": true, "sourceMap": true, "strict": true, "target": "es2022", }, } ` isaacs-tshy-bded619/tap-snapshots/test/usage.ts.test.cjs000066400000000000000000000035001464240215000234310ustar00rootroot00000000000000/* IMPORTANT * This snapshot file is auto-generated, but designed for humans. * It should be checked into source control and tracked carefully. * Re-generate by setting TAP_SNAPSHOT=1 and running tests. * Make sure to inspect the output below. Do not ignore changes! */ 'use strict' exports[`test/usage.ts > TAP > no error > no link > must match snapshot 1`] = ` Usage: tshy [--help] --help -h Print this message and exit. --watch -w Watch files in ./src and build when they change. Default behavior: build project according to tshy config in package.json See the docs for more information: https://github.com/isaacs/tshy ` exports[`test/usage.ts > TAP > no error > with link > must match snapshot 1`] = ` Usage: tshy [--help] --help -h Print this message and exit. --watch -w Watch files in ./src and build when they change. Default behavior: build project according to tshy config in package.json See the docs for more information: ]8;;https://github.com/isaacs/tshy\\https://github.com/isaacs/tshy]8;;\\ ` exports[`test/usage.ts > TAP > with error > no link > must match snapshot 1`] = ` Usage: tshy [--help] --help -h Print this message and exit. --watch -w Watch files in ./src and build when they change. Default behavior: build project according to tshy config in package.json See the docs for more information: https://github.com/isaacs/tshy error string ` exports[`test/usage.ts > TAP > with error > with link > must match snapshot 1`] = ` Usage: tshy [--help] --help -h Print this message and exit. --watch -w Watch files in ./src and build when they change. Default behavior: build project according to tshy config in package.json See the docs for more information: ]8;;https://github.com/isaacs/tshy\\https://github.com/isaacs/tshy]8;;\\ error string ` isaacs-tshy-bded619/tap-snapshots/test/valid-exports.ts.test.cjs000066400000000000000000000036521464240215000251360ustar00rootroot00000000000000/* IMPORTANT * This snapshot file is auto-generated, but designed for humans. * It should be checked into source control and tracked carefully. * Re-generate by setting TAP_SNAPSHOT=1 and running tests. * Make sure to inspect the output below. Do not ignore changes! */ 'use strict' exports[`test/valid-exports.ts > TAP > [] false > exits 1`] = ` [] ` exports[`test/valid-exports.ts > TAP > [] false > message 1`] = ` undefined ` exports[`test/valid-exports.ts > TAP > {"./b":"./src/blah.ts"} true > export result 1`] = ` Object { "./b": "./src/blah.ts", } ` exports[`test/valid-exports.ts > TAP > {"./b":"src/b.ts"} true > export result 1`] = ` Object { "./b": "./src/b.ts", } ` exports[`test/valid-exports.ts > TAP > {"./b":{"require":"./blah.js"}} true > export result 1`] = ` Object { "./b": Object { "require": "./blah.js", }, } ` exports[`test/valid-exports.ts > TAP > {"./b":{"require":"./src/blah.ts"}} false > exits 1`] = ` [[1]] ` exports[`test/valid-exports.ts > TAP > {"./b":{"require":"./src/blah.ts"}} false > message 1`] = ` tshy.exports ./b unbuilt exports must not be in ./src, and exports in src must be string values. got: {"require":"./src/blah.ts"} ` exports[`test/valid-exports.ts > TAP > {"./B":8} false > exits 1`] = ` [[1]] ` exports[`test/valid-exports.ts > TAP > {"./B":8} false > message 1`] = ` tshy.exports ./B value must be valid package.json exports value, got: 8 ` exports[`test/valid-exports.ts > TAP > {"x":"./src/x.ts"} false > exits 1`] = ` [[1]] ` exports[`test/valid-exports.ts > TAP > {"x":"./src/x.ts"} false > message 1`] = ` tshy.exports key must be "." or start with "./", got: x ` exports[`test/valid-exports.ts > TAP > false false > exits 1`] = ` [] ` exports[`test/valid-exports.ts > TAP > false false > message 1`] = ` undefined ` exports[`test/valid-exports.ts > TAP > null false > exits 1`] = ` [] ` exports[`test/valid-exports.ts > TAP > null false > message 1`] = ` undefined ` isaacs-tshy-bded619/tap-snapshots/test/valid-extra-dialects.ts.test.cjs000066400000000000000000000053541464240215000263440ustar00rootroot00000000000000/* IMPORTANT * This snapshot file is auto-generated, but designed for humans. * It should be checked into source control and tracked carefully. * Re-generate by setting TAP_SNAPSHOT=1 and running tests. * Make sure to inspect the output below. Do not ignore changes! */ 'use strict' exports[`test/valid-extra-dialects.ts > TAP > {"commonjsDialects":[123]} > failure message 1`] = ` Array [ Array [ "commonjs must be an array of strings, got: 123", ], ] ` exports[`test/valid-extra-dialects.ts > TAP > {"esmDialects":["blah"],"commonjsDialects":["blah"]} > failure message 1`] = ` Array [ Array [ "commonjsDialects and esmDialects must be unique, found blah in both lists", ], ] ` exports[`test/valid-extra-dialects.ts > TAP > {"esmDialects":["blah"],"sourceDialects":["blah"]} > failure message 1`] = ` Array [ Array [ "esmDialects and sourceDialects must be unique, found blah in both lists", ], ] ` exports[`test/valid-extra-dialects.ts > TAP > {"esmDialects":["cjs"]} > failure message 1`] = ` Array [ Array [ "tshy.esmDialects must not contain \\"cjs\\"", ], ] ` exports[`test/valid-extra-dialects.ts > TAP > {"esmDialects":["commonjs"]} > failure message 1`] = ` Array [ Array [ "tshy.esmDialects must not contain \\"commonjs\\"", ], ] ` exports[`test/valid-extra-dialects.ts > TAP > {"esmDialects":["default"]} > failure message 1`] = ` Array [ Array [ "tshy.esmDialects must not contain \\"default\\"", ], ] ` exports[`test/valid-extra-dialects.ts > TAP > {"esmDialects":["import"]} > failure message 1`] = ` Array [ Array [ "tshy.esmDialects must not contain \\"import\\"", ], ] ` exports[`test/valid-extra-dialects.ts > TAP > {"esmDialects":["node"]} > failure message 1`] = ` Array [ Array [ "tshy.esmDialects must not contain \\"node\\"", ], ] ` exports[`test/valid-extra-dialects.ts > TAP > {"esmDialects":["require"]} > failure message 1`] = ` Array [ Array [ "tshy.esmDialects must not contain \\"require\\"", ], ] ` exports[`test/valid-extra-dialects.ts > TAP > {"esmDialects":["source"]} > failure message 1`] = ` Array [ Array [ "tshy.esmDialects must not contain \\"source\\"", ], ] ` exports[`test/valid-extra-dialects.ts > TAP > {"esmDialects":[123]} > failure message 1`] = ` Array [ Array [ "esm must be an array of strings, got: 123", ], ] ` exports[`test/valid-extra-dialects.ts > TAP > {"sourceDialects":["blah"],"commonjsDialects":["blah"]} > failure message 1`] = ` Array [ Array [ "commonjsDialects and sourceDialects must be unique, found blah in both lists", ], ] ` exports[`test/valid-extra-dialects.ts > TAP > {"sourceDialects":["source"]} > failure message 1`] = ` Array [ Array [ "tshy.sourceDialects must not contain \\"source\\"", ], ] ` isaacs-tshy-bded619/tap-snapshots/test/valid-imports.ts.test.cjs000066400000000000000000000021031464240215000251150ustar00rootroot00000000000000/* IMPORTANT * This snapshot file is auto-generated, but designed for humans. * It should be checked into source control and tracked carefully. * Re-generate by setting TAP_SNAPSHOT=1 and running tests. * Make sure to inspect the output below. Do not ignore changes! */ 'use strict' exports[`test/valid-imports.ts > TAP > {"pkg":{"imports":"asdf"}} > failure message 1`] = ` invalid imports object, must be Record, got: "asdf" ` exports[`test/valid-imports.ts > TAP > {"pkg":{"imports":[]}} > failure message 1`] = ` invalid imports object, must be Record, got: [] ` exports[`test/valid-imports.ts > TAP > {"pkg":{"imports":{"#":"y"}}} > failure message 1`] = ` invalid imports module specifier: # ` exports[`test/valid-imports.ts > TAP > {"pkg":{"imports":{"#x":["./src/x"]}}} > failure message 1`] = ` unbuilt package.imports #x must not be in ./src, and imports in ./src must be string values. got: ["./src/x"] ` exports[`test/valid-imports.ts > TAP > {"pkg":{"imports":{"x":"y"}}} > failure message 1`] = ` invalid imports module specifier: x ` isaacs-tshy-bded619/tap-snapshots/test/watch.ts.test.cjs000066400000000000000000000033451464240215000234420ustar00rootroot00000000000000/* IMPORTANT * This snapshot file is auto-generated, but designed for humans. * It should be checked into source control and tracked carefully. * Re-generate by setting TAP_SNAPSHOT=1 and running tests. * Make sure to inspect the output below. Do not ignore changes! */ 'use strict' exports[`test/watch.ts > TAP > build failure > must match snapshot 1`] = ` Array [] ` exports[`test/watch.ts > TAP > build failure > must match snapshot 2`] = ` Array [] ` exports[`test/watch.ts > TAP > build failure > must match snapshot 3`] = ` Array [ Array [ "/u001b[32mbuild success/u001b[39m", Object { "code": 0, "signal": null, }, ], Array [ "/u001b[32mbuild success/u001b[39m", Object { "code": 0, "signal": null, }, ], ] ` exports[`test/watch.ts > TAP > build failure > must match snapshot 4`] = ` Array [] ` exports[`test/watch.ts > TAP > build whenever changes happen > must match snapshot 1`] = ` Array [ Array [ "/u001b[32mbuild success/u001b[39m", Object { "code": 0, "signal": null, }, ], Array [ "/u001b[32mbuild success/u001b[39m", Object { "code": 0, "signal": null, }, ], ] ` exports[`test/watch.ts > TAP > build whenever changes happen > must match snapshot 2`] = ` Array [] ` exports[`test/watch.ts > TAP > must match snapshot 1`] = ` Object { "bin": "{CWD}/dist/esm/index.js", "options": Object { "ignored": Function ignored(path), "ignoreInitial": true, "ignorePermissionErrors": true, "persistent": true, }, "rootPJ": "{CWD}/package.json", "src": "{CWD}/src", "srcNM": "{CWD}/src/node_modules", "srcPJ": "{CWD}/src/package.json", "targets": Array [ "{CWD}/src", "{CWD}/package.json", ], } ` isaacs-tshy-bded619/test/000077500000000000000000000000001464240215000154175ustar00rootroot00000000000000isaacs-tshy-bded619/test/add-dot.ts000066400000000000000000000001761464240215000173070ustar00rootroot00000000000000import t from 'tap' import addDot from '../src/add-dot.js' t.equal(addDot('./foo'), './foo') t.equal(addDot('foo'), './foo') isaacs-tshy-bded619/test/bins.ts000066400000000000000000000023731464240215000167270ustar00rootroot00000000000000import { resolve } from 'path' import t from 'tap' t.test('no bin, no chmod', async t => { const chmodSync = t.captureFn((_: string, __: number) => {}) const { default: bins } = (await t.mockImport( '../dist/esm/bins.js', { '../dist/esm/package.js': { default: {} }, 'node:fs': { chmodSync }, }, )) as typeof import('../dist/esm/bins.js') bins() t.strictSame(chmodSync.args(), []) }) t.test('chmod bin string', async t => { const chmodSync = t.captureFn((_: string, __: number) => {}) const { default: bins } = (await t.mockImport( '../dist/esm/bins.js', { '../dist/esm/package.js': { default: { bin: './bin.js' } }, 'node:fs': { chmodSync }, }, )) as typeof import('../dist/esm/bins.js') bins() t.strictSame(chmodSync.args(), [[resolve('./bin.js'), 0o755]]) }) t.test('chmod bin object', async t => { const chmodSync = t.captureFn((_: string, __: number) => {}) const { default: bins } = await t.mockImport( '../dist/esm/bins.js', { '../dist/esm/package.js': { default: { bin: { a: './a.js', b: './b.js' } }, }, 'node:fs': { chmodSync }, }, ) bins() t.strictSame(chmodSync.args(), [ [resolve('./a.js'), 0o755], [resolve('./b.js'), 0o755], ]) }) isaacs-tshy-bded619/test/build-commonjs.ts000066400000000000000000000060101464240215000207060ustar00rootroot00000000000000import { SpawnSyncReturns } from 'child_process' import { readdirSync } from 'fs' import t from 'tap' const node = process.execPath t.cleanSnapshot = s => s.split(node).join('{NODE}').replace(/\\/g, '/') const spawnSuccess: SpawnSyncReturns = { status: 0, signal: null, pid: 123, output: [], stdout: Buffer.alloc(0), stderr: Buffer.alloc(0), } const spawnFail: SpawnSyncReturns = { status: 1, signal: null, pid: 123, output: [], stdout: Buffer.alloc(0), stderr: Buffer.alloc(0), } import { spawnSync as ogSpawnSync } from 'node:child_process' let spawnResult = spawnSuccess const spawnSync = t.captureFn((...a: any[]) => { //@ts-ignore ogSpawnSync(...a) return spawnResult }) const output = () => readdirSync('.tshy-build/commonjs').sort((a, b) => a.localeCompare(b, 'en'), ) t.test('basic commonjs build', async t => { spawnResult = spawnSuccess t.chdir( t.testdir({ 'package.json': JSON.stringify({ tshy: { commonjsDialects: ['blah', 'no-overrides'], exports: { '.': './src/index.ts', './blah': './src/blah.ts', }, }, }), src: { 'index.ts': 'console.log("hello")', 'blah.ts': ` //@ts-ignore export const u = import.meta.url `, 'blah-blah.cts': ` //@ts-ignore export const u = 'file:///blah/blah.blah' `, 'blah-cjs.cts': ` import { pathToFileURL } from 'url' export const u = String(pathToFileURL(__filename)) `, }, }), ) let buildFailed = false const { buildCommonJS } = (await t.mockImport( '../dist/esm/build-commonjs.js', { child_process: { spawnSync }, '../dist/esm/build-fail.js': { default: () => { buildFailed = true }, }, }, )) as typeof import('../dist/esm/build-commonjs.js') buildCommonJS() t.equal(buildFailed, false) t.matchSnapshot(output()) t.matchSnapshot(spawnSync.args()) }) t.test('build failure', async t => { spawnResult = spawnFail t.chdir( t.testdir({ 'package.json': JSON.stringify({ tshy: { exports: { '.': './src/index.ts', './blah': './src/blah.ts', }, }, }), src: { 'index.ts': 'console.log("hello")', 'blah.ts': ` //@ts-ignore export const u = import.meta.url `, 'blah-cjs.cts': ` import { pathToFileURL } from 'url' export const u = pathToFileURL(__filename) `, }, }), ) let buildFailed = false const { buildCommonJS } = (await t.mockImport( '../dist/esm/build-commonjs.js', { child_process: { spawnSync }, '../dist/esm/build-fail.js': { default: () => { buildFailed = true }, }, }, )) as typeof import('../dist/esm/build-commonjs.js') buildCommonJS() t.equal(buildFailed, true) t.matchSnapshot(output()) t.matchSnapshot(spawnSync.args()) }) isaacs-tshy-bded619/test/build-esm.ts000066400000000000000000000056371464240215000176630ustar00rootroot00000000000000import { SpawnSyncReturns } from 'child_process' import { readdirSync } from 'fs' import t from 'tap' t.cleanSnapshot = s => s.split(process.execPath).join('{NODE}') const spawnSuccess: SpawnSyncReturns = { status: 0, signal: null, pid: 123, output: [], stdout: Buffer.alloc(0), stderr: Buffer.alloc(0), } const spawnFail: SpawnSyncReturns = { status: 1, signal: null, pid: 123, output: [], stdout: Buffer.alloc(0), stderr: Buffer.alloc(0), } import { spawnSync as ogSpawnSync } from 'node:child_process' let spawnResult = spawnSuccess const spawnSync = t.captureFn((...a: any[]) => { //@ts-ignore ogSpawnSync(...a) return spawnResult }) const output = () => readdirSync('.tshy-build/esm').sort((a, b) => a.localeCompare(b, 'en'), ) t.test('basic esm build', async t => { spawnResult = spawnSuccess t.chdir( t.testdir({ 'package.json': JSON.stringify({ tshy: { esmDialects: ['blah', 'no-overrides'], exports: { '.': './src/index.ts', './blah': './src/blah.ts', }, }, }), src: { 'index.ts': 'console.log("hello")', 'blah.ts': ` //@ts-ignore export const u = import.meta.url `, 'blah-blah.mts': ` //@ts-ignore export const u = 'file://blah/blah.blah' `, 'blah-cjs.cts': ` import { pathToFileURL } from 'url' export const u = pathToFileURL(__filename) `, }, }), ) let buildFailed = false const { buildESM } = (await t.mockImport( '../dist/esm/build-esm.js', { child_process: { spawnSync }, '../dist/esm/build-fail.js': { default: () => { buildFailed = true }, }, }, )) as typeof import('../dist/esm/build-esm.js') buildESM() t.equal(buildFailed, false) t.matchSnapshot(output()) t.matchSnapshot(spawnSync.args()) }) t.test('build failure', async t => { spawnResult = spawnFail t.chdir( t.testdir({ 'package.json': JSON.stringify({ tshy: { exports: { '.': './src/index.ts', './blah': './src/blah.ts', }, }, }), src: { 'index.ts': 'console.log("hello")', 'blah.ts': ` //@ts-ignore export const u = import.meta.url `, 'blah-cjs.cts': ` import { pathToFileURL } from 'url' export const u = pathToFileURL(__filename) `, }, }), ) let buildFailed = false const { buildESM } = (await t.mockImport( '../dist/esm/build-esm.js', { child_process: { spawnSync }, '../dist/esm/build-fail.js': { default: () => { buildFailed = true }, }, }, )) as typeof import('../dist/esm/build-esm.js') buildESM() t.equal(buildFailed, true) t.matchSnapshot(output()) t.matchSnapshot(spawnSync.args()) }) isaacs-tshy-bded619/test/build-fail.ts000066400000000000000000000020561464240215000200020ustar00rootroot00000000000000import { SpawnSyncReturns } from 'node:child_process' import t from 'tap' t.capture(process, 'exit', (...a: any[]) => calls.push(['process.exit', a]), ) const calls: [string, any[]][] = [] const { default: buildFail } = (await t.mockImport( '../dist/esm/build-fail.js', { '../dist/esm/tsconfig.js': {}, '../dist/esm/package.js': { default: { name: 'package' } }, '../dist/esm/unbuilt-imports.js': { unlink: (...a: any[]) => calls.push(['unlinkImports', a]), }, '../dist/esm/self-link.js': { unlink: (...a: any[]) => calls.push(['unlinkSelfDep', a]), }, '../dist/esm/set-folder-dialect.js': { default: (...a: any[]) => calls.push(['setFolderDialect', a]), }, '../dist/esm/fail.js': { default: (...a: any[]) => calls.push(['fail', a]), }, '../dist/esm/console.js': { error: (...a: any[]) => calls.push(['console.error', a]), }, }, )) as typeof import('../src/build-fail.js') buildFail({ code: 0, signal: 'testing', } as unknown as SpawnSyncReturns) t.matchSnapshot(calls) isaacs-tshy-bded619/test/build-live-commonjs.ts000066400000000000000000000014721464240215000216520ustar00rootroot00000000000000import { readdirSync } from 'fs' import t from 'tap' const output = () => readdirSync('.tshy-build/commonjs').sort((a, b) => a.localeCompare(b, 'en'), ) t.test('commonjs live dev build', async t => { t.chdir( t.testdir({ 'package.json': JSON.stringify({ tshy: { commonjsDialects: ['blah', 'no-overrides'], exports: { '.': './src/index.ts', './blah': './src/blah.ts', }, }, }), src: { 'index.ts': 'console.log("hello")', 'blah.ts': '', 'blah-blah.cts': '', 'blah-cjs.cts': '', }, }), ) const { buildLiveCommonJS } = await t.mockImport< typeof import('../src/build-live-commonjs.js') >('../src/build-live-commonjs.js') buildLiveCommonJS() t.matchSnapshot(output()) }) isaacs-tshy-bded619/test/build-live-esm.ts000066400000000000000000000014031464240215000206030ustar00rootroot00000000000000import { readdirSync } from 'fs' import t from 'tap' const output = () => readdirSync('.tshy-build/esm').sort((a, b) => a.localeCompare(b, 'en'), ) t.test('esm live dev build', async t => { t.chdir( t.testdir({ 'package.json': JSON.stringify({ tshy: { esmDialects: ['blah', 'no-overrides'], exports: { '.': './src/index.ts', './blah': './src/blah.ts', }, }, }), src: { 'index.ts': '', 'blah.ts': '', 'blah-blah.mts': '', 'blah-cjs.cts': '', }, }), ) const { buildLiveESM } = await t.mockImport< typeof import('../src/build-live-esm.js') >('../src/build-live-esm.js') buildLiveESM() t.matchSnapshot(output()) }) isaacs-tshy-bded619/test/build.ts000066400000000000000000000107351464240215000170740ustar00rootroot00000000000000import { readFileSync } from 'fs' import t from 'tap' import { fileURLToPath } from 'url' import { Package } from '../src/types.js' const pkg = {} as unknown as Package let builtCommonJS = false let builtESM = false let builtLiveCommonJS = false let builtLiveESM = false t.beforeEach(() => { builtCommonJS = false builtESM = false builtLiveCommonJS = false builtLiveESM = false }) const logCall = t.captureFn((_msg: string, _args: any[]) => {}) const calls = logCall.args const mocks = { '../dist/esm/unbuilt-imports.js': { link: async (...a: any[]) => logCall('imports.link', a), unlink: async (...a: any[]) => logCall('imports.unlink', a), save: (...a: any[]) => logCall('imports.save', a), }, '../dist/esm/self-link.js': { link: (...a: any[]) => logCall('self-link.link', a), unlink: (...a: any[]) => logCall('self-link.unlink', a), }, '../dist/esm/package.js': { default: pkg }, '../dist/esm/bins.js': { default: () => {} }, '../dist/esm/build-commonjs.js': { buildCommonJS: () => (builtCommonJS = true), }, '../dist/esm/build-live-commonjs.js': { buildLiveCommonJS: () => (builtLiveCommonJS = true), }, '../dist/esm/build-esm.js': { buildESM: () => (builtESM = true) }, '../dist/esm/build-live-esm.js': { buildLiveESM: () => (builtLiveESM = true), }, rimraf: { rimrafSync: () => {} }, '../dist/esm/tsconfig.js': {}, '../dist/esm/write-package.js': { default: () => {} }, 'sync-content': { syncContentSync: () => {} }, '../dist/esm/console.js': { log: () => {}, debug: () => {}, print: () => {}, }, } t.test('default settings', async t => { const { default: build } = await t.mockImport( '../dist/esm/build.js', mocks, ) await build() t.equal(builtESM, true) t.equal(builtCommonJS, true) t.equal(builtLiveESM, false) t.equal(builtLiveCommonJS, false) t.matchSnapshot(calls()) }) t.test('liveDev', async t => { pkg.tshy = { liveDev: true } t.test('no envs', async t => { const { default: build } = await t.mockImport( '../dist/esm/build.js', mocks, ) await build() t.equal(builtESM, false) t.equal(builtCommonJS, false) t.equal(builtLiveESM, true) t.equal(builtLiveCommonJS, true) t.matchSnapshot(calls()) }) for (const s of ['pack', 'publish']) { t.test(s, async t => { t.intercept(process, 'env', { value: { ...process.env, npm_command: s, }, }) const { default: build } = await t.mockImport( '../dist/esm/build.js', mocks, ) await build() t.equal(builtESM, true) t.equal(builtCommonJS, true) t.equal(builtLiveESM, false) t.equal(builtLiveCommonJS, false) t.matchSnapshot(calls()) }) } }) t.test('build commonjs only', async t => { pkg.tshy = { dialects: ['commonjs'] } const { default: build } = await t.mockImport( '../dist/esm/build.js', mocks, ) await build() t.equal(builtESM, false) t.equal(builtCommonJS, true) t.matchSnapshot(calls()) }) t.test('build esm only', async t => { pkg.tshy = { dialects: ['esm'] } const { default: build } = await t.mockImport( '../dist/esm/build.js', mocks, ) await build() t.equal(builtESM, true) t.equal(builtCommonJS, false) t.matchSnapshot(calls()) }) t.test('build both', async t => { pkg.tshy = { dialects: ['esm', 'commonjs'] } const { default: build } = await t.mockImport( '../dist/esm/build.js', mocks, ) await build() t.equal(builtESM, true) t.equal(builtCommonJS, true) t.matchSnapshot(calls()) }) t.test('imports linking', async t => { // make sure one of them doesn't already have a scripts block for (const i of ['imports', 'imports-with-star', 'basic']) { t.test(i, async t => { t.chdir( fileURLToPath(new URL('./fixtures/' + i, import.meta.url)), ) const pkg = JSON.parse(readFileSync('package.json', 'utf8')) const { default: build } = await t.mockImport( '../dist/esm/build.js', { ...mocks, '../dist/esm/package.js': { default: pkg }, '../dist/esm/unbuilt-imports.js': { link: async (...a: any[]) => logCall('imports.link', a), unlink: async (...a: any[]) => logCall('imports.unlink', a), save: (...a: any[]) => { logCall('imports.save', a) return i.startsWith('imports') }, }, }, ) await build() t.matchSnapshot(calls()) }) } }) isaacs-tshy-bded619/test/built-imports.ts000066400000000000000000000016501464240215000206030ustar00rootroot00000000000000import t from 'tap' import getImports from '../src/built-imports.js' import { Package } from '../src/types.js' const cases: [ pkg: Omit, expect: Package['imports'], ][] = [ [{}, undefined], [{ tshy: {} }, undefined], [{ imports: { '#x': 'y' } }, { '#x': 'y' }], [ { imports: { '#t': './src/t.ts', '#x': './src/x.tsx', '#b/*': './src/blah/*.ts', }, }, { '#t': './t.js', '#x': './x.js', '#b/*': './blah/*.js' }, ], [ { imports: { '#a': './xyz/a.js', '#t': './src/t.ts', '#x': './src/x.tsx', '#b/*': './src/blah/*.ts', }, }, { '#a': './xyz/a.js', '#t': './t.js', '#x': './x.js', '#b/*': './blah/*.js', }, ], ] let i = 0 for (const [pkg, expect] of cases) { t.test(String(i++), t => { t.strictSame(getImports(pkg as Package), expect) t.end() }) } isaacs-tshy-bded619/test/clean-build-tmp.ts000066400000000000000000000033411464240215000207450ustar00rootroot00000000000000import { statSync } from 'fs' import t from 'tap' import cleanBuildTmp from '../src/clean-build-tmp.js' import readTypescriptConfig from '../src/read-typescript-config.js' t.test('no incremental build, just delete it', t => { readTypescriptConfig().options.incremental = false t.chdir( t.testdir({ '.tshy-build': {}, }), ) cleanBuildTmp() t.throws(() => statSync('.tshy-build')) t.end() }) t.test('no tsbuildinfo, just delete it', t => { readTypescriptConfig().options.incremental = true t.chdir( t.testdir({ '.tshy-build': {}, }), ) cleanBuildTmp() t.throws(() => statSync('.tshy-build')) t.end() }) t.test('remove files not found in src', t => { readTypescriptConfig().options.incremental = true t.chdir( t.testdir({ '.tshy-build': { '.tshy': { 'esm.tsbuildinfo': '{}' }, esm: { 'a.d.ts': '', 'a.js': '', 'a.js.map': '', 'a.d.ts.map': '', 'a.jsx': '', 'a.jsx.map': '', dir: { 'b.d.ts': '', 'b.js': '', 'b.js.map': '', 'b.d.ts.map': '', }, 'x.d.ts': '', 'x.js': '', 'x.js.map': '', 'x.d.ts.map': '', 'm.mjs': '', 'm.d.mts': '', 'c.cjs': '', 'c.d.cts': '', xdir: { 'x.d.ts': '', 'x.js': '', 'x.js.map': '', 'x.d.ts.map': '', }, }, }, src: { 'a.tsx': '', dir: { 'b.ts': '', }, }, }), ) cleanBuildTmp() t.throws(() => statSync('.tshy-build/dist/esm/x.js.map')) t.throws(() => statSync('.tshy-build/dist/esm/x.d.ts')) t.end() }) isaacs-tshy-bded619/test/config.ts000066400000000000000000000100361464240215000172340ustar00rootroot00000000000000import { readFileSync } from 'fs' import t from 'tap' import { Package, TshyConfig, TshyConfigMaybeGlobExports, } from '../src/types.js' t.test('basic parsing cases', t => { const cases: [ config: undefined | TshyConfigMaybeGlobExports, sources: string[], ok: boolean, expect: TshyConfig, ][] = [ [ undefined, [], true, { exports: { './package.json': './package.json' } }, ], [ { exports: './src/*' }, ['./src/index.ts', './src/foo.ts', './src/utils/bar.ts'], true, { exports: { './package.json': './package.json', '.': './src/index.ts', './foo': './src/foo.ts', }, }, ], [ { exports: 'src/*' }, ['./src/index.ts', './src/foo.ts', './src/utils/bar.ts'], true, { exports: { './package.json': './package.json', '.': './src/index.ts', './foo': './src/foo.ts', }, }, ], [ { exports: ['src/utils/*.ts', './src/index.*'] }, [ './src/index.ts', './src/utils/baz.js', './src/foo.ts', './src/utils/bar.ts', ], true, { exports: { './package.json': './package.json', '.': './src/index.ts', './utils/bar': './src/utils/bar.ts', }, }, ], [ undefined, ['./src/index.ts'], true, { exports: { './package.json': './package.json', '.': './src/index.ts', }, }, ], [ { selfLink: false }, ['./src/index.ts'], true, { exports: { './package.json': './package.json', '.': './src/index.ts', }, selfLink: false, }, ], //@ts-expect-error [{ dialects: 'yolo' }, [], false, {}], [ { exports: { './blah': { require: './src/notallowed' } } }, [], false, {}, ], [ { exclude: ['./src/*.test.ts'], exports: { '.': './src/index.ts' }, }, ['./src/index.ts'], true, { exclude: ['./src/*.test.ts'], exports: { '.': './src/index.ts' }, }, ], //@ts-expect-error [{ main: 'blah' }, [], false, {}], //@ts-expect-error [{ imports: 'blah' }, [], false, {}], //@ts-expect-error [{ imports: ['blah'] }, [], false, {}], [{ project: 'thisFileDoesNotExist.json' }, [], false, {}], ] t.plan(cases.length) for (const [config, sources, ok, expect] of cases) { t.test(JSON.stringify({ config, sources, ok }), async t => { const exits = t.capture(process, 'exit', () => { throw 'exit' }).args const pkg: Package = { name: 'x', version: '1.2.3', tshy: config, } let failMsg: undefined | string = undefined const result = (await t .mockImport('../dist/esm/config.js', { '../dist/esm/package.js': { default: pkg }, '../dist/esm/fail.js': { default: (m: string) => (failMsg = m), }, '../dist/esm/sources.js': { default: sources }, }) .catch(er => { if (ok) t.equal(er, undefined, 'did not expect exit') })) as typeof import('../dist/esm/config.js') if (!ok) { t.matchSnapshot(failMsg) t.strictSame(exits(), [[1]]) } else { t.strictSame(result.default, expect) t.equal(failMsg, undefined) t.strictSame(exits(), []) } }) } }) t.test('do not clobber glob exports', async t => { const pkg: Package = { name: 'x', version: '1.2.3', tshy: { selfLink: false, dialects: ['esm'], exports: 'src/*', }, } const dir = t.testdir({ 'package.json': JSON.stringify(pkg), src: { 'foo.ts': 'console.log("hello from foo")', 'bar.ts': 'console.log("hello from bar")', }, }) t.chdir(dir) await t.mockImport('../src/index.js') const result = JSON.parse(readFileSync('./package.json', 'utf8')) t.strictSame(result.tshy, pkg.tshy) }) isaacs-tshy-bded619/test/console.ts000066400000000000000000000026711464240215000174370ustar00rootroot00000000000000import t from 'tap' const logs = t.capture(console, 'log').args const errors = t.capture(console, 'error').args const env = process.env t.beforeEach(t => t.intercept(process, 'env', { value: { ...env } })) t.test('no verbosity setting', async t => { delete process.env.TSHY_VERBOSE const console = (await t.mockImport( '../dist/esm/console.js', )) as typeof import('../dist/esm/console.js') console.log('hello') console.debug('debug') console.error('error') t.strictSame(logs(), []) t.strictSame(errors(), []) console.print() t.strictSame(logs(), []) t.strictSame(errors(), [['debug'], ['error']]) }) t.test('verbose=1', async t => { process.env.TSHY_VERBOSE = '1' const console = (await t.mockImport( '../dist/esm/console.js', )) as typeof import('../dist/esm/console.js') console.log('hello') console.debug('debug') console.error('error') t.strictSame(logs(), [['hello']]) t.strictSame(errors(), [['error']]) console.print() t.strictSame(logs(), []) t.strictSame(errors(), [['debug']]) }) t.test('verbose=2', async t => { process.env.TSHY_VERBOSE = '2' const console = (await t.mockImport( '../dist/esm/console.js', )) as typeof import('../dist/esm/console.js') console.log('hello') console.debug('debug') console.error('error') t.strictSame(logs(), [['hello']]) t.strictSame(errors(), [['debug'], ['error']]) console.print() t.strictSame(logs(), []) t.strictSame(errors(), []) }) isaacs-tshy-bded619/test/dialects.ts000066400000000000000000000007531464240215000175640ustar00rootroot00000000000000import t from 'tap' const { default: dialects } = (await t.mockImport( '../dist/esm/dialects.js', { '../dist/esm/config.js': { default: { dialects: ['esm'] } }, }, )) as typeof import('../dist/esm/dialects.js') const { default: dialectsEmpty } = (await t.mockImport( '../dist/esm/dialects.js', { '../dist/esm/config.js': { default: {} }, }, )) as typeof import('../dist/esm/dialects.js') t.strictSame(dialects, ['esm']) t.strictSame(dialectsEmpty, ['esm', 'commonjs']) isaacs-tshy-bded619/test/exports.ts000066400000000000000000000325511464240215000175010ustar00rootroot00000000000000import { ConditionalValue, ExportsSubpaths } from 'resolve-import' import t, { Test } from 'tap' import { PolyfillSet } from '../src/polyfills.js' import { Package, TshyConfig } from '../src/types.js' // order is relevant in the exports objects we're snapshotting here t.compareOptions = { sort: false } const { getImpTarget, getReqTarget } = await t.mockImport< typeof import('../src/exports.js') >('../src/exports.js', { '../src/dialects.js': { default: ['esm', 'commonjs'] }, }) const cjs = await t.mockImport( '../src/exports.js', { '../src/dialects.js': { default: ['commonjs'] }, }, ) const esm = await t.mockImport( '../src/exports.js', { '../src/dialects.js': { default: ['esm'] }, }, ) t.equal(getImpTarget(undefined), undefined) t.equal(getImpTarget('foo.cts'), undefined) t.equal(getImpTarget({ require: './foo.cts' }), undefined) t.equal(getImpTarget('./src/foo.cts'), undefined) t.equal(getImpTarget({ import: './foo.mts' }), './foo.mts') t.equal(getImpTarget('./src/foo.mts'), './dist/esm/foo.mjs') t.equal(cjs.getImpTarget(undefined), undefined) t.equal(cjs.getImpTarget('foo.cts'), undefined) t.equal(cjs.getImpTarget({ require: './foo.cts' }), undefined) t.equal(cjs.getImpTarget('./src/foo.cts'), undefined) t.equal(cjs.getImpTarget({ import: './foo.mts' }), './foo.mts') t.equal(cjs.getImpTarget('./src/foo.mts'), undefined) t.equal(esm.getImpTarget(undefined), undefined) t.equal(esm.getImpTarget('foo.cts'), undefined) t.equal(esm.getImpTarget({ require: './foo.cts' }), undefined) t.equal(esm.getImpTarget('./src/foo.cts'), undefined) t.equal(esm.getImpTarget({ import: './foo.mts' }), './foo.mts') t.equal(esm.getImpTarget('./src/foo.mts'), './dist/esm/foo.mjs') const p = new Map([ [ 'cjs', Object.assign(new PolyfillSet('commonjs', 'cjs'), { map: new Map([['./src/fill-cjs.cts', './src/fill.ts']]), }), ], ]) t.equal(getReqTarget(undefined, p), undefined) t.equal(getReqTarget('foo.cts', p), 'foo.cts') t.equal(getReqTarget('foo.mts', p), undefined) t.equal(getReqTarget({ require: './foo.cts' }, p), './foo.cts') t.equal(getReqTarget('./src/foo.cts', p), './dist/commonjs/foo.cjs') t.equal(getReqTarget({ import: './foo.mts' }, p), undefined) t.equal(getReqTarget('./src/foo.mts', p), undefined) t.equal(cjs.getReqTarget(undefined, p), undefined) t.equal(cjs.getReqTarget('foo.cts', p), 'foo.cts') t.equal(cjs.getReqTarget('foo.mts', p), undefined) t.equal(cjs.getReqTarget({ require: './foo.cts' }, p), './foo.cts') t.equal( cjs.getReqTarget('./src/foo.cts', p), './dist/commonjs/foo.cjs', ) t.equal(cjs.getReqTarget({ import: './foo.mts' }, p), undefined) t.equal(cjs.getReqTarget('./src/foo.mts', p), undefined) t.equal(esm.getReqTarget(undefined, p), undefined) t.equal(esm.getReqTarget('foo.cts', p), 'foo.cts') t.equal(esm.getReqTarget('foo.mts', p), undefined) t.equal(esm.getReqTarget({ require: './foo.cts' }, p), './foo.cts') t.equal(esm.getReqTarget({ require: './foo.mts' }, p), './foo.mts') t.equal(esm.getReqTarget('./src/foo.cts', p), undefined) t.equal(esm.getReqTarget({ import: './foo.mts' }, p), undefined) t.equal(esm.getReqTarget('./src/foo.mts', p), undefined) t.equal( cjs.getReqTarget('./src/fill-cjs.cts', p), './dist/commonjs/fill.js', ) t.test('setting top level main', async t => { // name, pkg, expect, ok const cases: [ string, { tshy?: TshyConfig exports: Record main?: string module?: string types?: string type?: string }, { main?: string module?: string types?: string }, boolean, ][] = [ [ 'main defaults true', { exports: { '.': { require: { types: './r.d.ts', default: './r.js' }, import: { types: './i.d.ts', default: './i.js' }, }, }, }, { main: './r.js', types: './r.d.ts' }, true, ], [ 'main explicit false, removes', { tshy: { main: false }, main: './r.js', types: './r.d.ts', exports: { '.': { require: { types: './r.d.ts', default: './r.js' }, import: { types: './i.d.ts', default: './i.js' }, }, }, }, {}, true, ], [ 'main explicit true', { tshy: { main: true }, exports: { '.': { require: { types: './r.d.ts', default: './r.js' }, import: { types: './i.d.ts', default: './i.js' }, }, }, }, { main: './r.js', types: './r.d.ts' }, true, ], [ 'main commonjs, no types', { tshy: { main: true }, exports: { '.': { require: './r.js', import: { types: './i.d.ts', default: './i.js' }, }, }, }, { main: './r.js' }, true, ], [ 'main=false, not set in pj already', { tshy: { main: false }, exports: { '.': { require: { types: './r.d.ts', default: './r.js' }, import: { types: './i.d.ts', default: './i.js' }, }, }, }, {}, true, ], [ 'main not set, no commonjs main export', { tshy: {}, exports: { '.': { import: { types: './i.d.ts', default: './i.js' }, }, }, }, {}, true, ], [ 'main explicit true, no commonjs module', { tshy: { main: true }, exports: { '.': { import: { types: './i.d.ts', default: './i.js' }, }, }, }, {}, false, ], [ 'invalid main commonjs, no exports', { tshy: { main: true }, exports: {}, }, {}, false, ], [ 'module defaults true', { exports: { '.': { require: { types: './r.d.ts', default: './r.js' }, import: { types: './i.d.ts', default: './i.js' }, }, }, }, { main: './r.js', types: './r.d.ts', module: './i.js' }, true, ], [ 'module explicit true', { tshy: { module: true }, exports: { '.': { require: { types: './r.d.ts', default: './r.js' }, import: { types: './i.d.ts', default: './i.js' }, }, }, }, { main: './r.js', types: './r.d.ts', module: './i.js' }, true, ], [ 'module explicit false, removes', { tshy: { module: false }, main: './r.js', types: './r.d.ts', exports: { '.': { require: { types: './r.d.ts', default: './r.js' }, import: { types: './i.d.ts', default: './i.js' }, }, }, }, { main: './r.js', types: './r.d.ts' }, true, ], [ 'invalid module esm, no exports', { tshy: { module: true }, exports: {}, }, {}, false, ], [ 'type defaults module', { exports: {}, }, {}, true, ], [ 'type=commonjs', { type: 'commonjs', exports: {}, }, {}, true, ], [ 'type=module', { type: 'module', exports: {}, }, {}, true, ], [ 'invalid type', { type: 'invalid type', exports: {}, }, {}, true, ], ] t.plan(cases.length) const exits = t.capture(process, 'exit', () => false).args const fails: any[][] = [] const { setMain } = await t.mockImport< typeof import('../src/exports.js') >('../src/exports.js', { '../src/fail.js': { default: (...a: any[]) => fails.push(a), }, }) for (const [name, pkg, expect, ok] of cases) { t.test(name, t => { const { tshy = {}, type } = pkg const { main } = tshy setMain(pkg.tshy, pkg as Package & { exports: ExportsSubpaths }) if (ok) { t.equal(pkg.main, expect.main) t.equal(pkg.types, expect.types) t.equal(pkg.type, type === 'commonjs' ? 'commonjs' : 'module') if (main === false) t.equal(pkg.tshy?.main, main) } else { t.strictSame(exits(), [[1]]) t.matchSnapshot(fails) fails.length = 0 } t.end() }) } }) t.test('extra dialects', async t => { const dialectOptions = [undefined, ['commonjs'], ['esm']] for (const dialects of dialectOptions) { t.test(String(dialects), async t => { const esmDialects = ['deno', 'no-overrides'] const commonjsDialects = ['blah'] for (const extras of [true, false]) { t.test(`extras=${extras}`, async t => { const { default: extraDialects } = (await t.mockImport( '../dist/esm/exports.js', { '../dist/esm/package.js': { default: { tshy: { ...(extras && { esmDialects, commonjsDialects }), sourceDialects: ['my-source'], dialects, exports: { '.': './src/index.ts', './foo': './src/foo.ts', }, }, }, }, '../dist/esm/sources.js': { default: new Set([ './src/index.ts', './src/index-blah.cts', './src/index-cjs.cts', './src/index-deno.mts', './src/foo.ts', './src/foo-blah.cts', ]), }, }, )) as typeof import('../dist/esm/exports.js') t.matchSnapshot(extraDialects) }) } }) } t.end() }) t.test('liveDev', async t => { const pkg: Package = { name: 'x', version: '1.2.3', tshy: { liveDev: true, dialects: ['commonjs', 'esm'], esmDialects: ['deno'], commonjsDialects: ['blah'], exports: { '.': './src/index.ts', './package.json': './package.json', './foo': './src/foo.mts', './foo-cjs': './src/foo.cts', './fill': './src/fill.ts', }, }, } const getLiveDev = async (t: Test) => { t.chdir( t.testdir({ 'package.json': JSON.stringify(pkg), src: { 'index.ts': '', 'foo.mts': '', 'foo-deno.mts': '', 'foo.cts': '', 'fill.ts': '', 'fill-cjs.cts': '', }, }), ) return await t.mockImport( '../src/exports.js', { '../src/config.js': { default: pkg.tshy }, '../src/package.js': { default: pkg }, '../src/dialects.js': { default: ['commonjs', 'esm'] }, '../src/sources.js': { default: new Set([ './src/index.ts', './src/foo.mts', './src/foo.cts', './src/fill.ts', './src/fill-cjs.cts', ]), }, }, ) } t.test('no envs', async t => { const ld = await getLiveDev(t) t.equal(ld.getImpTarget('foo.cts'), undefined) t.equal(ld.getImpTarget({ require: './foo.cts' }), undefined) t.equal(ld.getImpTarget('./src/foo.cts'), undefined) t.equal(ld.getImpTarget({ import: './foo.mts' }), './foo.mts') t.equal(ld.getImpTarget('./src/foo.mts'), './dist/esm/foo.mts') t.equal(ld.getImpTarget('./src/index.ts'), './dist/esm/index.ts') t.equal(ld.getReqTarget(undefined, p), undefined) t.equal(ld.getReqTarget('foo.cts', p), 'foo.cts') t.equal(ld.getReqTarget('foo.mts', p), undefined) t.equal(ld.getReqTarget({ require: './foo.cts' }, p), './foo.cts') t.equal( ld.getReqTarget('./src/foo.cts'), './dist/commonjs/foo.cts', ) t.equal(ld.getReqTarget({ import: './foo.mts' }, p), undefined) t.equal(ld.getReqTarget('./src/foo.mts', p), undefined) t.equal( ld.getReqTarget('./src/fill-cjs.cts', p), './dist/commonjs/fill.ts', ) t.matchSnapshot(pkg.exports) delete pkg.exports t.end() }) for (const c of ['publish', 'pack']) { t.test(c, async t => { t.intercept(process, 'env', { value: { ...process.env, npm_command: c, }, }) const ld = await getLiveDev(t) // should be the same as not having liveDev: true t.equal(ld.getImpTarget('foo.cts'), undefined) t.equal(ld.getImpTarget({ require: './foo.cts' }), undefined) t.equal(ld.getImpTarget('./src/foo.cts'), undefined) t.equal(ld.getImpTarget({ import: './foo.mts' }), './foo.mts') t.equal(ld.getImpTarget('./src/foo.mts'), './dist/esm/foo.mjs') t.equal( ld.getImpTarget('./src/index.ts'), './dist/esm/index.js', ) t.equal(ld.getReqTarget(undefined, p), undefined) t.equal(ld.getReqTarget('foo.cts', p), 'foo.cts') t.equal(ld.getReqTarget('foo.mts', p), undefined) t.equal( ld.getReqTarget({ require: './foo.cts' }, p), './foo.cts', ) t.equal( ld.getReqTarget('./src/foo.cts'), './dist/commonjs/foo.cjs', ) t.equal(ld.getReqTarget({ import: './foo.mts' }, p), undefined) t.equal(ld.getReqTarget('./src/foo.mts', p), undefined) t.equal( ld.getReqTarget('./src/fill-cjs.cts', p), './dist/commonjs/fill.js', ) t.matchSnapshot(pkg.exports) delete pkg.exports }) } t.end() }) isaacs-tshy-bded619/test/fail.ts000066400000000000000000000010131464240215000166750ustar00rootroot00000000000000import t from 'tap' t.capture(process, 'exit', (...a: any[]) => calls.push(['process.exit', a]), ) const calls: [string, any[]][] = [] const { default: fail } = (await t.mockImport('../dist/esm/fail.js', { '../dist/esm/console.js': { error: (...a: any[]) => calls.push(['console.error', a]), print: (...a: any[]) => calls.push(['console.print', a]), }, })) as typeof import('../dist/esm/fail.js') fail('no error') fail('with error', { message: 'error message' } as unknown as Error) t.matchSnapshot(calls) isaacs-tshy-bded619/test/fixtures/000077500000000000000000000000001464240215000172705ustar00rootroot00000000000000isaacs-tshy-bded619/test/fixtures/basic-custom-project/000077500000000000000000000000001464240215000233255ustar00rootroot00000000000000isaacs-tshy-bded619/test/fixtures/basic-custom-project/.tshy/000077500000000000000000000000001464240215000243725ustar00rootroot00000000000000isaacs-tshy-bded619/test/fixtures/basic-custom-project/.tshy/build.json000066400000000000000000000002351464240215000263640ustar00rootroot00000000000000{ "extends": "../tsconfig.custom.json", "compilerOptions": { "rootDir": "../src", "module": "nodenext", "moduleResolution": "nodenext" } } isaacs-tshy-bded619/test/fixtures/basic-custom-project/.tshy/commonjs.json000066400000000000000000000004301464240215000271070ustar00rootroot00000000000000{ "extends": "./build.json", "include": [ "../src/**/*.ts", "../src/**/*.cts", "../src/**/*.tsx", "../src/**/*.json" ], "exclude": [ "../src/**/*.mts", "../src/package.json" ], "compilerOptions": { "outDir": "../.tshy-build/commonjs" } } isaacs-tshy-bded619/test/fixtures/basic-custom-project/.tshy/esm.json000066400000000000000000000003741464240215000260550ustar00rootroot00000000000000{ "extends": "./build.json", "include": [ "../src/**/*.ts", "../src/**/*.mts", "../src/**/*.tsx", "../src/**/*.json" ], "exclude": [ "../src/package.json" ], "compilerOptions": { "outDir": "../.tshy-build/esm" } } isaacs-tshy-bded619/test/fixtures/basic-custom-project/package.json000066400000000000000000000003071464240215000256130ustar00rootroot00000000000000{ "name": "@my/package", "type": "module", "tshy": { "exports": { "./package.json": "./package.json", ".": "./src/index.ts" }, "project": "./tsconfig.custom.json" } } isaacs-tshy-bded619/test/fixtures/basic-custom-project/src/000077500000000000000000000000001464240215000241145ustar00rootroot00000000000000isaacs-tshy-bded619/test/fixtures/basic-custom-project/src/index.ts000066400000000000000000000000651464240215000255740ustar00rootroot00000000000000export const test = () => { console.log('hello') } isaacs-tshy-bded619/test/fixtures/basic-custom-project/tsconfig.custom.json000066400000000000000000000006551464240215000273530ustar00rootroot00000000000000{ "compilerOptions": { "declaration": true, "declarationMap": true, "esModuleInterop": true, "forceConsistentCasingInFileNames": true, "inlineSources": true, "jsx": "react", "module": "nodenext", "moduleResolution": "nodenext", "noUncheckedIndexedAccess": true, "resolveJsonModule": true, "skipLibCheck": true, "sourceMap": true, "strict": true, "target": "es2022" } } isaacs-tshy-bded619/test/fixtures/basic-imports-only-deps/000077500000000000000000000000001464240215000237545ustar00rootroot00000000000000isaacs-tshy-bded619/test/fixtures/basic-imports-only-deps/.tshy/000077500000000000000000000000001464240215000250215ustar00rootroot00000000000000isaacs-tshy-bded619/test/fixtures/basic-imports-only-deps/.tshy/build.json000066400000000000000000000002261464240215000270130ustar00rootroot00000000000000{ "extends": "../tsconfig.json", "compilerOptions": { "rootDir": "../src", "module": "nodenext", "moduleResolution": "nodenext" } } isaacs-tshy-bded619/test/fixtures/basic-imports-only-deps/.tshy/commonjs.json000066400000000000000000000004301464240215000275360ustar00rootroot00000000000000{ "extends": "./build.json", "include": [ "../src/**/*.ts", "../src/**/*.cts", "../src/**/*.tsx", "../src/**/*.json" ], "exclude": [ "../src/**/*.mts", "../src/package.json" ], "compilerOptions": { "outDir": "../.tshy-build/commonjs" } } isaacs-tshy-bded619/test/fixtures/basic-imports-only-deps/.tshy/esm.json000066400000000000000000000003741464240215000265040ustar00rootroot00000000000000{ "extends": "./build.json", "include": [ "../src/**/*.ts", "../src/**/*.mts", "../src/**/*.tsx", "../src/**/*.json" ], "exclude": [ "../src/package.json" ], "compilerOptions": { "outDir": "../.tshy-build/esm" } } isaacs-tshy-bded619/test/fixtures/basic-imports-only-deps/package.json000066400000000000000000000011201464240215000262340ustar00rootroot00000000000000{ "name": "@my/package", "imports": { "#ri": "resolve-import" }, "tshy": { "exports": { "./package.json": "./package.json", ".": "./src/index.ts" } }, "exports": { "./package.json": "./package.json", ".": { "import": { "types": "./dist/esm/index.d.ts", "default": "./dist/esm/index.js" }, "require": { "types": "./dist/commonjs/index.d.ts", "default": "./dist/commonjs/index.js" } } }, "main": "./dist/commonjs/index.js", "types": "./dist/commonjs/index.d.ts", "type": "module" } isaacs-tshy-bded619/test/fixtures/basic-imports-only-deps/src/000077500000000000000000000000001464240215000245435ustar00rootroot00000000000000isaacs-tshy-bded619/test/fixtures/basic-imports-only-deps/src/index.ts000066400000000000000000000000651464240215000262230ustar00rootroot00000000000000export const test = () => { console.log('hello') } isaacs-tshy-bded619/test/fixtures/basic-imports-only-deps/tsconfig.json000066400000000000000000000006551464240215000264710ustar00rootroot00000000000000{ "compilerOptions": { "declaration": true, "declarationMap": true, "esModuleInterop": true, "forceConsistentCasingInFileNames": true, "inlineSources": true, "jsx": "react", "module": "nodenext", "moduleResolution": "nodenext", "noUncheckedIndexedAccess": true, "resolveJsonModule": true, "skipLibCheck": true, "sourceMap": true, "strict": true, "target": "es2022" } } isaacs-tshy-bded619/test/fixtures/basic/000077500000000000000000000000001464240215000203515ustar00rootroot00000000000000isaacs-tshy-bded619/test/fixtures/basic/.tshy/000077500000000000000000000000001464240215000214165ustar00rootroot00000000000000isaacs-tshy-bded619/test/fixtures/basic/.tshy/build.json000066400000000000000000000002261464240215000234100ustar00rootroot00000000000000{ "extends": "../tsconfig.json", "compilerOptions": { "rootDir": "../src", "module": "nodenext", "moduleResolution": "nodenext" } } isaacs-tshy-bded619/test/fixtures/basic/.tshy/commonjs.json000066400000000000000000000004301464240215000241330ustar00rootroot00000000000000{ "extends": "./build.json", "include": [ "../src/**/*.ts", "../src/**/*.cts", "../src/**/*.tsx", "../src/**/*.json" ], "exclude": [ "../src/**/*.mts", "../src/package.json" ], "compilerOptions": { "outDir": "../.tshy-build/commonjs" } } isaacs-tshy-bded619/test/fixtures/basic/.tshy/esm.json000066400000000000000000000003741464240215000231010ustar00rootroot00000000000000{ "extends": "./build.json", "include": [ "../src/**/*.ts", "../src/**/*.mts", "../src/**/*.tsx", "../src/**/*.json" ], "exclude": [ "../src/package.json" ], "compilerOptions": { "outDir": "../.tshy-build/esm" } } isaacs-tshy-bded619/test/fixtures/basic/package.json000066400000000000000000000002361464240215000226400ustar00rootroot00000000000000{ "name": "@my/package", "type": "module", "tshy": { "exports": { "./package.json": "./package.json", ".": "./src/index.ts" } } } isaacs-tshy-bded619/test/fixtures/basic/src/000077500000000000000000000000001464240215000211405ustar00rootroot00000000000000isaacs-tshy-bded619/test/fixtures/basic/src/index.ts000066400000000000000000000000651464240215000226200ustar00rootroot00000000000000export const test = () => { console.log('hello') } isaacs-tshy-bded619/test/fixtures/basic/tsconfig.json000066400000000000000000000006551464240215000230660ustar00rootroot00000000000000{ "compilerOptions": { "declaration": true, "declarationMap": true, "esModuleInterop": true, "forceConsistentCasingInFileNames": true, "inlineSources": true, "jsx": "react", "module": "nodenext", "moduleResolution": "nodenext", "noUncheckedIndexedAccess": true, "resolveJsonModule": true, "skipLibCheck": true, "sourceMap": true, "strict": true, "target": "es2022" } } isaacs-tshy-bded619/test/fixtures/imports-with-star/000077500000000000000000000000001464240215000227055ustar00rootroot00000000000000isaacs-tshy-bded619/test/fixtures/imports-with-star/.tshy/000077500000000000000000000000001464240215000237525ustar00rootroot00000000000000isaacs-tshy-bded619/test/fixtures/imports-with-star/.tshy/build.json000066400000000000000000000002261464240215000257440ustar00rootroot00000000000000{ "extends": "../tsconfig.json", "compilerOptions": { "rootDir": "../src", "module": "nodenext", "moduleResolution": "nodenext" } } isaacs-tshy-bded619/test/fixtures/imports-with-star/.tshy/commonjs.json000066400000000000000000000004301464240215000264670ustar00rootroot00000000000000{ "extends": "./build.json", "include": [ "../src/**/*.ts", "../src/**/*.cts", "../src/**/*.tsx", "../src/**/*.json" ], "exclude": [ "../src/**/*.mts", "../src/package.json" ], "compilerOptions": { "outDir": "../.tshy-build/commonjs" } } isaacs-tshy-bded619/test/fixtures/imports-with-star/.tshy/esm.json000066400000000000000000000003741464240215000254350ustar00rootroot00000000000000{ "extends": "./build.json", "include": [ "../src/**/*.ts", "../src/**/*.mts", "../src/**/*.tsx", "../src/**/*.json" ], "exclude": [ "../src/package.json" ], "compilerOptions": { "outDir": "../.tshy-build/esm" } } isaacs-tshy-bded619/test/fixtures/imports-with-star/lib/000077500000000000000000000000001464240215000234535ustar00rootroot00000000000000isaacs-tshy-bded619/test/fixtures/imports-with-star/lib/foo-browser.js000066400000000000000000000000371464240215000262550ustar00rootroot00000000000000globalThis.foo = 'as a global' isaacs-tshy-bded619/test/fixtures/imports-with-star/lib/foo-global.d.ts000066400000000000000000000000321464240215000262610ustar00rootroot00000000000000declare const foo: string isaacs-tshy-bded619/test/fixtures/imports-with-star/lib/foo-import.mjs000066400000000000000000000000461464240215000262610ustar00rootroot00000000000000export const foo = 'import, not node' isaacs-tshy-bded619/test/fixtures/imports-with-star/lib/foo-node.cjs000066400000000000000000000000311464240215000256540ustar00rootroot00000000000000exports.foo = 'node cjs' isaacs-tshy-bded619/test/fixtures/imports-with-star/lib/foo-node.mjs000066400000000000000000000000361464240215000256730ustar00rootroot00000000000000export const foo = 'node esm' isaacs-tshy-bded619/test/fixtures/imports-with-star/lib/foo-require.cjs000066400000000000000000000000421464240215000264050ustar00rootroot00000000000000exports.foo = 'require, not node' isaacs-tshy-bded619/test/fixtures/imports-with-star/lib/foo.d.cts000066400000000000000000000000411464240215000251660ustar00rootroot00000000000000export declare const foo: string isaacs-tshy-bded619/test/fixtures/imports-with-star/lib/foo.d.mts000066400000000000000000000000411464240215000252000ustar00rootroot00000000000000export declare const foo: string isaacs-tshy-bded619/test/fixtures/imports-with-star/lib/foo.d.ts000066400000000000000000000000411464240215000250230ustar00rootroot00000000000000export declare const foo: string isaacs-tshy-bded619/test/fixtures/imports-with-star/package.json000066400000000000000000000052101464240215000251710ustar00rootroot00000000000000{ "name": "@my/package", "type": "module", "imports": { "#xp": "xyz/package.json", "#ri": "resolve-import", "#ri/*": "resolve-import/*", "#m/*": "./lib/*.mjs", "#c/*": "./lib/*.cjs", "#fs": "node:fs", "#root": "./root.mjs", "#foo": { "node": { "import": [ { "types": "./lib/foo.d.mts" }, "./lib/foo-node.mjs" ], "require": [ { "types": "./lib/foo.d.cts" }, "./lib/foo-node.cjs" ] }, "require": [ { "types": "./lib/foo.d.cts" }, "./lib/foo-require.cjs" ], "import": [ { "types": "./lib/foo.d.mts" }, "./lib/foo-import.mjs" ], "types": "./lib/foo-global.d.ts", "default": "./lib/foo-browser.js" } }, "tshy": { "exports": { "./foo": { "node": { "import": [ { "types": "./lib/foo.d.mts" }, "./lib/foo-node.mjs" ], "require": [ { "types": "./lib/foo.d.cts" }, "./lib/foo-node.cjs" ] }, "require": [ { "types": "./lib/foo.d.cts" }, "./lib/foo-require.cjs" ], "import": [ { "types": "./lib/foo.d.mts" }, "./lib/foo-import.mjs" ], "types": "./lib/foo-global.d.ts", "default": "./lib/foo-browser.js" }, "./package.json": "./package.json", ".": "./src/index.ts" } }, "exports": { "./foo": { "node": { "import": [ { "types": "./lib/foo.d.mts" }, "./lib/foo-node.mjs" ], "require": [ { "types": "./lib/foo.d.cts" }, "./lib/foo-node.cjs" ] }, "require": [ { "types": "./lib/foo.d.cts" }, "./lib/foo-require.cjs" ], "import": [ { "types": "./lib/foo.d.mts" }, "./lib/foo-import.mjs" ], "types": "./lib/foo-global.d.ts", "default": "./lib/foo-browser.js" }, "./package.json": "./package.json", ".": { "import": { "types": "./dist/esm/index.d.ts", "default": "./dist/esm/index.js" }, "require": { "types": "./dist/commonjs/index.d.ts", "default": "./dist/commonjs/index.js" } } }, "scripts": { "preinstall": "node -e \"import(process.argv[1]).catch(()=>{})\" dist/.tshy-link-imports.mjs" } } isaacs-tshy-bded619/test/fixtures/imports-with-star/root.cjs000066400000000000000000000000001464240215000243570ustar00rootroot00000000000000isaacs-tshy-bded619/test/fixtures/imports-with-star/src/000077500000000000000000000000001464240215000234745ustar00rootroot00000000000000isaacs-tshy-bded619/test/fixtures/imports-with-star/src/g.ts000066400000000000000000000000761464240215000242750ustar00rootroot00000000000000declare var global: { foo: string } global.foo = 'global foo' isaacs-tshy-bded619/test/fixtures/imports-with-star/src/index.ts000066400000000000000000000002561464240215000251560ustar00rootroot00000000000000import { foo } from '#foo' export const test = async () => { await import('@my/package/foo').then(({ foo }) => console.log('pkg exports', foo) ) console.log(foo) } isaacs-tshy-bded619/test/fixtures/imports-with-star/tsconfig.json000066400000000000000000000007711464240215000254210ustar00rootroot00000000000000{ "compilerOptions": { "paths": { "@my/package/*": [ "./lib/*.js" ] }, "declaration": true, "declarationMap": true, "esModuleInterop": true, "forceConsistentCasingInFileNames": true, "inlineSources": true, "jsx": "react", "module": "nodenext", "moduleResolution": "nodenext", "noUncheckedIndexedAccess": true, "resolveJsonModule": true, "skipLibCheck": true, "sourceMap": true, "strict": true, "target": "es2022" } } isaacs-tshy-bded619/test/fixtures/imports/000077500000000000000000000000001464240215000207655ustar00rootroot00000000000000isaacs-tshy-bded619/test/fixtures/imports/.tshy/000077500000000000000000000000001464240215000220325ustar00rootroot00000000000000isaacs-tshy-bded619/test/fixtures/imports/.tshy/build.json000066400000000000000000000002261464240215000240240ustar00rootroot00000000000000{ "extends": "../tsconfig.json", "compilerOptions": { "rootDir": "../src", "module": "nodenext", "moduleResolution": "nodenext" } } isaacs-tshy-bded619/test/fixtures/imports/.tshy/commonjs.json000066400000000000000000000004301464240215000245470ustar00rootroot00000000000000{ "extends": "./build.json", "include": [ "../src/**/*.ts", "../src/**/*.cts", "../src/**/*.tsx", "../src/**/*.json" ], "exclude": [ "../src/**/*.mts", "../src/package.json" ], "compilerOptions": { "outDir": "../.tshy-build/commonjs" } } isaacs-tshy-bded619/test/fixtures/imports/.tshy/esm.json000066400000000000000000000003741464240215000235150ustar00rootroot00000000000000{ "extends": "./build.json", "include": [ "../src/**/*.ts", "../src/**/*.mts", "../src/**/*.tsx", "../src/**/*.json" ], "exclude": [ "../src/package.json" ], "compilerOptions": { "outDir": "../.tshy-build/esm" } } isaacs-tshy-bded619/test/fixtures/imports/lib/000077500000000000000000000000001464240215000215335ustar00rootroot00000000000000isaacs-tshy-bded619/test/fixtures/imports/lib/foo-browser.js000066400000000000000000000000371464240215000243350ustar00rootroot00000000000000globalThis.foo = 'as a global' isaacs-tshy-bded619/test/fixtures/imports/lib/foo-global.d.ts000066400000000000000000000000321464240215000243410ustar00rootroot00000000000000declare const foo: string isaacs-tshy-bded619/test/fixtures/imports/lib/foo-import.mjs000066400000000000000000000000461464240215000243410ustar00rootroot00000000000000export const foo = 'import, not node' isaacs-tshy-bded619/test/fixtures/imports/lib/foo-node.cjs000066400000000000000000000000311464240215000237340ustar00rootroot00000000000000exports.foo = 'node cjs' isaacs-tshy-bded619/test/fixtures/imports/lib/foo-node.mjs000066400000000000000000000000361464240215000237530ustar00rootroot00000000000000export const foo = 'node esm' isaacs-tshy-bded619/test/fixtures/imports/lib/foo-require.cjs000066400000000000000000000000421464240215000244650ustar00rootroot00000000000000exports.foo = 'require, not node' isaacs-tshy-bded619/test/fixtures/imports/lib/foo.d.cts000066400000000000000000000000411464240215000232460ustar00rootroot00000000000000export declare const foo: string isaacs-tshy-bded619/test/fixtures/imports/lib/foo.d.mts000066400000000000000000000000411464240215000232600ustar00rootroot00000000000000export declare const foo: string isaacs-tshy-bded619/test/fixtures/imports/lib/foo.d.ts000066400000000000000000000000411464240215000231030ustar00rootroot00000000000000export declare const foo: string isaacs-tshy-bded619/test/fixtures/imports/package.json000066400000000000000000000030431464240215000232530ustar00rootroot00000000000000{ "name": "@my/package", "type": "module", "imports": { "#xp": "xyz/package.json", "#ri": "resolve-import", "#fs": "node:fs", "#root": "./root.mjs", "#foo": { "node": { "import": [ { "types": "./lib/foo.d.mts" }, "./lib/foo-node.mjs" ], "require": [ { "types": "./lib/foo.d.cts" }, "./lib/foo-node.cjs" ] }, "require": [ { "types": "./lib/foo.d.cts" }, "./lib/foo-require.cjs" ], "import": [ { "types": "./lib/foo.d.mts" }, "./lib/foo-import.mjs" ], "types": "./lib/foo-global.d.ts", "default": "./lib/foo-browser.js" } }, "tshy": { "exports": { "./foo": { "node": { "import": [ { "types": "./lib/foo.d.mts" }, "./lib/foo-node.mjs" ], "require": [ { "types": "./lib/foo.d.cts" }, "./lib/foo-node.cjs" ] }, "require": [ { "types": "./lib/foo.d.cts" }, "./lib/foo-require.cjs" ], "import": [ { "types": "./lib/foo.d.mts" }, "./lib/foo-import.mjs" ], "types": "./lib/foo-global.d.ts", "default": "./lib/foo-browser.js" }, "./package.json": "./package.json", ".": "./src/index.ts" } } } isaacs-tshy-bded619/test/fixtures/imports/root.cjs000066400000000000000000000000001464240215000224370ustar00rootroot00000000000000isaacs-tshy-bded619/test/fixtures/imports/src/000077500000000000000000000000001464240215000215545ustar00rootroot00000000000000isaacs-tshy-bded619/test/fixtures/imports/src/g.ts000066400000000000000000000000761464240215000223550ustar00rootroot00000000000000declare var global: { foo: string } global.foo = 'global foo' isaacs-tshy-bded619/test/fixtures/imports/src/index.ts000066400000000000000000000002561464240215000232360ustar00rootroot00000000000000import { foo } from '#foo' export const test = async () => { await import('@my/package/foo').then(({ foo }) => console.log('pkg exports', foo) ) console.log(foo) } isaacs-tshy-bded619/test/fixtures/imports/tsconfig.json000066400000000000000000000007711464240215000235010ustar00rootroot00000000000000{ "compilerOptions": { "paths": { "@my/package/*": [ "./lib/*.js" ] }, "declaration": true, "declarationMap": true, "esModuleInterop": true, "forceConsistentCasingInFileNames": true, "inlineSources": true, "jsx": "react", "module": "nodenext", "moduleResolution": "nodenext", "noUncheckedIndexedAccess": true, "resolveJsonModule": true, "skipLibCheck": true, "sourceMap": true, "strict": true, "target": "es2022" } } isaacs-tshy-bded619/test/if-exist.ts000066400000000000000000000005711464240215000175220ustar00rootroot00000000000000import { readdirSync } from 'fs' import t from 'tap' import ifExist from '../src/if-exist.js' const dir = t.testdir({ a: 'a', b: 'b', }) ifExist.unlink(dir + '/x') ifExist.rename(dir + '/x', dir + '/z') t.strictSame(new Set(readdirSync(dir)), new Set(['a', 'b'])) ifExist.unlink(dir + '/a') ifExist.rename(dir + '/b', dir + '/c') t.strictSame(readdirSync(dir), ['c']) isaacs-tshy-bded619/test/index.ts000066400000000000000000000031331464240215000170760ustar00rootroot00000000000000import t from 'tap' process.env.FORCE_COLOR = '0' const mockConsole = { log: () => {}, debug: () => {}, } const logs = t.capture(mockConsole, 'log').args const debug = t.capture(mockConsole, 'debug').args let buildCalled = false await t.mockImport('../dist/esm/index.js', { '../dist/esm/console.js': mockConsole, '../dist/esm/build.js': () => (buildCalled = true), }) t.equal(buildCalled, true) t.match(debug(), [ ['building', process.cwd()], ['tshy config', Object], ['exports', Object], ]) t.strictSame(logs(), [['success!']]) t.test('print help message', async t => { t.intercept(process, 'argv', { value: [process.execPath, 'index.js', '--help'], }) let usageCalled: string | undefined = undefined await t.mockImport('../dist/esm/index.js', { '../dist/esm/usage.js': { default: (n?: string) => (usageCalled = n), }, }) t.equal(usageCalled, undefined) }) t.test('print usage and error for unknown arg', async t => { t.intercept(process, 'argv', { value: [process.execPath, 'index.js', 'xyz'], }) let usageCalled: string | undefined = undefined await t.mockImport('../dist/esm/index.js', { '../dist/esm/usage.js': { default: (n?: string) => (usageCalled = n), }, }) t.equal(usageCalled, `Unknown argument: xyz`) }) t.test('watch if --watch specified', async t => { t.intercept(process, 'argv', { value: [process.execPath, 'index.js', '--watch'], }) let watchCalled = false await t.mockImport('../dist/esm/index.js', { '../dist/esm/watch.js': { default: () => (watchCalled = true), }, }) t.equal(watchCalled, true) }) isaacs-tshy-bded619/test/package.ts000066400000000000000000000016001464240215000173570ustar00rootroot00000000000000import t from 'tap' t.test('load package successfully', async t => { const { default: pkg } = await t.mockImport( '../dist/esm/package.js', ) t.equal(pkg.name, 'tshy') t.equal(pkg.type, 'module') }) t.test('unsuccessfully fails build', async t => { const exits = t.capture(process, 'exit').args t.chdir(t.testdir()) let failed = false await t.mockImport('../dist/esm/package.js', { '../dist/esm/fail.js': () => (failed = true), }) t.strictSame(exits(), [[1]]) t.equal(failed, true) }) t.test('fail if the package.json is not an object', async t => { const exits = t.capture(process, 'exit').args t.chdir( t.testdir({ 'package.json': '[null, 1, "asdf"]', }), ) let failed = false await t.mockImport('../dist/esm/package.js', { '../dist/esm/fail.js': () => (failed = true), }) t.strictSame(exits(), [[1]]) t.equal(failed, true) }) isaacs-tshy-bded619/test/polyfills.ts000066400000000000000000000020671464240215000200110ustar00rootroot00000000000000import { inspect } from 'node:util' import t from 'tap' const polyfills = await t.mockImport('../dist/esm/polyfills.js', { '../dist/esm/package.js': { default: { tshy: { esmDialects: ['deno', 'none-found'], commonjsDialects: ['blah'], }, }, }, '../dist/esm/sources.js': new Set([ './src/foo.ts', './src/foo-cjs.cts', './src/foo-blah.cts', './src/foo-deno.mts', './src/no-poly.ts', './src/no-poly.cts', './src/no-poly.mts', './src/jsx.tsx', './src/jsx-cjs.cts', './src/poly-without-target-cjs.cts', ]), }) t.match( polyfills.default, new Map([ [ 'cjs', { map: new Map([ ['./src/foo-cjs.cts', './src/foo.ts'], ['./src/jsx-cjs.cts', './src/jsx.tsx'], ]), }, ], [ 'deno', { map: new Map([['./src/foo-deno.mts', './src/foo.ts']]), }, ], [ 'blah', { map: new Map([['./src/foo-blah.cts', './src/foo.ts']]), }, ], ]), ) t.matchSnapshot(inspect(polyfills.default)) isaacs-tshy-bded619/test/prevent-verbatim-module-syntax.ts000066400000000000000000000014401464240215000240670ustar00rootroot00000000000000import chalk from 'chalk' import t from 'tap' import readTypescriptConfig from '../src/read-typescript-config.js' import preventVerbatimModuleSyntax from '../src/prevent-verbatim-module-syntax.js' chalk.level = 3 const exits = t.capture(process, 'exit').args const errs = t.capture(console, 'error').args const logs = t.capture(console, 'log').args t.test('not set, no worries', t => { preventVerbatimModuleSyntax() t.strictSame(exits(), []) t.strictSame(errs(), []) t.strictSame(logs(), []) t.end() }) t.test('is set, many worries', t => { readTypescriptConfig().options.verbatimModuleSyntax = true preventVerbatimModuleSyntax() t.strictSame(exits(), [[1]]) t.matchSnapshot( errs() .map(s => s.join('')) .join('\n'), ) t.strictSame(logs(), []) t.end() }) isaacs-tshy-bded619/test/read-typescript-config.ts000066400000000000000000000002611464240215000223500ustar00rootroot00000000000000import t from 'tap' import readTypescriptConfig from '../src/read-typescript-config.js' const config = readTypescriptConfig() t.equal(config, readTypescriptConfig(), 'cached') isaacs-tshy-bded619/test/resolve-export.ts000066400000000000000000000031651464240215000207720ustar00rootroot00000000000000import t from 'tap' import { resolveExport } from '../src/resolve-export.js' type C = 'import' | 'require' | 'types' const cases: [ exp: any, m: C | C[], expect: string | null | undefined, ][] = [ [null, 'import', null], [null, 'require', null], [1, 'import', undefined], [1, 'require', undefined], ['foo.xyz', 'import', 'foo.xyz'], ['foo.xyz', 'require', 'foo.xyz'], [{ require: 'x.js' }, 'require', 'x.js'], [{ require: 'x.js' }, 'import', undefined], [[{ require: 'x.js' }], 'require', 'x.js'], [[{ require: 'x.js' }], 'import', undefined], [{ import: 'x.js' }, 'import', 'x.js'], [{ import: 'x.js' }, 'require', undefined], [[{ import: 'x.js' }], 'import', 'x.js'], [[{ import: 'x.js' }], 'require', undefined], [{ node: 'x.js' }, 'import', 'x.js'], [{ node: 'x.js' }, 'require', 'x.js'], [{ default: 'x.js' }, 'import', 'x.js'], [{ default: 'x.js' }, 'require', 'x.js'], [[{ require: 'r.js' }, 'd.js'], 'require', 'r.js'], [[{ require: 'r.js' }, 'd.js'], 'import', 'd.js'], [ [{ require: [{ types: 'r.d.ts' }, 'r.js'] }, 'd.js'], 'import', 'd.js', ], [ [{ require: { types: 'r.d.ts', default: 'r.js' } }, 'd.js'], ['require', 'types'], 'r.d.ts', ], [ [{ require: { default: 'r.js', types: 'r.d.ts' } }, 'd.js'], ['require', 'types'], 'r.js', ], [ [{ require: { default: null, types: 'r.d.ts' } }, 'd.js'], ['require', 'types'], null, ], ] t.plan(cases.length) for (const [exp, m, expect] of cases) { const cond = Array.isArray(m) ? m : [m] t.equal( resolveExport(exp, cond), expect, `${m} ${JSON.stringify(exp)}`, ) } isaacs-tshy-bded619/test/self-dep.ts000066400000000000000000000120031464240215000174620ustar00rootroot00000000000000import { posix as path, resolve } from 'node:path' import t from 'tap' import { Package } from '../src/types.js' let mkdirpMade: undefined | string = undefined const mkdirp = { mkdirpSync: () => mkdirpMade, } const mkdirpCalls = t.capture( mkdirp, 'mkdirpSync', mkdirp.mkdirpSync, ).args import * as FS from 'node:fs' let symlinkThrow: Error | undefined = undefined let symlinkThrowAgain: Error | undefined = undefined const fs = { symlinkSync: () => { if (symlinkThrow) { try { throw symlinkThrow } finally { symlinkThrow = symlinkThrowAgain symlinkThrowAgain = undefined } } }, readlinkSync: FS.readlinkSync, } const symlinkCalls = t.capture(fs, 'symlinkSync', fs.symlinkSync).args const rimraf = { rimrafSync: () => {}, } const rimrafCalls = t.capture( rimraf, 'rimrafSync', rimraf.rimrafSync, ).args const { link, unlink } = (await t.mockImport( '../dist/esm/self-link.js', { mkdirp, fs, rimraf, path }, )) as typeof import('../dist/esm/self-link.js') t.test('no pkg name, nothing to do', t => { link({} as Package, 'some/path') unlink({} as Package, 'some/path') t.strictSame(symlinkCalls(), [], 'no symlinks') t.strictSame(rimrafCalls(), [], 'no rimrafs') t.strictSame(mkdirpCalls(), [], 'no mkdirps') t.end() }) t.test('no selfLink, nothing to do', t => { link( { name: 'name', tshy: { selfLink: false } } as Package, 'some/path', ) unlink( { name: 'name', tshy: { selfLink: false } } as Package, 'some/path', ) t.strictSame(symlinkCalls(), [], 'no symlinks') t.strictSame(rimrafCalls(), [], 'no rimrafs') t.strictSame(mkdirpCalls(), [], 'no mkdirps') t.end() }) t.test('try one more time if it fails', t => { symlinkThrow = new Error('eexist') link({ name: 'name', version: '1.2.3' }, 'some/path') t.matchSnapshot(symlinkCalls(), 'symlinks') t.matchSnapshot(rimrafCalls(), 'rimrafs') t.matchSnapshot(mkdirpCalls(), 'mkdirps') t.end() }) t.test('throw both times, but accept if best-effort', t => { symlinkThrow = new Error('EPERM') symlinkThrowAgain = new Error('EPERM') link({ name: 'name', version: '1.2.3' }, 'some/path') t.matchSnapshot(symlinkCalls(), 'symlinks') t.matchSnapshot(rimrafCalls(), 'rimrafs') t.matchSnapshot(mkdirpCalls(), 'mkdirps') t.end() }) t.test('throw both times, but self-link is required', t => { symlinkThrow = new Error('EPERM') symlinkThrowAgain = new Error('EPERM') t.throws(() => link( { name: 'name', version: '1.2.3', tshy: { selfLink: true } }, 'some/path', ), ) t.matchSnapshot(symlinkCalls(), 'symlinks') t.matchSnapshot(rimrafCalls(), 'rimrafs') t.matchSnapshot(mkdirpCalls(), 'mkdirps') t.end() }) t.test('link, but no dirs made', t => { link({ name: 'name', version: '1.2.3' }, 'some/path') unlink({ name: 'name', version: '1.2.3' }, 'some/path') t.matchSnapshot(symlinkCalls(), 'symlinks') t.matchSnapshot(rimrafCalls(), 'rimrafs') t.matchSnapshot(mkdirpCalls(), 'mkdirps') t.end() }) t.test('made dir, clean up', t => { mkdirpMade = 'some' link({ name: 'name', version: '1.2.3' }, 'some/path') unlink({ name: 'name', version: '1.2.3' }, 'some/path') t.matchSnapshot(symlinkCalls(), 'symlinks') t.matchSnapshot(rimrafCalls(), 'rimrafs') t.matchSnapshot(mkdirpCalls(), 'mkdirps') t.end() }) t.test('already in node_modules, do not create link', t => { const readlinkCalls = t.capture( fs, 'readlinkSync', fs.readlinkSync, ).args const dir = t.testdir({ node_modules: { installed: { src: {} }, linked: t.fixture('symlink', '../packages/linked'), '@scope': { linked: t.fixture('symlink', '../../packages/scopelinked'), installed: { src: {} }, }, }, packages: { linked: { src: {} }, scopelinked: { src: {} }, }, }) const cases: [string, string][] = [ ['installed', 'node_modules/installed'], ['@scope/installed', 'node_modules/@scope/installed'], ['linked', 'node_modules/linked'], ['@scope/linked', 'node_modules/@scope/linked'], ['linked', 'packages/linked'], ['@scope/linked', 'packages/scopelinked'], ] t.plan(cases.length) for (const [name, d] of cases) { t.test(d, async t => { // need a separate import for each test, because this gets cached // to save extra readlink and walkUp calls. const { link, unlink } = (await t.mockImport( '../dist/esm/self-link.js', { mkdirp, fs, rimraf }, )) as typeof import('../dist/esm/self-link.js') t.chdir(resolve(dir, d)) link({ name, version: '1.2.3' }, 'src') unlink({ name, version: '1.2.3' }, 'src') const rl = readlinkCalls() if (name.endsWith('linked')) { t.strictSame( rl.pop(), [resolve(dir, 'node_modules', name)], 'found link', ) } else { t.strictSame(rl, [], 'did not need to check for links') } t.strictSame(symlinkCalls(), []) t.strictSame(mkdirpCalls(), []) t.strictSame(rimrafCalls(), []) t.end() }) } }) isaacs-tshy-bded619/test/set-folder-dialect.ts000066400000000000000000000011241464240215000214340ustar00rootroot00000000000000import { readFileSync } from 'fs' import { resolve } from 'path' import t from 'tap' import setFolderDialect from '../src/set-folder-dialect.js' const dir = t.testdir() const expect = (n?: string) => { if (!n) { t.throws(() => readFileSync(resolve(dir, 'package.json'), 'utf8')) } else { const expect = JSON.stringify({ type: n }, null, 2) + '\n' const actual = readFileSync(resolve(dir, 'package.json'), 'utf8') t.equal(actual, expect) } } setFolderDialect(dir, 'esm') expect('module') setFolderDialect(dir) expect() setFolderDialect(dir, 'commonjs') expect('commonjs') isaacs-tshy-bded619/test/sources.ts000066400000000000000000000005051464240215000174520ustar00rootroot00000000000000import t from 'tap' t.chdir( t.testdir({ src: { dir: { 'file.ts': '', link: t.fixture('symlink', './file.ts'), }, 'file.ts': '', }, }), ) const { default: sources } = await import('../dist/esm/sources.js') t.strictSame(sources, new Set(['./src/dir/file.ts', './src/file.ts'])) isaacs-tshy-bded619/test/tsconfig.ts000066400000000000000000000042301464240215000176020ustar00rootroot00000000000000import { readFileSync, renameSync, statSync, unlinkSync, writeFileSync, } from 'fs' import { resolve } from 'path' import t from 'tap' const dir = t.testdir({ 'package.json': JSON.stringify({ tshy: { exclude: ['./src/**/*.test.ts'], esmDialects: ['deno'], commonjsDialects: ['webpack'], }, }), src: { 'index.ts': '', 'index-cjs.cts': '', 'index-deno.mts': '', 'index-webpack.mts': '', }, }) t.chdir(dir) t.test('with tsconfig.json file', async t => { await import('../dist/esm/tsconfig.js') for (const f of [ 'tsconfig.json', '.tshy/build.json', '.tshy/commonjs.json', '.tshy/esm.json', ]) { t.matchSnapshot( JSON.parse(readFileSync(resolve(dir, f), 'utf8')), f + ' generate everything', ) } writeFileSync( resolve(dir, 'tsconfig.json'), JSON.stringify({ compilerOptions: { yolo: '🍑', this_data: 'is preserved', }, }), ) unlinkSync(resolve(dir, '.tshy/build.json')) writeFileSync( resolve(dir, '.tshy/esm.json'), 'not even json, this gets clobbered', ) await t.mockImport('../dist/esm/tsconfig.js') for (const f of [ 'tsconfig.json', '.tshy/build.json', '.tshy/commonjs.json', '.tshy/esm.json', '.tshy/deno.json', '.tshy/webpack.json', ]) { t.matchSnapshot( JSON.parse(readFileSync(resolve(dir, f), 'utf8')), f, ) } }) t.test('with custom project tsconfig name', async t => { renameSync( resolve(dir, 'tsconfig.json'), resolve(dir, 'custom.json'), ) writeFileSync( resolve(dir, 'package.json'), JSON.stringify({ tshy: { project: 'custom.json', esmDialects: ['deno'], commonjsDialects: ['webpack'], }, }), ) await t.mockImport('../dist/esm/tsconfig.js') t.throws(() => statSync(resolve(dir, 'tsconfig.json')), { code: 'ENOENT', }) for (const f of [ 'custom.json', '.tshy/build.json', '.tshy/commonjs.json', '.tshy/esm.json', '.tshy/deno.json', '.tshy/webpack.json', ]) { t.matchSnapshot( JSON.parse(readFileSync(resolve(dir, f), 'utf8')), f, ) } }) isaacs-tshy-bded619/test/types.ts000066400000000000000000000002251464240215000171320ustar00rootroot00000000000000import t from 'tap' // just here for the coverage, to verify that nothing is there await t.mockImport('../dist/esm/types.js') t.pass('this is fine') isaacs-tshy-bded619/test/unbuilt-imports.ts000066400000000000000000000032171464240215000211470ustar00rootroot00000000000000import { readFileSync, writeFileSync } from 'node:fs' import { createRequire } from 'node:module' import { fileURLToPath } from 'node:url' import { rimrafSync } from 'rimraf' import t from 'tap' t.test('imports linking', async t => { const require = createRequire(import.meta.url) // make sure one of them doesn't already have a scripts block for (const i of [ 'imports', 'imports-with-star', 'basic', 'basic-imports-only-deps', 'basic-custom-project', ]) { t.test(i, async t => { // keep the pjs unmodified const f = fileURLToPath( new URL(`./fixtures/${i}/package.json`, import.meta.url), ) const dist = fileURLToPath( new URL(`./fixtures/${i}/dist`, import.meta.url), ) const pj = JSON.parse(readFileSync(f, 'utf8')) t.teardown(() => { writeFileSync(f, JSON.stringify(pj, null, 2) + '\n') rimrafSync(dist) }) t.chdir( fileURLToPath(new URL('./fixtures/' + i, import.meta.url)), ) await t.mockImport('../dist/esm/index.js') const logs = t.capture(console, 'log').args const { test: testESM } = await import( `./fixtures/${i}/dist/esm/index.js` ) const { test: testCJS } = require( `./fixtures/${i}/dist/commonjs/index.js`, ) await testESM() t.strictSame( logs(), i.startsWith('basic') ? [['hello']] : [['pkg exports', 'node esm'], ['node esm']], ) await testCJS() t.strictSame( logs(), i.startsWith('basic') ? [['hello']] : [['pkg exports', 'node esm'], ['node cjs']], ) }) } }) isaacs-tshy-bded619/test/usage.ts000066400000000000000000000030521464240215000170730ustar00rootroot00000000000000import t from 'tap' import fail from '../dist/esm/fail.js' const { default: link } = (await t.mockImport( '../dist/esm/usage.js', { chalk: { default: { level: 3, red: { bold: (s: string) => s } } }, '../dist/esm/fail.js': fail, }, )) as typeof import('../dist/esm/usage.js') const { default: noLink } = (await t.mockImport( '../dist/esm/usage.js', { chalk: { default: { level: 0, red: { bold: (s: string) => s } } }, '../dist/esm/fail.js': fail, }, )) as typeof import('../dist/esm/usage.js') const exits = t.capture(process, 'exit').args const errs = t.capture(console, 'error').args const logs = t.capture(console, 'log').args t.test('no error', async t => { t.test('with link', async t => { link() t.strictSame(errs(), []) t.strictSame(exits(), [[0]]) t.matchSnapshot( logs() .map(s => s.join('')) .join('\n'), ) }) t.test('no link', async t => { noLink() t.strictSame(errs(), []) t.strictSame(exits(), [[0]]) t.matchSnapshot( logs() .map(s => s.join('')) .join('\n'), ) }) }) t.test('with error', async t => { t.test('with link', async t => { link('error string') t.strictSame(logs(), []) t.strictSame(exits(), [[1]]) t.matchSnapshot( errs() .map(s => s.join('')) .join('\n'), ) }) t.test('no link', async t => { noLink('error string') t.strictSame(logs(), []) t.strictSame(exits(), [[1]]) t.matchSnapshot( errs() .map(s => s.join('')) .join('\n'), ) }) }) isaacs-tshy-bded619/test/valid-dialects.ts000066400000000000000000000012141464240215000206520ustar00rootroot00000000000000import t from 'tap' const exits = t.capture(process, 'exit', () => false).args let failed = false const { default: validDialects } = (await t.mockImport( '../dist/esm/valid-dialects.js', { '../dist/esm/fail.js': () => (failed = true), }, )) as typeof import('../dist/esm/valid-dialects.js') t.equal(validDialects(['esm', 'commonjs']), true) t.equal(validDialects(['commonjs']), true) t.equal(validDialects(['esm']), true) t.equal(validDialects(false), false) t.strictSame(exits(), [[1]]) t.equal(failed, true) failed = false t.equal(validDialects(['esm', 'blah']), false) t.strictSame(exits(), [[1]]) t.equal(failed, true) failed = false isaacs-tshy-bded619/test/valid-exclude.ts000066400000000000000000000011141464240215000205120ustar00rootroot00000000000000import t from 'tap' const exits = t.capture(process, 'exit', () => false).args const mf = t.captureFn(() => {}) const fails = mf.args const { default: validExclude } = (await t.mockImport( '../src/valid-exclude.js', { '../src/fail.js': mf, }, )) as typeof import('../src/valid-exclude.js') t.equal(validExclude(['a', 'b']), true) t.equal(validExclude(['']), true) t.equal(validExclude([]), false) const f = fails() t.matchOnly(f, [[String]]) t.matchOnly(exits(), [[1]]) t.equal(validExclude(false), false) t.equal(validExclude(true), false) t.equal(validExclude(123), false) isaacs-tshy-bded619/test/valid-exports.ts000066400000000000000000000021761464240215000205760ustar00rootroot00000000000000import t from 'tap' const exits = t.capture(process, 'exit', () => false).args let failed: string | undefined = undefined const { default: validExports } = (await t.mockImport( '../dist/esm/valid-exports.js', { '../dist/esm/fail.js': (m: string) => (failed = m), }, )) as typeof import('../dist/esm/valid-exports.js') t.beforeEach(() => (failed = undefined)) const cases: [any, boolean][] = [ [false, false], [null, false], [[], false], [{ x: './src/x.ts' }, false], [{ './b': { require: './src/blah.ts' } }, false], [{ './b': './src/blah.ts' }, true], [{ './b': 'src/b.ts' }, true], [{ './B': 8 }, false], [{ './b': { require: './blah.js' } }, true], ] t.plan(cases.length) for (const [exp, ok] of cases) { t.test(JSON.stringify(exp) + ' ' + ok, async t => { const v = validExports(exp) if (!ok) { t.equal(v, false) t.matchSnapshot(failed, 'message') t.matchSnapshot(JSON.stringify(exits()), 'exits') } else { t.equal(v, true, failed || 'should be valid') t.equal(failed, undefined) t.strictSame(exits(), []) t.matchSnapshot(exp, 'export result') } }) } isaacs-tshy-bded619/test/valid-external-export.ts000066400000000000000000000007521464240215000222310ustar00rootroot00000000000000import t from 'tap' import validExternalExport from '../src/valid-external-export.js' const cases: [any, boolean][] = [ [{}, true], [[], true], [null, true], [undefined, true], [{ require: './src/x.js', import: null }, false], [{ import: './src/x.js', require: null }, false], [{ import: './blah/x.js', require: null }, true], ] t.plan(cases.length) for (const [exp, ok] of cases) { t.equal( validExternalExport(exp), ok, JSON.stringify(exp) + ' ' + ok, ) } isaacs-tshy-bded619/test/valid-extra-dialects.ts000066400000000000000000000034471464240215000220050ustar00rootroot00000000000000import t from 'tap' import { TshyConfig } from '../src/types.js' const mockFail = { default: (..._: any[]) => {}, } const fails = t.capture(mockFail, 'default').args const exits = t.capture(process, 'exit').args const { default: validExtraDialects } = (await t.mockImport( '../src/valid-extra-dialects.js', { '../src/fail.js': mockFail, }, )) as typeof import('../src/valid-extra-dialects.js') const cases: [config: TshyConfig, ok: boolean][] = [ [{}, true], [{ commonjsDialects: ['blah'] }, true], [{ esmDialects: ['blah'] }, true], [{ esmDialects: ['blah'], commonjsDialects: ['blah'] }, false], [{ esmDialects: ['blah'], commonjsDialects: ['bloo'] }, true], [{ sourceDialects: ['blah'], commonjsDialects: ['blah'] }, false], [{ sourceDialects: ['blah'], commonjsDialects: ['bloo'] }, true], [{ esmDialects: ['blah'], sourceDialects: ['blah'] }, false], [{ esmDialects: ['blah'], sourceDialects: ['bloo'] }, true], [{ esmDialects: ['default'] }, false], [{ esmDialects: ['import'] }, false], [{ esmDialects: ['require'] }, false], [{ esmDialects: ['node'] }, false], [{ esmDialects: ['commonjs'] }, false], [{ esmDialects: ['cjs'] }, false], [{ esmDialects: ['source'] }, false], [{ sourceDialects: ['source'] }, false], //@ts-expect-error [{ esmDialects: [123] }, false], //@ts-expect-error [{ commonjsDialects: [123] }, false], ] for (const [config, ok] of cases) { t.test(JSON.stringify(config), t => { const valid = validExtraDialects(config) if (ok) { t.equal(valid, true, 'is valid') t.strictSame(fails(), [], 'no fails') t.strictSame(exits(), [], 'no exits') } else { t.not(valid, true, 'not valid') t.matchSnapshot(fails(), 'failure message') t.strictSame(exits(), [[1]], 'exit in error') } t.end() }) } isaacs-tshy-bded619/test/valid-imports.ts000066400000000000000000000024611464240215000205640ustar00rootroot00000000000000import t from 'tap' import { Package } from '../src/types.js' let failed: undefined | string = undefined const { default: validImports } = (await t.mockImport( '../src/valid-imports.js', { '../src/fail.js': { default: (m: string) => (failed = m), }, }, )) as typeof import('../src/valid-imports.js') const exits = t.capture(process, 'exit').args const cases: [pkg: Omit, ok: boolean][] = [ [{}, true], [{ imports: 'asdf' }, false], [{ imports: [] }, false], [{ imports: { '#x': {} } }, true], [{ imports: { '#x': 'y' } }, true], [{ imports: { x: 'y' } }, false], [{ imports: { '#': 'y' } }, false], [{ imports: { '#x': './src/x' } }, true], [{ imports: { '#x': ['./src/x'] } }, false], ] for (const [pkg, ok] of cases) { t.test(JSON.stringify({ pkg }), t => { const actual = validImports(pkg as Package) if (!ok) { t.notOk(actual, 'should not be ok') t.matchSnapshot(failed, 'failure message') t.type(failed, 'string', 'got a failure message') t.strictSame(exits(), [[1]], 'exited in error') } else { t.equal(actual, true, 'should be ok') t.equal(failed, undefined, 'no failure message') t.strictSame(exits(), [], 'no error exit') } failed = undefined t.end() }) } isaacs-tshy-bded619/test/watch.ts000066400000000000000000000057371464240215000171110ustar00rootroot00000000000000import chalk from 'chalk' import { SpawnOptions } from 'child_process' import { WatchOptions } from 'chokidar' import EventEmitter from 'events' import t from 'tap' import { bin, options, rootPJ, src, srcNM, srcPJ, targets, } from '../dist/esm/watch.js' t.cleanSnapshot = s => s.replace(/\\/g, '/') t.matchSnapshot({ options, srcPJ, srcNM, src, rootPJ, targets, bin }) if (typeof options.ignored !== 'function') { throw new Error('expect options.ignored to be a function') } t.equal(options.ignored('./src/package.json'), true) t.equal(options.ignored('./src/package.json'), true) t.equal(options.ignored('./src/node_modules/xyz'), true) t.equal(options.ignored('./src/node_modules'), true) t.equal(options.ignored('./package.json'), false) t.equal(options.ignored('./src/x.ts'), false) const logs = t.capture(console, 'log').args const errs = t.capture(console, 'error').args const mockChalk = { green: chalk.green, cyan: { dim: chalk.cyan.dim }, } type SpawnResult = { code: number | null signal: NodeJS.Signals | null } const spawnOK: SpawnResult = { code: 0, signal: null } const spawnExitCode: SpawnResult = { code: 1, signal: null } let spawnResult: SpawnResult = spawnOK const mockSpawn = ( cmd: string, args: string[], options: SpawnOptions, ) => { t.equal(cmd, process.execPath) t.strictSame(args, [bin]) t.strictSame(options, { stdio: 'inherit' }) const child = new EventEmitter() setTimeout(() => child.emit('close', spawnResult.code, spawnResult.signal), ) return child } const mockWatcher = new EventEmitter() const mockChokidar = { watch: (watchTargets: string[], watchOptions: WatchOptions) => { t.strictSame(watchTargets, targets) t.match(watchOptions, options) return mockWatcher }, } t.test('build whenever changes happen', async t => { const { default: watch } = (await t.mockImport( '../dist/esm/watch.js', { chalk: mockChalk, child_process: { spawn: mockSpawn, }, chokidar: mockChokidar, }, )) as typeof import('../dist/esm/watch.js') watch() // immediately trigger changes to the pj and other stuff mockWatcher.emit('all', 'change', srcPJ) mockWatcher.emit('all', 'change', rootPJ) mockWatcher.emit('all', 'change', 'src/x.ts') // that last one should trigger a rebuild await new Promise(r => setTimeout(r, 100)) t.matchSnapshot(logs()) t.matchSnapshot(errs()) }) t.test('build failure', async t => { spawnResult = spawnExitCode const { default: watch } = (await t.mockImport( '../dist/esm/watch.js', { chalk: mockChalk, child_process: { spawn: mockSpawn, }, chokidar: mockChokidar, }, )) as typeof import('../dist/esm/watch.js') watch() await new Promise(r => setTimeout(r, 100)) t.matchSnapshot(logs()) t.matchSnapshot(errs()) spawnResult = spawnOK mockWatcher.emit('all', 'change', 'src/x.ts') await new Promise(r => setTimeout(r, 100)) t.matchSnapshot(logs()) t.matchSnapshot(errs()) }) isaacs-tshy-bded619/test/which-tsc.ts000066400000000000000000000002731464240215000176620ustar00rootroot00000000000000import t from 'tap' import tsc from '../src/which-tsc.js' import { accessSync, constants } from 'node:fs' t.doesNotThrow( () => accessSync(tsc, constants.R_OK), 'tsc is readable', ) isaacs-tshy-bded619/test/write-package.ts000066400000000000000000000007631464240215000205200ustar00rootroot00000000000000import { readFileSync } from 'fs' import { resolve } from 'path' import t from 'tap' t.chdir(t.testdir({})) const { default: writePackage } = (await t.mockImport( '../dist/esm/write-package.js', { '../dist/esm/package.js': { default: { name: 'some package', }, }, }, )) as typeof import('../dist/esm/write-package.js') writePackage() t.strictSame( JSON.parse( readFileSync(resolve(t.testdirName, 'package.json'), 'utf8'), ), { name: 'some package' }, ) isaacs-tshy-bded619/tsconfig.json000066400000000000000000000006671464240215000171600ustar00rootroot00000000000000{ "compilerOptions": { "jsx": "react", "declaration": true, "declarationMap": true, "inlineSources": true, "esModuleInterop": true, "forceConsistentCasingInFileNames": true, "moduleResolution": "nodenext", "resolveJsonModule": true, "skipLibCheck": true, "sourceMap": true, "strict": true, "target": "es2022", "module": "nodenext", "composite": true, "incremental": true } } isaacs-tshy-bded619/typedoc.json000066400000000000000000000003271464240215000170040ustar00rootroot00000000000000{ "tsconfig": "./.tshy/esm.json", "entryPoints": ["./src/**/*.+(ts|tsx|mts|cts)"], "navigationLinks": { "GitHub": "https://github.com/isaacs/tshy", "isaacs projects": "https://isaacs.github.io/" } }