diff --git a/.changeset/tasty-onions-jog.md b/.changeset/tasty-onions-jog.md new file mode 100644 index 00000000..1b761a75 --- /dev/null +++ b/.changeset/tasty-onions-jog.md @@ -0,0 +1,8 @@ +--- +"@abstract-money/bundle-require": patch +"@abstract-money/cli": patch +"@abstract-money/cosmwasm-utils": patch +"@abstract-money/react": patch +--- + +Forked `bundle-require` package with the fixed peer dependency. diff --git a/package.json b/package.json index 6773fcf1..e5944410 100644 --- a/package.json +++ b/package.json @@ -45,10 +45,5 @@ "simple-git-hooks": { "pre-commit": "pnpm format && pnpm lint:fix && git add -u" }, - "packageManager": "pnpm@8.3.1", - "pnpm": { - "overrides": { - "esbuild": "0.15.13" - } - } + "packageManager": "pnpm@8.3.1" } diff --git a/packages/bundle-require/.gitignore b/packages/bundle-require/.gitignore new file mode 100644 index 00000000..73b5924b --- /dev/null +++ b/packages/bundle-require/.gitignore @@ -0,0 +1,4 @@ +/node_modules +.DS_Store +dist +*.log diff --git a/packages/bundle-require/LICENSE b/packages/bundle-require/LICENSE new file mode 100644 index 00000000..3e7275a4 --- /dev/null +++ b/packages/bundle-require/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright © 2021 EGOIST (https://github.com/sponsors/egoist) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE diff --git a/packages/bundle-require/README.md b/packages/bundle-require/README.md new file mode 100644 index 00000000..dfd2ff7d --- /dev/null +++ b/packages/bundle-require/README.md @@ -0,0 +1,55 @@ +# @abstract-money/bundle-require + +[![npm version](https://badgen.net/npm/v/@abstract-money/bundle-require)](https://npm.im/@abstract-money/bundle-require) [![npm downloads](https://badgen.net/npm/dm/@abstract-money/bundle-require)](https://npm.im/@abstract-money/bundle-require) [![jsDocs.io](https://img.shields.io/badge/jsDocs.io-reference-blue)](https://www.jsdocs.io/package/bundle-require) + +## Disclaimer + +This package is a fork of [egoist/bundle-require](https://github.com/egoist/bundle-require) version 3.1.2 with the corrected `esbuild` peer dependency as one breaks when used as peer in the projects that depend on the `esbuild<0.17.0`. + +## Use Case + +Projects like [Vite](https://vitejs.dev) need to load config files provided by the user, but you can't do it with just `require()` because it's not necessarily a CommonJS module, it could also be a `.mjs` or even be written in TypeScript, and that's where the `bundle-require` package comes in, it loads the config file regardless what module format it is. + +## How it works + +- Bundle your file with esbuild, `node_modules` are excluded because it's problematic to try to bundle it + - `__filename`, `__dirname` and `import.meta.url` are replaced with source file's value instead of the one from the temporary output file +- Output file in `esm` format if possible (for `.ts`, `.js` input files) +- Load output file with `import()` if possible +- Return the loaded module and its dependencies (imported files) + +## Install + +```bash +npm i @abstract-money/bundle-require esbuild +``` + +`esbuild` is a peer dependency. + +## Usage + +```ts +import { bundleRequire } from '@abstract-money/bundle-require' + +const { mod } = await bundleRequire({ + filepath: './project/vite.config.ts', +}) +``` + +## API + +https://www.jsdocs.io/package/@abstract-money/bundle-require + +## Projects Using @abstract-money/bundle-require + +Projects that use **@abstract-money/bundle-require**: + +- [VuePress](https://github.com/vuejs/vuepress): :memo: Minimalistic Vue-powered static site generator. + +## Sponsors + +[![sponsors](https://sponsors-images.egoist.sh/sponsors.svg)](https://github.com/sponsors/egoist) + +## License + +MIT © [EGOIST](https://github.com/sponsors/egoist) diff --git a/packages/bundle-require/package.json b/packages/bundle-require/package.json new file mode 100644 index 00000000..10471f0f --- /dev/null +++ b/packages/bundle-require/package.json @@ -0,0 +1,54 @@ +{ + "name": "@abstract-money/bundle-require", + "version": "0.0.0", + "license": "MIT", + "repository": { + "type": "git", + "url": "git+https://github.com/AbstractSDK/abstract.js.git", + "directory": "packages/bundle-require" + }, + "bugs": { + "url": "https://github.com/AbstractSDK/abstract.js/issues" + }, + "description": "bundle and require a file", + "publishConfig": { + "access": "public" + }, + "files": [ + "/dist" + ], + "type": "module", + "main": "./dist/index.js", + "exports": { + ".": { + "types": "./dist/index.d.ts", + "default": "./dist/index.js" + }, + "./package.json": "./package.json" + }, + "types": "./dist/index.d.ts", + "scripts": { + "build": "tsup", + "clean": "rimraf dist", + "test": "npm run build && vitest run", + "prepublishOnly": "npm run build" + }, + "devDependencies": { + "@egoist/prettier-config": "1.0.0", + "@types/node": "16.11.21", + "esbuild": "0.13.15", + "prettier": "2.5.1", + "rimraf": "^3.0.0", + "typescript": "4.5.5", + "vitest": "0.2.5" + }, + "dependencies": { + "load-tsconfig": "^0.2.0" + }, + "peerDependencies": { + "esbuild": ">=0.13.x <= 0.16.x" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + } +} diff --git a/packages/bundle-require/src/index.ts b/packages/bundle-require/src/index.ts new file mode 100644 index 00000000..70f9f362 --- /dev/null +++ b/packages/bundle-require/src/index.ts @@ -0,0 +1,264 @@ +import fs from 'fs' +import path from 'path' +import { pathToFileURL } from 'url' +import { + BuildFailure, + BuildOptions, + BuildResult, + Loader, + Plugin as EsbuildPlugin, + build, +} from 'esbuild' +import { loadTsConfig } from 'load-tsconfig' +import { dynamicImport, getRandomId, guessFormat } from './utils' + +const DIRNAME_VAR_NAME = '__injected_dirname__' +const FILENAME_VAR_NAME = '__injected_filename__' +const IMPORT_META_URL_VAR_NAME = '__injected_import_meta_url__' + +export const JS_EXT_RE = /\.(mjs|cjs|ts|js|tsx|jsx)$/ + +function inferLoader(ext: string): Loader { + if (ext === '.mjs' || ext === '.cjs') return 'js' + return ext.slice(1) as Loader +} + +export { dynamicImport } + +export type RequireFunction = ( + outfile: string, + ctx: { format: 'cjs' | 'esm' }, +) => any + +export type GetOutputFile = (filepath: string, format: 'esm' | 'cjs') => string + +export interface Options { + cwd?: string + /** + * The filepath to bundle and require + */ + filepath: string + /** + * The `require` function that is used to load the output file + * Default to the global `require` function + * This function can be asynchronous, i.e. returns a Promise + */ + require?: RequireFunction + /** + * esbuild options + */ + esbuildOptions?: BuildOptions + /** + * Get the path to the output file + * By default we simply replace the extension with `.bundled_{randomId}.js` + */ + getOutputFile?: GetOutputFile + /** + * Enable watching and call the callback after each rebuild + */ + onRebuild?: (ctx: { + err?: BuildFailure + mod?: any + dependencies?: string[] + }) => void + + /** External packages */ + external?: (string | RegExp)[] + + /** A custom tsconfig path to read `paths` option */ + tsconfig?: string + + /** + * Preserve compiled temporary file for debugging + * Default to `process.env.BUNDLE_REQUIRE_PRESERVE` + */ + preserveTemporaryFile?: boolean + + /** + * Provide bundle format explicitly + * to skip the default format inference + */ + format?: 'cjs' | 'esm' +} + +// Use a random path to avoid import cache +const defaultGetOutputFile: GetOutputFile = (filepath, format) => + filepath.replace( + JS_EXT_RE, + `.bundled_${getRandomId()}.${format === 'esm' ? 'mjs' : 'cjs'}`, + ) + +export { loadTsConfig } + +export const tsconfigPathsToRegExp = (paths: Record) => { + return Object.keys(paths || {}).map((key) => { + return new RegExp(`^${key.replace(/\*/, '.*')}$`) + }) +} + +export const match = (id: string, patterns?: (string | RegExp)[]) => { + if (!patterns) return false + return patterns.some((p) => { + if (p instanceof RegExp) { + return p.test(id) + } + return id === p || id.startsWith(`${p}/`) + }) +} + +/** + * An esbuild plugin to mark node_modules as external + */ +export const externalPlugin = ({ + external, + notExternal, +}: { + external?: (string | RegExp)[] + notExternal?: (string | RegExp)[] +} = {}): EsbuildPlugin => { + return { + name: 'bundle-require:external', + setup(ctx) { + ctx.onResolve({ filter: /.*/ }, async (args) => { + if (args.path[0] === '.' || path.isAbsolute(args.path)) { + // Fallback to default + return + } + + if (match(args.path, external)) { + return { + external: true, + } + } + + if (match(args.path, notExternal)) { + // Should be resolved by esbuild + return + } + + // Most like importing from node_modules, mark external + return { + external: true, + } + }) + }, + } +} + +export const injectFileScopePlugin = (): EsbuildPlugin => { + return { + name: 'bundle-require:inject-file-scope', + setup(ctx) { + ctx.initialOptions.define = { + ...ctx.initialOptions.define, + __dirname: DIRNAME_VAR_NAME, + __filename: FILENAME_VAR_NAME, + 'import.meta.url': IMPORT_META_URL_VAR_NAME, + } + + ctx.onLoad({ filter: JS_EXT_RE }, async (args) => { + const contents = await fs.promises.readFile(args.path, 'utf-8') + const injectLines = [ + `const ${FILENAME_VAR_NAME} = ${JSON.stringify(args.path)};`, + `const ${DIRNAME_VAR_NAME} = ${JSON.stringify( + path.dirname(args.path), + )};`, + `const ${IMPORT_META_URL_VAR_NAME} = ${JSON.stringify( + pathToFileURL(args.path).href, + )};`, + ] + return { + contents: injectLines.join('') + contents, + loader: inferLoader(path.extname(args.path)), + } + }) + }, + } +} + +export async function bundleRequire( + options: Options, +): Promise<{ + mod: T + dependencies: string[] +}> { + if (!JS_EXT_RE.test(options.filepath)) { + throw new Error(`${options.filepath} is not a valid JS file`) + } + + const preserveTemporaryFile = + options.preserveTemporaryFile ?? !!process.env.BUNDLE_REQUIRE_PRESERVE + const cwd = options.cwd || process.cwd() + const format = options.format ?? guessFormat(options.filepath) + const tsconfig = loadTsConfig(cwd, options.tsconfig) + const resolvePaths = tsconfigPathsToRegExp( + tsconfig?.data.compilerOptions?.paths || {}, + ) + + const extractResult = async (result: BuildResult) => { + if (!result.outputFiles) { + throw new Error('[bundle-require] no output files') + } + + const { text } = result.outputFiles[0] + + const getOutputFile = options.getOutputFile || defaultGetOutputFile + const outfile = getOutputFile(options.filepath, format) + + await fs.promises.writeFile(outfile, text, 'utf8') + + let mod: any + const req: RequireFunction = options.require || dynamicImport + try { + mod = await req( + format === 'esm' ? pathToFileURL(outfile).href : outfile, + { format }, + ) + } finally { + if (!preserveTemporaryFile) { + // Remove the outfile after executed + await fs.promises.unlink(outfile) + } + } + + return { + mod, + dependencies: result.metafile ? Object.keys(result.metafile.inputs) : [], + } + } + + const result = await build({ + ...options.esbuildOptions, + entryPoints: [options.filepath], + absWorkingDir: cwd, + outfile: 'out.js', + format, + platform: 'node', + sourcemap: 'inline', + bundle: true, + metafile: true, + write: false, + watch: + options.esbuildOptions?.watch || + (options.onRebuild && { + async onRebuild(err, result) { + if (err) { + return options.onRebuild!({ err }) + } + if (result) { + options.onRebuild!(await extractResult(result)) + } + }, + }), + plugins: [ + ...(options.esbuildOptions?.plugins || []), + externalPlugin({ + external: options.external, + notExternal: resolvePaths, + }), + injectFileScopePlugin(), + ], + }) + + return extractResult(result) +} diff --git a/packages/bundle-require/src/utils.ts b/packages/bundle-require/src/utils.ts new file mode 100644 index 00000000..d727afd4 --- /dev/null +++ b/packages/bundle-require/src/utils.ts @@ -0,0 +1,58 @@ +import fs from 'fs' +import { createRequire } from 'module' +import path from 'path' +import { RequireFunction } from '.' + +const getPkgType = (): string | undefined => { + try { + const pkg = JSON.parse( + fs.readFileSync(path.resolve('package.json'), 'utf-8'), + ) + return pkg.type + } catch (error) {} +} + +export function guessFormat(inputFile: string): 'esm' | 'cjs' { + if (!usingDynamicImport) return 'cjs' + + const ext = path.extname(inputFile) + const type = getPkgType() + if (ext === '.js') { + return type === 'module' ? 'esm' : 'cjs' + } else if (ext === '.ts') { + return 'esm' + } else if (ext === '.mjs') { + return 'esm' + } + return 'cjs' +} + +declare const jest: any + +// Stolen from https://github.com/vitejs/vite/blob/0713446fa4df678422c84bd141b189a930c100e7/packages/vite/src/node/utils.ts#L606 +export const usingDynamicImport = typeof jest === 'undefined' +/** + * Dynamically import files. + * + * As a temporary workaround for Jest's lack of stable ESM support, we fallback to require + * if we're in a Jest environment. + * See https://github.com/vitejs/vite/pull/5197#issuecomment-938054077 + * + * @param file File path to import. + */ +export const dynamicImport: RequireFunction = async ( + id: string, + { format }, +) => { + const fn = + format === 'esm' + ? (file: string) => import(file) + : typeof globalThis.require === 'function' + ? globalThis.require + : createRequire(import.meta.url) + return fn(id) +} + +export const getRandomId = () => { + return Math.random().toString(36).substring(2, 15) +} diff --git a/packages/bundle-require/test/fixture/a.ts b/packages/bundle-require/test/fixture/a.ts new file mode 100644 index 00000000..1d33892e --- /dev/null +++ b/packages/bundle-require/test/fixture/a.ts @@ -0,0 +1 @@ +export const filename: string = __filename diff --git a/packages/bundle-require/test/fixture/ignore-node_modules/input.ts b/packages/bundle-require/test/fixture/ignore-node_modules/input.ts new file mode 100644 index 00000000..5344a7f9 --- /dev/null +++ b/packages/bundle-require/test/fixture/ignore-node_modules/input.ts @@ -0,0 +1,3 @@ +import { foo } from 'foo' + +export { foo } diff --git a/packages/bundle-require/test/fixture/input.ts b/packages/bundle-require/test/fixture/input.ts new file mode 100644 index 00000000..b0a9fa1f --- /dev/null +++ b/packages/bundle-require/test/fixture/input.ts @@ -0,0 +1,5 @@ +import * as a from './a' + +export default { + a, +} diff --git a/packages/bundle-require/test/fixture/preserve-temporary-file/input.ts b/packages/bundle-require/test/fixture/preserve-temporary-file/input.ts new file mode 100644 index 00000000..b1c6ea43 --- /dev/null +++ b/packages/bundle-require/test/fixture/preserve-temporary-file/input.ts @@ -0,0 +1 @@ +export default {} diff --git a/packages/bundle-require/test/fixture/replace-path/input.ts b/packages/bundle-require/test/fixture/replace-path/input.ts new file mode 100644 index 00000000..0cb8354e --- /dev/null +++ b/packages/bundle-require/test/fixture/replace-path/input.ts @@ -0,0 +1,7 @@ +const identity = (v: string) => v + +export const importMetaUrl = identity(import.meta.url) + +export const dir = identity(__dirname) + +export const file = identity(__filename) diff --git a/packages/bundle-require/test/fixture/resolve-tsconfig-paths/input.ts b/packages/bundle-require/test/fixture/resolve-tsconfig-paths/input.ts new file mode 100644 index 00000000..2bdf644f --- /dev/null +++ b/packages/bundle-require/test/fixture/resolve-tsconfig-paths/input.ts @@ -0,0 +1 @@ +export { foo } from '@src/foo' diff --git a/packages/bundle-require/test/fixture/resolve-tsconfig-paths/src/foo.ts b/packages/bundle-require/test/fixture/resolve-tsconfig-paths/src/foo.ts new file mode 100644 index 00000000..cb356468 --- /dev/null +++ b/packages/bundle-require/test/fixture/resolve-tsconfig-paths/src/foo.ts @@ -0,0 +1 @@ +export const foo = 'foo' diff --git a/packages/bundle-require/test/fixture/resolve-tsconfig-paths/tsconfig.json b/packages/bundle-require/test/fixture/resolve-tsconfig-paths/tsconfig.json new file mode 100644 index 00000000..7b26510e --- /dev/null +++ b/packages/bundle-require/test/fixture/resolve-tsconfig-paths/tsconfig.json @@ -0,0 +1,8 @@ +{ + "compilerOptions": { + "baseUrl": ".", + "paths": { + "@src/*": ["./src/*"] + } + } +} diff --git a/packages/bundle-require/test/index.test.ts b/packages/bundle-require/test/index.test.ts new file mode 100644 index 00000000..b05a47ab --- /dev/null +++ b/packages/bundle-require/test/index.test.ts @@ -0,0 +1,59 @@ +import fs from 'fs' +import path from 'path' +import { assert, test } from 'vitest' +import { JS_EXT_RE, bundleRequire } from '../dist' + +test('main', async () => { + const { mod, dependencies } = await bundleRequire({ + filepath: path.join(__dirname, './fixture/input.ts'), + }) + assert.equal(mod.default.a.filename.endsWith('a.ts'), true) + assert.deepEqual(dependencies, ['test/fixture/a.ts', 'test/fixture/input.ts']) +}) + +test('preserveTemporaryFile', async () => { + await bundleRequire({ + filepath: path.join( + __dirname, + './fixture/preserve-temporary-file/input.ts', + ), + preserveTemporaryFile: true, + getOutputFile: (filepath: string) => + filepath.replace(JS_EXT_RE, '.bundled.mjs'), + }) + const outputFile = path.join( + __dirname, + './fixture/preserve-temporary-file/input.bundled.mjs', + ) + assert.equal(fs.existsSync(outputFile), true) + fs.unlinkSync(outputFile) +}) + +test('ignore node_modules', async () => { + try { + await bundleRequire({ + filepath: path.join(__dirname, './fixture/ignore-node_modules/input.ts'), + }) + } catch (error: any) { + assert.equal(error.code, 'ERR_MODULE_NOT_FOUND') + } +}) + +test('resolve tsconfig paths', async () => { + const { mod } = await bundleRequire({ + filepath: path.join(__dirname, './fixture/resolve-tsconfig-paths/input.ts'), + cwd: path.join(__dirname, './fixture/resolve-tsconfig-paths'), + }) + assert.equal(mod.foo, 'foo') +}) + +test('replace import.meta.url', async () => { + const dir = path.join(__dirname, './fixture/replace-path') + const { mod } = await bundleRequire({ + filepath: path.join(dir, 'input.ts'), + cwd: dir, + }) + assert.equal(mod.dir, dir) + assert.equal(mod.file, path.join(dir, 'input.ts')) + assert.equal(mod.importMetaUrl, `file://${path.join(dir, 'input.ts')}`) +}) diff --git a/packages/bundle-require/tsconfig.json b/packages/bundle-require/tsconfig.json new file mode 100644 index 00000000..dc71bfd6 --- /dev/null +++ b/packages/bundle-require/tsconfig.json @@ -0,0 +1,19 @@ +{ + "compilerOptions": { + "target": "es2020", + "module": "esnext", + "strict": true, + "esModuleInterop": true, + "moduleResolution": "node", + "skipLibCheck": true, + "noUnusedLocals": true, + "noImplicitAny": true, + "allowJs": true, + "resolveJsonModule": true, + "baseUrl": ".", + "paths": { + "@foo/*": ["./node_modules/*"] + }, + }, + "types": ["./types.d.ts"] +} diff --git a/packages/bundle-require/tsup.config.ts b/packages/bundle-require/tsup.config.ts new file mode 100644 index 00000000..2b7f60a9 --- /dev/null +++ b/packages/bundle-require/tsup.config.ts @@ -0,0 +1,12 @@ +import { defineConfig } from 'tsup' + +import { getConfig } from '../../scripts/tsup' +import { dependencies, devDependencies } from './package.json' + +export default defineConfig( + getConfig({ + experimentalDts: false, + entry: ['src/index.ts'], + external: [...Object.keys(dependencies), ...Object.keys(devDependencies)], + }), +) diff --git a/packages/bundle-require/turbo.json b/packages/bundle-require/turbo.json new file mode 100644 index 00000000..5fa3ca7a --- /dev/null +++ b/packages/bundle-require/turbo.json @@ -0,0 +1,16 @@ +{ + "$schema": "https://turbo.build/schema.json", + "extends": ["//"], + "pipeline": { + "build": { + "dependsOn": ["clean"], + "outputs": ["dist/**"] + }, + "typecheck": { + "dependsOn": ["clean"] + }, + "clean": { + "cache": false + } + } +} diff --git a/packages/bundle-require/types.d.ts b/packages/bundle-require/types.d.ts new file mode 100644 index 00000000..d73c2091 --- /dev/null +++ b/packages/bundle-require/types.d.ts @@ -0,0 +1,3 @@ +declare module 'load-tsconfig' { + declare function loadTsConfig(dir?: string, name?: string): any +} diff --git a/packages/cli/package.json b/packages/cli/package.json index bf288aa5..ff382ac3 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -34,7 +34,7 @@ "dependencies": { "@abstract-money/ts-codegen": "^0.35.4", "abort-controller": "^3.0.0", - "bundle-require": "3.1.2", + "@abstract-money/bundle-require": "workspace:*", "cac": "^6.7.12", "change-case": "^4.1.2", "dedent": "^0.7.0", diff --git a/packages/cli/src/utils/resolve-config.ts b/packages/cli/src/utils/resolve-config.ts index 817e131d..3d3a5650 100644 --- a/packages/cli/src/utils/resolve-config.ts +++ b/packages/cli/src/utils/resolve-config.ts @@ -1,4 +1,4 @@ -import { bundleRequire } from 'bundle-require' +import { bundleRequire } from '@abstract-money/bundle-require' import type { Config } from '../config' import type { MaybeArray } from '../types' diff --git a/packages/cli/turbo.json b/packages/cli/turbo.json index 1b86cd13..58d09dab 100644 --- a/packages/cli/turbo.json +++ b/packages/cli/turbo.json @@ -3,10 +3,12 @@ "extends": ["//"], "pipeline": { "build": { - "dependsOn": ["clean"], + "dependsOn": ["@abstract-money/bundle-require#build", "clean"], "outputs": ["dist/**"] }, - "typecheck": {}, + "typecheck": { + "dependsOn": ["@abstract-money/bundle-require#build", "clean"] + }, "clean": { "cache": false } diff --git a/packages/cosmwasm-utils/turbo.json b/packages/cosmwasm-utils/turbo.json index 1b86cd13..5fa3ca7a 100644 --- a/packages/cosmwasm-utils/turbo.json +++ b/packages/cosmwasm-utils/turbo.json @@ -6,7 +6,9 @@ "dependsOn": ["clean"], "outputs": ["dist/**"] }, - "typecheck": {}, + "typecheck": { + "dependsOn": ["clean"] + }, "clean": { "cache": false } diff --git a/packages/cosmwasm/client/package.json b/packages/cosmwasm/client/package.json deleted file mode 100644 index 28843083..00000000 --- a/packages/cosmwasm/client/package.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "type": "module", - "main": "../dist/client/index.js" -} \ No newline at end of file diff --git a/packages/cosmwasm/utils/package.json b/packages/cosmwasm/utils/package.json deleted file mode 100644 index ed285364..00000000 --- a/packages/cosmwasm/utils/package.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "type": "module", - "main": "../dist/utils/index.js" -} \ No newline at end of file diff --git a/packages/react/package.json b/packages/react/package.json index 30512ef8..9af3f598 100644 --- a/packages/react/package.json +++ b/packages/react/package.json @@ -20,6 +20,7 @@ }, "scripts": { "build": "NODE_OPTIONS='--max-old-space-size=16384' tsup", + "clean": "rimraf dist", "typecheck": "tsc --noEmit" }, "dependencies": { @@ -48,6 +49,7 @@ "@keplr-wallet/types": "^0.12.44", "@types/node": "^18.11.10", "@types/react": "^18.2.0", + "rimraf": "^3.0.0", "rome": "^12.1.2", "simple-git-hooks": "^2.8.1", "ts-pattern": "^4.0.6", diff --git a/packages/react/turbo.json b/packages/react/turbo.json index 5d66a877..ae8da01a 100644 --- a/packages/react/turbo.json +++ b/packages/react/turbo.json @@ -3,11 +3,14 @@ "extends": ["//"], "pipeline": { "build": { - "dependsOn": ["@abstract-money/core#build"], + "dependsOn": ["@abstract-money/core#build", "clean"], "outputs": ["dist/**"] }, "typecheck": { - "dependsOn": ["@abstract-money/core#build"] + "dependsOn": ["@abstract-money/core#build", "clean"] + }, + "clean": { + "cache": false } } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 3ea6c35a..f311f688 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -1,7 +1,8 @@ lockfileVersion: '6.0' -overrides: - esbuild: 0.15.13 +settings: + autoInstallPeers: true + excludeLinksFromLockfile: false importers: @@ -340,17 +341,45 @@ importers: specifier: ^5 version: 5.3.2 + packages/bundle-require: + dependencies: + load-tsconfig: + specifier: ^0.2.0 + version: 0.2.5 + devDependencies: + '@egoist/prettier-config': + specifier: 1.0.0 + version: 1.0.0 + '@types/node': + specifier: 16.11.21 + version: 16.11.21 + esbuild: + specifier: 0.13.15 + version: 0.13.15 + prettier: + specifier: 2.5.1 + version: 2.5.1 + rimraf: + specifier: ^3.0.0 + version: 3.0.2 + typescript: + specifier: 4.5.5 + version: 4.5.5 + vitest: + specifier: 0.2.5 + version: 0.2.5(@types/node@16.11.21)(jsdom@20.0.3) + packages/cli: dependencies: + '@abstract-money/bundle-require': + specifier: workspace:* + version: link:../bundle-require '@abstract-money/ts-codegen': specifier: ^0.35.4 version: 0.35.4 abort-controller: specifier: ^3.0.0 version: 3.0.0 - bundle-require: - specifier: 3.1.2 - version: 3.1.2(esbuild@0.15.13) cac: specifier: ^6.7.12 version: 6.7.14 @@ -598,6 +627,9 @@ importers: '@types/react': specifier: ^18.2.0 version: 18.2.38 + rimraf: + specifier: ^3.0.0 + version: 3.0.2 rome: specifier: ^12.1.2 version: 12.1.3 @@ -3209,16 +3241,120 @@ packages: '@jridgewell/trace-mapping': 0.3.9 dev: true + /@egoist/prettier-config@1.0.0: + resolution: {integrity: sha512-D1Tp9Jv4aVoEo3cOAO966gFCI0wx/1lZ6sEHX8uMAfyVxuxD2+knGxhfGlb/FNLxWV3ifSI5hOmB/zFfsi7Rzw==} + dev: true + /@emotion/hash@0.9.1: resolution: {integrity: sha512-gJB6HLm5rYwSLI6PQa+X1t5CFGrv1J1TWG+sOyMCeKz2ojaj6Fnl/rZEspogG+cvqbt4AE/2eIyD2QfLKTBNlQ==} dev: false + /@esbuild/aix-ppc64@0.19.11: + resolution: {integrity: sha512-FnzU0LyE3ySQk7UntJO4+qIiQgI7KoODnZg5xzXIrFJlKd2P2gwHsHY4927xj9y5PJmJSzULiUCWmv7iWnNa7g==} + engines: {node: '>=12'} + cpu: [ppc64] + os: [aix] + requiresBuild: true + dev: true + optional: true + + /@esbuild/android-arm64@0.19.11: + resolution: {integrity: sha512-aiu7K/5JnLj//KOnOfEZ0D90obUkRzDMyqd/wNAUQ34m4YUPVhRZpnqKV9uqDGxT7cToSDnIHsGooyIczu9T+Q==} + engines: {node: '>=12'} + cpu: [arm64] + os: [android] + requiresBuild: true + dev: true + optional: true + /@esbuild/android-arm@0.15.13: resolution: {integrity: sha512-RY2fVI8O0iFUNvZirXaQ1vMvK0xhCcl0gqRj74Z6yEiO1zAUa7hbsdwZM1kzqbxHK7LFyMizipfXT3JME+12Hw==} engines: {node: '>=12'} cpu: [arm] os: [android] requiresBuild: true + dev: true + optional: true + + /@esbuild/android-arm@0.19.11: + resolution: {integrity: sha512-5OVapq0ClabvKvQ58Bws8+wkLCV+Rxg7tUVbo9xu034Nm536QTII4YzhaFriQ7rMrorfnFKUsArD2lqKbFY4vw==} + engines: {node: '>=12'} + cpu: [arm] + os: [android] + requiresBuild: true + dev: true + optional: true + + /@esbuild/android-x64@0.19.11: + resolution: {integrity: sha512-eccxjlfGw43WYoY9QgB82SgGgDbibcqyDTlk3l3C0jOVHKxrjdc9CTwDUQd0vkvYg5um0OH+GpxYvp39r+IPOg==} + engines: {node: '>=12'} + cpu: [x64] + os: [android] + requiresBuild: true + dev: true + optional: true + + /@esbuild/darwin-arm64@0.19.11: + resolution: {integrity: sha512-ETp87DRWuSt9KdDVkqSoKoLFHYTrkyz2+65fj9nfXsaV3bMhTCjtQfw3y+um88vGRKRiF7erPrh/ZuIdLUIVxQ==} + engines: {node: '>=12'} + cpu: [arm64] + os: [darwin] + requiresBuild: true + dev: true + optional: true + + /@esbuild/darwin-x64@0.19.11: + resolution: {integrity: sha512-fkFUiS6IUK9WYUO/+22omwetaSNl5/A8giXvQlcinLIjVkxwTLSktbF5f/kJMftM2MJp9+fXqZ5ezS7+SALp4g==} + engines: {node: '>=12'} + cpu: [x64] + os: [darwin] + requiresBuild: true + dev: true + optional: true + + /@esbuild/freebsd-arm64@0.19.11: + resolution: {integrity: sha512-lhoSp5K6bxKRNdXUtHoNc5HhbXVCS8V0iZmDvyWvYq9S5WSfTIHU2UGjcGt7UeS6iEYp9eeymIl5mJBn0yiuxA==} + engines: {node: '>=12'} + cpu: [arm64] + os: [freebsd] + requiresBuild: true + dev: true + optional: true + + /@esbuild/freebsd-x64@0.19.11: + resolution: {integrity: sha512-JkUqn44AffGXitVI6/AbQdoYAq0TEullFdqcMY/PCUZ36xJ9ZJRtQabzMA+Vi7r78+25ZIBosLTOKnUXBSi1Kw==} + engines: {node: '>=12'} + cpu: [x64] + os: [freebsd] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-arm64@0.19.11: + resolution: {integrity: sha512-LneLg3ypEeveBSMuoa0kwMpCGmpu8XQUh+mL8XXwoYZ6Be2qBnVtcDI5azSvh7vioMDhoJFZzp9GWp9IWpYoUg==} + engines: {node: '>=12'} + cpu: [arm64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-arm@0.19.11: + resolution: {integrity: sha512-3CRkr9+vCV2XJbjwgzjPtO8T0SZUmRZla+UL1jw+XqHZPkPgZiyWvbDvl9rqAN8Zl7qJF0O/9ycMtjU67HN9/Q==} + engines: {node: '>=12'} + cpu: [arm] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-ia32@0.19.11: + resolution: {integrity: sha512-caHy++CsD8Bgq2V5CodbJjFPEiDPq8JJmBdeyZ8GWVQMjRD0sU548nNdwPNvKjVpamYYVL40AORekgfIubwHoA==} + engines: {node: '>=12'} + cpu: [ia32] + os: [linux] + requiresBuild: true + dev: true optional: true /@esbuild/linux-loong64@0.15.13: @@ -3227,6 +3363,115 @@ packages: cpu: [loong64] os: [linux] requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-loong64@0.19.11: + resolution: {integrity: sha512-ppZSSLVpPrwHccvC6nQVZaSHlFsvCQyjnvirnVjbKSHuE5N24Yl8F3UwYUUR1UEPaFObGD2tSvVKbvR+uT1Nrg==} + engines: {node: '>=12'} + cpu: [loong64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-mips64el@0.19.11: + resolution: {integrity: sha512-B5x9j0OgjG+v1dF2DkH34lr+7Gmv0kzX6/V0afF41FkPMMqaQ77pH7CrhWeR22aEeHKaeZVtZ6yFwlxOKPVFyg==} + engines: {node: '>=12'} + cpu: [mips64el] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-ppc64@0.19.11: + resolution: {integrity: sha512-MHrZYLeCG8vXblMetWyttkdVRjQlQUb/oMgBNurVEnhj4YWOr4G5lmBfZjHYQHHN0g6yDmCAQRR8MUHldvvRDA==} + engines: {node: '>=12'} + cpu: [ppc64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-riscv64@0.19.11: + resolution: {integrity: sha512-f3DY++t94uVg141dozDu4CCUkYW+09rWtaWfnb3bqe4w5NqmZd6nPVBm+qbz7WaHZCoqXqHz5p6CM6qv3qnSSQ==} + engines: {node: '>=12'} + cpu: [riscv64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-s390x@0.19.11: + resolution: {integrity: sha512-A5xdUoyWJHMMlcSMcPGVLzYzpcY8QP1RtYzX5/bS4dvjBGVxdhuiYyFwp7z74ocV7WDc0n1harxmpq2ePOjI0Q==} + engines: {node: '>=12'} + cpu: [s390x] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-x64@0.19.11: + resolution: {integrity: sha512-grbyMlVCvJSfxFQUndw5mCtWs5LO1gUlwP4CDi4iJBbVpZcqLVT29FxgGuBJGSzyOxotFG4LoO5X+M1350zmPA==} + engines: {node: '>=12'} + cpu: [x64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/netbsd-x64@0.19.11: + resolution: {integrity: sha512-13jvrQZJc3P230OhU8xgwUnDeuC/9egsjTkXN49b3GcS5BKvJqZn86aGM8W9pd14Kd+u7HuFBMVtrNGhh6fHEQ==} + engines: {node: '>=12'} + cpu: [x64] + os: [netbsd] + requiresBuild: true + dev: true + optional: true + + /@esbuild/openbsd-x64@0.19.11: + resolution: {integrity: sha512-ysyOGZuTp6SNKPE11INDUeFVVQFrhcNDVUgSQVDzqsqX38DjhPEPATpid04LCoUr2WXhQTEZ8ct/EgJCUDpyNw==} + engines: {node: '>=12'} + cpu: [x64] + os: [openbsd] + requiresBuild: true + dev: true + optional: true + + /@esbuild/sunos-x64@0.19.11: + resolution: {integrity: sha512-Hf+Sad9nVwvtxy4DXCZQqLpgmRTQqyFyhT3bZ4F2XlJCjxGmRFF0Shwn9rzhOYRB61w9VMXUkxlBy56dk9JJiQ==} + engines: {node: '>=12'} + cpu: [x64] + os: [sunos] + requiresBuild: true + dev: true + optional: true + + /@esbuild/win32-arm64@0.19.11: + resolution: {integrity: sha512-0P58Sbi0LctOMOQbpEOvOL44Ne0sqbS0XWHMvvrg6NE5jQ1xguCSSw9jQeUk2lfrXYsKDdOe6K+oZiwKPilYPQ==} + engines: {node: '>=12'} + cpu: [arm64] + os: [win32] + requiresBuild: true + dev: true + optional: true + + /@esbuild/win32-ia32@0.19.11: + resolution: {integrity: sha512-6YOrWS+sDJDmshdBIQU+Uoyh7pQKrdykdefC1avn76ss5c+RN6gut3LZA4E2cH5xUEp5/cA0+YxRaVtRAb0xBg==} + engines: {node: '>=12'} + cpu: [ia32] + os: [win32] + requiresBuild: true + dev: true + optional: true + + /@esbuild/win32-x64@0.19.11: + resolution: {integrity: sha512-vfkhltrjCAb603XaFhqhAF4LGDi2M4OrCRrFusyQ+iTLQ/o60QQXxc9cZC/FFpihBI9N1Grn6SMKVJ4KP7Fuiw==} + engines: {node: '>=12'} + cpu: [x64] + os: [win32] + requiresBuild: true + dev: true optional: true /@ethereumjs/common@3.2.0: @@ -7702,6 +7947,16 @@ packages: '@babel/types': 7.23.4 dev: true + /@types/chai-subset@1.3.5: + resolution: {integrity: sha512-c2mPnw+xHtXDoHmdtcCXGwyLMiauiAyxWMzhGpqHC4nqI/Y5G2XhTampslK2rb59kpcuHon03UH8W6iYUzw88A==} + dependencies: + '@types/chai': 4.3.11 + dev: true + + /@types/chai@4.3.11: + resolution: {integrity: sha512-qQR1dr2rGIHYlJulmr8Ioq3De0Le9E4MJ5AiaeAETJJpndT1uUNHsGFK3L/UIu+rbkQSdj8J/w2bCsBZc/Y5fQ==} + dev: true + /@types/cookie@0.4.1: resolution: {integrity: sha512-XW/Aa8APYr6jSVVA1y/DEIZX0/GMKLEVekNG727R8cs56ahETkRAy/3DR7+fJyh7oUgGwNQaRfXCun0+KbWY7Q==} dev: true @@ -7806,6 +8061,10 @@ packages: resolution: {integrity: sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ==} dev: true + /@types/node@16.11.21: + resolution: {integrity: sha512-Pf8M1XD9i1ksZEcCP8vuSNwooJ/bZapNmIzpmsMaL+jMI+8mEYU3PKvs+xDNuQcJWF/x24WzY4qxLtB0zNow9A==} + dev: true + /@types/node@17.0.21: resolution: {integrity: sha512-DBZCJbhII3r90XbQxI8Y9IjjiiOGlZ0Hr32omXIZvwwZ7p4DMMXGrKXVyPfuoBOri9XNtL0UK69jYIBIsRX3QQ==} dev: true @@ -9097,23 +9356,13 @@ packages: dependencies: node-gyp-build: 4.7.1 - /bundle-require@3.1.2(esbuild@0.15.13): - resolution: {integrity: sha512-Of6l6JBAxiyQ5axFxUM6dYeP/W7X2Sozeo/4EYB9sJhL+dqL7TKjg+shwxp6jlu/6ZSERfsYtIpSJ1/x3XkAEA==} - engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} - peerDependencies: - esbuild: 0.15.13 - dependencies: - esbuild: 0.15.13 - load-tsconfig: 0.2.5 - dev: false - - /bundle-require@4.0.2(esbuild@0.15.13): + /bundle-require@4.0.2(esbuild@0.19.11): resolution: {integrity: sha512-jwzPOChofl67PSTW2SGubV9HBQAhhR2i6nskiOThauo9dzwDUgOWQScFVaJkjEfYX+UXiD+LEx8EblQMc2wIag==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} peerDependencies: - esbuild: 0.15.13 + esbuild: '>=0.17' dependencies: - esbuild: 0.15.13 + esbuild: 0.19.11 load-tsconfig: 0.2.5 dev: true @@ -10288,6 +10537,15 @@ packages: cpu: [x64] os: [android] requiresBuild: true + dev: true + optional: true + + /esbuild-android-arm64@0.13.15: + resolution: {integrity: sha512-m602nft/XXeO8YQPUDVoHfjyRVPdPgjyyXOxZ44MK/agewFFkPa8tUo6lAzSWh5Ui5PB4KR9UIFTSBKh/RrCmg==} + cpu: [arm64] + os: [android] + requiresBuild: true + dev: true optional: true /esbuild-android-arm64@0.15.13: @@ -10296,6 +10554,15 @@ packages: cpu: [arm64] os: [android] requiresBuild: true + dev: true + optional: true + + /esbuild-darwin-64@0.13.15: + resolution: {integrity: sha512-ihOQRGs2yyp7t5bArCwnvn2Atr6X4axqPpEdCFPVp7iUj4cVSdisgvEKdNR7yH3JDjW6aQDw40iQFoTqejqxvQ==} + cpu: [x64] + os: [darwin] + requiresBuild: true + dev: true optional: true /esbuild-darwin-64@0.15.13: @@ -10304,6 +10571,15 @@ packages: cpu: [x64] os: [darwin] requiresBuild: true + dev: true + optional: true + + /esbuild-darwin-arm64@0.13.15: + resolution: {integrity: sha512-i1FZssTVxUqNlJ6cBTj5YQj4imWy3m49RZRnHhLpefFIh0To05ow9DTrXROTE1urGTQCloFUXTX8QfGJy1P8dQ==} + cpu: [arm64] + os: [darwin] + requiresBuild: true + dev: true optional: true /esbuild-darwin-arm64@0.15.13: @@ -10312,6 +10588,15 @@ packages: cpu: [arm64] os: [darwin] requiresBuild: true + dev: true + optional: true + + /esbuild-freebsd-64@0.13.15: + resolution: {integrity: sha512-G3dLBXUI6lC6Z09/x+WtXBXbOYQZ0E8TDBqvn7aMaOCzryJs8LyVXKY4CPnHFXZAbSwkCbqiPuSQ1+HhrNk7EA==} + cpu: [x64] + os: [freebsd] + requiresBuild: true + dev: true optional: true /esbuild-freebsd-64@0.15.13: @@ -10320,6 +10605,15 @@ packages: cpu: [x64] os: [freebsd] requiresBuild: true + dev: true + optional: true + + /esbuild-freebsd-arm64@0.13.15: + resolution: {integrity: sha512-KJx0fzEDf1uhNOZQStV4ujg30WlnwqUASaGSFPhznLM/bbheu9HhqZ6mJJZM32lkyfGJikw0jg7v3S0oAvtvQQ==} + cpu: [arm64] + os: [freebsd] + requiresBuild: true + dev: true optional: true /esbuild-freebsd-arm64@0.15.13: @@ -10328,6 +10622,15 @@ packages: cpu: [arm64] os: [freebsd] requiresBuild: true + dev: true + optional: true + + /esbuild-linux-32@0.13.15: + resolution: {integrity: sha512-ZvTBPk0YWCLMCXiFmD5EUtB30zIPvC5Itxz0mdTu/xZBbbHJftQgLWY49wEPSn2T/TxahYCRDWun5smRa0Tu+g==} + cpu: [ia32] + os: [linux] + requiresBuild: true + dev: true optional: true /esbuild-linux-32@0.15.13: @@ -10336,6 +10639,15 @@ packages: cpu: [ia32] os: [linux] requiresBuild: true + dev: true + optional: true + + /esbuild-linux-64@0.13.15: + resolution: {integrity: sha512-eCKzkNSLywNeQTRBxJRQ0jxRCl2YWdMB3+PkWFo2BBQYC5mISLIVIjThNtn6HUNqua1pnvgP5xX0nHbZbPj5oA==} + cpu: [x64] + os: [linux] + requiresBuild: true + dev: true optional: true /esbuild-linux-64@0.15.13: @@ -10344,6 +10656,15 @@ packages: cpu: [x64] os: [linux] requiresBuild: true + dev: true + optional: true + + /esbuild-linux-arm64@0.13.15: + resolution: {integrity: sha512-bYpuUlN6qYU9slzr/ltyLTR9YTBS7qUDymO8SV7kjeNext61OdmqFAzuVZom+OLW1HPHseBfJ/JfdSlx8oTUoA==} + cpu: [arm64] + os: [linux] + requiresBuild: true + dev: true optional: true /esbuild-linux-arm64@0.15.13: @@ -10352,6 +10673,15 @@ packages: cpu: [arm64] os: [linux] requiresBuild: true + dev: true + optional: true + + /esbuild-linux-arm@0.13.15: + resolution: {integrity: sha512-wUHttDi/ol0tD8ZgUMDH8Ef7IbDX+/UsWJOXaAyTdkT7Yy9ZBqPg8bgB/Dn3CZ9SBpNieozrPRHm0BGww7W/jA==} + cpu: [arm] + os: [linux] + requiresBuild: true + dev: true optional: true /esbuild-linux-arm@0.15.13: @@ -10360,6 +10690,15 @@ packages: cpu: [arm] os: [linux] requiresBuild: true + dev: true + optional: true + + /esbuild-linux-mips64le@0.13.15: + resolution: {integrity: sha512-KlVjIG828uFPyJkO/8gKwy9RbXhCEUeFsCGOJBepUlpa7G8/SeZgncUEz/tOOUJTcWMTmFMtdd3GElGyAtbSWg==} + cpu: [mips64el] + os: [linux] + requiresBuild: true + dev: true optional: true /esbuild-linux-mips64le@0.15.13: @@ -10368,6 +10707,15 @@ packages: cpu: [mips64el] os: [linux] requiresBuild: true + dev: true + optional: true + + /esbuild-linux-ppc64le@0.13.15: + resolution: {integrity: sha512-h6gYF+OsaqEuBjeesTBtUPw0bmiDu7eAeuc2OEH9S6mV9/jPhPdhOWzdeshb0BskRZxPhxPOjqZ+/OqLcxQwEQ==} + cpu: [ppc64] + os: [linux] + requiresBuild: true + dev: true optional: true /esbuild-linux-ppc64le@0.15.13: @@ -10376,6 +10724,7 @@ packages: cpu: [ppc64] os: [linux] requiresBuild: true + dev: true optional: true /esbuild-linux-riscv64@0.15.13: @@ -10384,6 +10733,7 @@ packages: cpu: [riscv64] os: [linux] requiresBuild: true + dev: true optional: true /esbuild-linux-s390x@0.15.13: @@ -10392,6 +10742,15 @@ packages: cpu: [s390x] os: [linux] requiresBuild: true + dev: true + optional: true + + /esbuild-netbsd-64@0.13.15: + resolution: {integrity: sha512-3+yE9emwoevLMyvu+iR3rsa+Xwhie7ZEHMGDQ6dkqP/ndFzRHkobHUKTe+NCApSqG5ce2z4rFu+NX/UHnxlh3w==} + cpu: [x64] + os: [netbsd] + requiresBuild: true + dev: true optional: true /esbuild-netbsd-64@0.15.13: @@ -10400,6 +10759,15 @@ packages: cpu: [x64] os: [netbsd] requiresBuild: true + dev: true + optional: true + + /esbuild-openbsd-64@0.13.15: + resolution: {integrity: sha512-wTfvtwYJYAFL1fSs8yHIdf5GEE4NkbtbXtjLWjM3Cw8mmQKqsg8kTiqJ9NJQe5NX/5Qlo7Xd9r1yKMMkHllp5g==} + cpu: [x64] + os: [openbsd] + requiresBuild: true + dev: true optional: true /esbuild-openbsd-64@0.15.13: @@ -10408,12 +10776,13 @@ packages: cpu: [x64] os: [openbsd] requiresBuild: true + dev: true optional: true /esbuild-register@3.5.0(esbuild@0.15.13): resolution: {integrity: sha512-+4G/XmakeBAsvJuDugJvtyF1x+XJT4FMocynNpxrvEBViirpfUn2PgNpCHedfWhF4WokNsO/OvMKrmJOIJsI5A==} peerDependencies: - esbuild: 0.15.13 + esbuild: '>=0.12 <1' dependencies: debug: 4.3.4 esbuild: 0.15.13 @@ -10421,12 +10790,29 @@ packages: - supports-color dev: true + /esbuild-sunos-64@0.13.15: + resolution: {integrity: sha512-lbivT9Bx3t1iWWrSnGyBP9ODriEvWDRiweAs69vI+miJoeKwHWOComSRukttbuzjZ8r1q0mQJ8Z7yUsDJ3hKdw==} + cpu: [x64] + os: [sunos] + requiresBuild: true + dev: true + optional: true + /esbuild-sunos-64@0.15.13: resolution: {integrity: sha512-jVeu2GfxZQ++6lRdY43CS0Tm/r4WuQQ0Pdsrxbw+aOrHQPHV0+LNOLnvbN28M7BSUGnJnHkHm2HozGgNGyeIRw==} engines: {node: '>=12'} cpu: [x64] os: [sunos] requiresBuild: true + dev: true + optional: true + + /esbuild-windows-32@0.13.15: + resolution: {integrity: sha512-fDMEf2g3SsJ599MBr50cY5ve5lP1wyVwTe6aLJsM01KtxyKkB4UT+fc5MXQFn3RLrAIAZOG+tHC+yXObpSn7Nw==} + cpu: [ia32] + os: [win32] + requiresBuild: true + dev: true optional: true /esbuild-windows-32@0.15.13: @@ -10435,6 +10821,15 @@ packages: cpu: [ia32] os: [win32] requiresBuild: true + dev: true + optional: true + + /esbuild-windows-64@0.13.15: + resolution: {integrity: sha512-9aMsPRGDWCd3bGjUIKG/ZOJPKsiztlxl/Q3C1XDswO6eNX/Jtwu4M+jb6YDH9hRSUflQWX0XKAfWzgy5Wk54JQ==} + cpu: [x64] + os: [win32] + requiresBuild: true + dev: true optional: true /esbuild-windows-64@0.15.13: @@ -10443,6 +10838,15 @@ packages: cpu: [x64] os: [win32] requiresBuild: true + dev: true + optional: true + + /esbuild-windows-arm64@0.13.15: + resolution: {integrity: sha512-zzvyCVVpbwQQATaf3IG8mu1IwGEiDxKkYUdA4FpoCHi1KtPa13jeScYDjlW0Qh+ebWzpKfR2ZwvqAQkSWNcKjA==} + cpu: [arm64] + os: [win32] + requiresBuild: true + dev: true optional: true /esbuild-windows-arm64@0.15.13: @@ -10451,8 +10855,33 @@ packages: cpu: [arm64] os: [win32] requiresBuild: true + dev: true optional: true + /esbuild@0.13.15: + resolution: {integrity: sha512-raCxt02HBKv8RJxE8vkTSCXGIyKHdEdGfUmiYb8wnabnaEmHzyW7DCHb5tEN0xU8ryqg5xw54mcwnYkC4x3AIw==} + hasBin: true + requiresBuild: true + optionalDependencies: + esbuild-android-arm64: 0.13.15 + esbuild-darwin-64: 0.13.15 + esbuild-darwin-arm64: 0.13.15 + esbuild-freebsd-64: 0.13.15 + esbuild-freebsd-arm64: 0.13.15 + esbuild-linux-32: 0.13.15 + esbuild-linux-64: 0.13.15 + esbuild-linux-arm: 0.13.15 + esbuild-linux-arm64: 0.13.15 + esbuild-linux-mips64le: 0.13.15 + esbuild-linux-ppc64le: 0.13.15 + esbuild-netbsd-64: 0.13.15 + esbuild-openbsd-64: 0.13.15 + esbuild-sunos-64: 0.13.15 + esbuild-windows-32: 0.13.15 + esbuild-windows-64: 0.13.15 + esbuild-windows-arm64: 0.13.15 + dev: true + /esbuild@0.15.13: resolution: {integrity: sha512-Cu3SC84oyzzhrK/YyN4iEVy2jZu5t2fz66HEOShHURcjSkOSAVL8C/gfUT+lDJxkVHpg8GZ10DD0rMHRPqMFaQ==} engines: {node: '>=12'} @@ -10481,6 +10910,38 @@ packages: esbuild-windows-32: 0.15.13 esbuild-windows-64: 0.15.13 esbuild-windows-arm64: 0.15.13 + dev: true + + /esbuild@0.19.11: + resolution: {integrity: sha512-HJ96Hev2hX/6i5cDVwcqiJBBtuo9+FeIJOtZ9W1kA5M6AMJRHUZlpYZ1/SbEwtO0ioNAW8rUooVpC/WehY2SfA==} + engines: {node: '>=12'} + hasBin: true + requiresBuild: true + optionalDependencies: + '@esbuild/aix-ppc64': 0.19.11 + '@esbuild/android-arm': 0.19.11 + '@esbuild/android-arm64': 0.19.11 + '@esbuild/android-x64': 0.19.11 + '@esbuild/darwin-arm64': 0.19.11 + '@esbuild/darwin-x64': 0.19.11 + '@esbuild/freebsd-arm64': 0.19.11 + '@esbuild/freebsd-x64': 0.19.11 + '@esbuild/linux-arm': 0.19.11 + '@esbuild/linux-arm64': 0.19.11 + '@esbuild/linux-ia32': 0.19.11 + '@esbuild/linux-loong64': 0.19.11 + '@esbuild/linux-mips64el': 0.19.11 + '@esbuild/linux-ppc64': 0.19.11 + '@esbuild/linux-riscv64': 0.19.11 + '@esbuild/linux-s390x': 0.19.11 + '@esbuild/linux-x64': 0.19.11 + '@esbuild/netbsd-x64': 0.19.11 + '@esbuild/openbsd-x64': 0.19.11 + '@esbuild/sunos-x64': 0.19.11 + '@esbuild/win32-arm64': 0.19.11 + '@esbuild/win32-ia32': 0.19.11 + '@esbuild/win32-x64': 0.19.11 + dev: true /escalade@3.1.1: resolution: {integrity: sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==} @@ -12954,6 +13415,11 @@ packages: strip-bom: 3.0.0 dev: true + /local-pkg@0.4.3: + resolution: {integrity: sha512-SFppqq5p42fe2qcZQqqEOiVRXl+WCP1MdT6k7BDEW1j++sp5fIY+/fdRQitvKgB5BrBcmrs5m/L0v2FrU5MY1g==} + engines: {node: '>=14'} + dev: true + /local-pkg@0.5.0: resolution: {integrity: sha512-ok6z3qlYyCDS4ZEU27HaU6x/xZa9Whf8jD4ptH5UZTQYZVYeb9bnZ3ojVhiJNLiXK1Hfc0GNbLXcmZ5plLDDBg==} engines: {node: '>=14'} @@ -14177,6 +14643,12 @@ packages: which-pm: 2.0.0 dev: true + /prettier@2.5.1: + resolution: {integrity: sha512-vBZcPRUR5MZJwoyi3ZoyQlc1rXeEck8KgeC9AwwOn+exuxLxq5toTRDTSaVrXHxelDMHy9zlicw8u66yxoSUFg==} + engines: {node: '>=10.13.0'} + hasBin: true + dev: true + /prettier@2.8.8: resolution: {integrity: sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==} engines: {node: '>=10.13.0'} @@ -15695,11 +16167,21 @@ packages: resolution: {integrity: sha512-65NKvSuAVDP/n4CqH+a9w2kTlLReS9vhsAP06MWx+/89nMinJyB2icyl58RIcqCmIggpojIGeuJGhjU1aGMBSg==} dev: true + /tinypool@0.1.3: + resolution: {integrity: sha512-2IfcQh7CP46XGWGGbdyO4pjcKqsmVqFAPcXfPxcPXmOWt9cYkTP9HcDmGgsfijYoAEc4z9qcpM/BaBz46Y9/CQ==} + engines: {node: '>=14.0.0'} + dev: true + /tinypool@0.8.1: resolution: {integrity: sha512-zBTCK0cCgRROxvs9c0CGK838sPkeokNGdQVUUwHAbynHFlmyJYj825f/oRs528HaIJ97lo0pLIlDUzwN+IorWg==} engines: {node: '>=14.0.0'} dev: true + /tinyspy@0.2.10: + resolution: {integrity: sha512-Qij6rGWCDjWIejxCXXVi6bNgvrYBp3PbqC4cBP/0fD6WHDOHCw09Zd13CsxrDqSR5PFq01WeqDws8t5lz5sH0A==} + engines: {node: '>=14.0.0'} + dev: true + /tinyspy@2.2.0: resolution: {integrity: sha512-d2eda04AN/cPOR89F7Xv5bK/jrQEhmcLFe6HFldoeO9AJtps+fqEnh486vnT/8y4bw38pSyxDcTCAq+Ks2aJTg==} engines: {node: '>=14.0.0'} @@ -15927,11 +16409,11 @@ packages: optional: true dependencies: '@microsoft/api-extractor': 7.38.4(@types/node@17.0.21) - bundle-require: 4.0.2(esbuild@0.15.13) + bundle-require: 4.0.2(esbuild@0.19.11) cac: 6.7.14 chokidar: 3.5.3 debug: 4.3.4 - esbuild: 0.15.13 + esbuild: 0.19.11 execa: 5.1.1 globby: 11.1.0 joycon: 3.1.1 @@ -16134,6 +16616,12 @@ packages: resolution: {integrity: sha512-7uc1O8h1M1g0rArakJdf0uLRSSgFcYexrVoKo+bzJd32gd4gDy2L/Z+8/FjPnU9ydY3pEnVPtr9FyscYY60K1g==} dev: false + /typescript@4.5.5: + resolution: {integrity: sha512-TCTIul70LyWe6IJWT8QSYeA54WQe8EjQFU4wY52Fasj5UKx88LNYKCgBEHcOMOrFF1rKGbD8v/xcNWVUq9SymA==} + engines: {node: '>=4.2.0'} + hasBin: true + dev: true + /typescript@5.0.4: resolution: {integrity: sha512-cW9T5W9xY37cc+jfEnaUvX91foxtHkza3Nw3wkoF4sSlKn0MONdkdEndig/qPBWXNkmplh3NzayQzCiHM4/hqw==} engines: {node: '>=12.20'} @@ -16511,6 +16999,42 @@ packages: - terser dev: true + /vite@5.0.7(@types/node@16.11.21): + resolution: {integrity: sha512-B4T4rJCDPihrQo2B+h1MbeGL/k/GMAHzhQ8S0LjQ142s6/+l3hHTT095ORvsshj4QCkoWu3Xtmob5mazvakaOw==} + engines: {node: ^18.0.0 || >=20.0.0} + hasBin: true + peerDependencies: + '@types/node': ^18.0.0 || >=20.0.0 + less: '*' + lightningcss: ^1.21.0 + sass: '*' + stylus: '*' + sugarss: '*' + terser: ^5.4.0 + peerDependenciesMeta: + '@types/node': + optional: true + less: + optional: true + lightningcss: + optional: true + sass: + optional: true + stylus: + optional: true + sugarss: + optional: true + terser: + optional: true + dependencies: + '@types/node': 16.11.21 + esbuild: 0.19.11 + postcss: 8.4.32 + rollup: 4.6.1 + optionalDependencies: + fsevents: 2.3.3 + dev: true + /vite@5.0.7(@types/node@18.18.13): resolution: {integrity: sha512-B4T4rJCDPihrQo2B+h1MbeGL/k/GMAHzhQ8S0LjQ142s6/+l3hHTT095ORvsshj4QCkoWu3Xtmob5mazvakaOw==} engines: {node: ^18.0.0 || >=20.0.0} @@ -16540,13 +17064,50 @@ packages: optional: true dependencies: '@types/node': 18.18.13 - esbuild: 0.15.13 + esbuild: 0.19.11 postcss: 8.4.32 rollup: 4.6.1 optionalDependencies: fsevents: 2.3.3 dev: true + /vitest@0.2.5(@types/node@16.11.21)(jsdom@20.0.3): + resolution: {integrity: sha512-QruEhsNxy8ycLxYG9rrGUfHZzJ8A6YvA9ULZ4w/ecvm0Zejm1nxUar/XkRWkL2xzrqA5AjmfqDSQZ8q2bFbA0Q==} + engines: {node: '>=14.14.0'} + hasBin: true + peerDependencies: + '@vitest/ui': '*' + c8: '*' + happy-dom: '*' + jsdom: '*' + peerDependenciesMeta: + '@vitest/ui': + optional: true + c8: + optional: true + happy-dom: + optional: true + jsdom: + optional: true + dependencies: + '@types/chai': 4.3.11 + '@types/chai-subset': 1.3.5 + chai: 4.3.10 + jsdom: 20.0.3 + local-pkg: 0.4.3 + tinypool: 0.1.3 + tinyspy: 0.2.10 + vite: 5.0.7(@types/node@16.11.21) + transitivePeerDependencies: + - '@types/node' + - less + - lightningcss + - sass + - stylus + - sugarss + - terser + dev: true + /vitest@1.0.2(@types/node@18.18.13)(jsdom@20.0.3): resolution: {integrity: sha512-F3NVwwpXfRSDnJmyv+ALPwSRVt0zDkRRE18pwUHSUPXAlWQ47rY1dc99ziMW5bBHyqwK2ERjMisLNoef64qk9w==} engines: {node: ^18.0.0 || >=20.0.0} @@ -17041,7 +17602,3 @@ packages: react: 18.2.0 use-sync-external-store: 1.2.0(react@18.2.0) dev: false - -settings: - autoInstallPeers: true - excludeLinksFromLockfile: false