diff --git a/.changeset/gold-berries-march.md b/.changeset/gold-berries-march.md new file mode 100644 index 00000000..a96679e4 --- /dev/null +++ b/.changeset/gold-berries-march.md @@ -0,0 +1,5 @@ +--- +'microbundle': patch +--- + +Fix indentation style in `mangle.json` not preserved diff --git a/.changeset/rude-books-judge.md b/.changeset/rude-books-judge.md deleted file mode 100644 index 1737bcfb..00000000 --- a/.changeset/rude-books-judge.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'microbundle': patch ---- - -- Allow the minify options `compress` and `mangle` to be set as booleans diff --git a/.changeset/swift-plums-fix.md b/.changeset/swift-plums-fix.md new file mode 100644 index 00000000..941c04d4 --- /dev/null +++ b/.changeset/swift-plums-fix.md @@ -0,0 +1,5 @@ +--- +'microbundle': patch +--- + +Silence Rollup's noisy (and usually harmless) `The 'this' keyword is equivalent to 'undefined' at the top level of an ES module, and has been rewritten.` warnings diff --git a/.changeset/violet-falcons-dream.md b/.changeset/violet-falcons-dream.md new file mode 100644 index 00000000..9cd3e61b --- /dev/null +++ b/.changeset/violet-falcons-dream.md @@ -0,0 +1,5 @@ +--- +'microbundle': patch +--- + +Fixes positioning bug with UMD sourcemaps diff --git a/.github/workflows/nodejs.yml b/.github/workflows/nodejs.yml index a7e707f9..5cc3932f 100644 --- a/.github/workflows/nodejs.yml +++ b/.github/workflows/nodejs.yml @@ -3,9 +3,8 @@ name: Node CI on: pull_request: {} push: - branches-ignore: - - trying.tmp - - staging.tmp + branches: + - master jobs: build: @@ -16,34 +15,12 @@ jobs: node-version: [12.x, 14.x] steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v4 - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v1 + uses: actions/setup-node@v4 with: node-version: ${{ matrix.node-version }} - - name: install npm@latest - run: npm i -g npm@latest --registry=https://registry.npmjs.org - - name: npm install, build, and test - run: | - npm install - npm test - - name: sizereport - run: ./node_modules/.bin/sizereport --config - -# Could add this for canary versions -# publish-gpr: -# needs: build -# runs-on: ubuntu-latest -# steps: -# - uses: actions/checkout@v1 -# - uses: actions/setup-node@v1 -# with: -# node-version: 12 -# registry-url: https://npm.pkg.github.com/ -# scope: '@preact' -# - run: | -# npm install -# npm config set registry https://npm.pkg.github.com/ -# npm publish -# env: -# NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}} + cache: npm + - run: npm ci --ignore-scripts + - name: npm build and test + run: npm test diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 9548e01c..d3fd15c6 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -11,15 +11,15 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout Repo - uses: actions/checkout@master + uses: actions/checkout@v4 with: # This makes Actions fetch all Git history so that Changesets can generate changelogs with the correct commits fetch-depth: 0 - - name: Setup Node.js 12.x - uses: actions/setup-node@master + - name: Setup Node.js 22.x + uses: actions/setup-node@v4 with: - node-version: 12.x + node-version: 22.x - name: Install Dependencies run: npm install diff --git a/.github/workflows/size.yml b/.github/workflows/size.yml new file mode 100644 index 00000000..d6fc9378 --- /dev/null +++ b/.github/workflows/size.yml @@ -0,0 +1,27 @@ +name: compressed-size +on: + pull_request: + branches: + - master + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: compressed-size-action + uses: preactjs/compressed-size-action@v2 + with: + pattern: 'dist/!(*.js.map)' + build-script: build + repo-token: '${{ secrets.GITHUB_TOKEN }}' + + - name: compressed-size-action + uses: preactjs/compressed-size-action@v2 + with: + pattern: 'test/fixtures/**/dist/!(*.map)' + # We're using this to report size differences, not test, so update snapshots if they fail. + # The CI can catch the test failures instead. + build-script: 'test -- -u' + repo-token: '${{ secrets.GITHUB_TOKEN }}' diff --git a/.gitignore b/.gitignore index 7a343b9d..30731f52 100644 --- a/.gitignore +++ b/.gitignore @@ -12,3 +12,4 @@ yarn.lock .idea .rts2* sizes.csv +test/fixtures/visualizer/stats.html diff --git a/CHANGELOG.md b/CHANGELOG.md index 69706399..043f5fa8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,79 @@ # microbundle +## 0.15.1 + +### Patch Changes + +- [`cebafa1`](https://github.com/developit/microbundle/commit/cebafa121953a771f010b3cfd250a83bfc754e2c) [#961](https://github.com/developit/microbundle/pull/961) Thanks [@zyrong](https://github.com/zyrong)! - Fix for when multiple entries reference different CSS, only the CSS referenced by the first entry will be packaged + +* [`9a4e2b2`](https://github.com/developit/microbundle/commit/9a4e2b2096d3824661738edb142b4658cf3d9d0b) [#954](https://github.com/developit/microbundle/pull/954) Thanks [@rschristian](https://github.com/rschristian)! - Bumps Node target to v12 + +- [`4ad4b76`](https://github.com/developit/microbundle/commit/4ad4b768f0ef6f434b753c4a42cdcfe85d01c404) [#967](https://github.com/developit/microbundle/pull/967) Thanks [@agilgur5](https://github.com/agilgur5)! - deps: upgrade rpt2 to latest v0.32.0 to fix monorepos + +* [`6018e58`](https://github.com/developit/microbundle/commit/6018e586b91125233026ca977a97b72bb6082ec6) [#956](https://github.com/developit/microbundle/pull/956) Thanks [@rschristian](https://github.com/rschristian)! - Silences warnings when using Node builtins with the 'node:...' protocol on imports. Warnings related to bare usage of these builtins were already silenced. + +- [`88241dd`](https://github.com/developit/microbundle/commit/88241ddf8fc3ac18cfc1ca8ced99a413f8d2b488) [#968](https://github.com/developit/microbundle/pull/968) Thanks [@PeterBurner](https://github.com/PeterBurner)! - deps: upgrade babel-plugin-transform-async-to-promises to latest v0.8.18 to fix #565 + +* [`e72377a`](https://github.com/developit/microbundle/commit/e72377a001cc5925ff25aadbe26fdb96a0dab3a4) [#964](https://github.com/developit/microbundle/pull/964) Thanks [@rschristian](https://github.com/rschristian)! - Fixes filename generation for es & modern outputs. Both 'jsnext:main' and 'esmodule' were incorrectly ignored. + +## 0.15.0 + +### Minor Changes + +- [`6f6e080`](https://github.com/developit/microbundle/commit/6f6e080f3b9ec9a223d79d24eb6e6c8dd5d72cf7) [#950](https://github.com/developit/microbundle/pull/950) Thanks [@rschristian](https://github.com/rschristian)! - Microbundle will now output ESM using `.mjs` as the file extension when the package type is CJS + +* [`242754f`](https://github.com/developit/microbundle/commit/242754f43cce1c25a6c475be64bbd2a525eb7cf0) [#949](https://github.com/developit/microbundle/pull/949) Thanks [@rschristian](https://github.com/rschristian)! - Add --visualize flag to generate build output stats + +### Patch Changes + +- [`c4532cc`](https://github.com/developit/microbundle/commit/c4532cc9ccd846e6bc8176414ddf2c0fc22af1f1) [#940](https://github.com/developit/microbundle/pull/940) Thanks [@rschristian](https://github.com/rschristian)! - Adds information about `--compress` flag's default value w/ different targets + +* [`b51b855`](https://github.com/developit/microbundle/commit/b51b855794866f3e6a0ef7dfc5672d5c1c717831) [#935](https://github.com/developit/microbundle/pull/935) Thanks [@mycoin](https://github.com/mycoin)! - Don't attempt to write build stats in watch mode when there has been a build error/sizeInfo is `undefined` + +- [`1d0e305`](https://github.com/developit/microbundle/commit/1d0e305d89ad010793c57fc451991a79907e1f3f) [#941](https://github.com/developit/microbundle/pull/941) Thanks [@rschristian](https://github.com/rschristian)! - Ensures TS plugin will begin its search for a 'tsconfig.json' in the set cwd + +* [`f04c85a`](https://github.com/developit/microbundle/commit/f04c85a1885a28a16c767665a1d5f17b13834406) [#926](https://github.com/developit/microbundle/pull/926) Thanks [@developit](https://github.com/developit)! - Fix mangle.json being overwritten with `[object Object]` + +- [`ecb0b02`](https://github.com/developit/microbundle/commit/ecb0b022912397bcf98550c1a783e9e0534f33e5) [#947](https://github.com/developit/microbundle/pull/947) Thanks [@rschristian](https://github.com/rschristian)! - Ensures hoisted node_modules are excluded from babel + +* [`392d63e`](https://github.com/developit/microbundle/commit/392d63ef437f25403c03826f77790722d0234b58) [#919](https://github.com/developit/microbundle/pull/919) Thanks [@rschristian](https://github.com/rschristian)! - Fixes CSS output from being overwritten when also generating .cjs + +- [`fb0a437`](https://github.com/developit/microbundle/commit/fb0a43780a7462f4876955c3412638e51a7adb97) [#930](https://github.com/developit/microbundle/pull/930) Thanks [@rschristian](https://github.com/rschristian)! - Documenting --jsxFragment flag + +* [`8223eba`](https://github.com/developit/microbundle/commit/8223ebaee8d750e9757b9ddbfef6384fa00f22ac) [#948](https://github.com/developit/microbundle/pull/948) Thanks [@rschristian](https://github.com/rschristian)! - Corrects formatting in build completion message w/ dynamic import is used + +## 0.14.2 + +### Patch Changes + +- [`dd0bdde`](https://github.com/developit/microbundle/commit/dd0bdde9c6ae7d0690fa73aead1c1744ae3b086a) [#904](https://github.com/developit/microbundle/pull/904) Thanks [@rschristian](https://github.com/rschristian)! - Added missing CLI doc for 'jsxImportSource' and correcting the Examples section of the '--help' output + +## 0.14.1 + +### Patch Changes + +- [`2a0ca88`](https://github.com/developit/microbundle/commit/2a0ca8843f34c3773bb41eb3f8f571fb6b2b2d52) [#882](https://github.com/developit/microbundle/pull/882) Thanks [@MiKr13](https://github.com/MiKr13)! - feat: :sparkles: Closes #497: preserve trailing newline in mangle.json + +* [`26f382a`](https://github.com/developit/microbundle/commit/26f382a989e86fdcc5149f73f7b6c9d314a4bf37) [#895](https://github.com/developit/microbundle/pull/895) Thanks [@rschristian](https://github.com/rschristian)! - Completion message shows pkg's actual name, rather than safe name + +## 0.14.0 + +### Minor Changes + +- [`1b61029`](https://github.com/developit/microbundle/commit/1b6102966440bd7000e0e457f8c0b7eeb7e05593) [#867](https://github.com/developit/microbundle/pull/867) Thanks [@bouchenoiremarc](https://github.com/bouchenoiremarc)! - - Add support for Module Workers with a new `--workers` flag + +### Patch Changes + +- [`5e93a0e`](https://github.com/developit/microbundle/commit/5e93a0e4cc28ea8f080a08e3a8530b6bfdf25f42) [#853](https://github.com/developit/microbundle/pull/853) Thanks [@developit](https://github.com/developit)! - Fix crash when traversing `"exports"` objects (#852) + +* [`96b85da`](https://github.com/developit/microbundle/commit/96b85da1e32b4ffbef9d83387ff399d8b3ee3852) [#887](https://github.com/developit/microbundle/pull/887) Thanks [@developit](https://github.com/developit)! - When using `--target node`, resolve "node" conditional Package Export keys, otherwise resolve "browser" keys. + +- [`5d0465b`](https://github.com/developit/microbundle/commit/5d0465b39bccff31673d351fc9d29cb4c470407d) [#875](https://github.com/developit/microbundle/pull/875) Thanks [@dwightjack](https://github.com/dwightjack)! - Preserve terser annotations in compressed bundle + +* [`b1a6374`](https://github.com/developit/microbundle/commit/b1a637486234a2ae784ccf0c512321e2d3efef7c) [#858](https://github.com/developit/microbundle/pull/858) Thanks [@bouchenoiremarc](https://github.com/bouchenoiremarc)! - - Allow the minify options `compress` and `mangle` to be set as booleans + +- [`2980336`](https://github.com/developit/microbundle/commit/29803364fe54cc1a7a8543d61e694c90b4cdce6a) [#865](https://github.com/developit/microbundle/pull/865) Thanks [@rschristian](https://github.com/rschristian)! - Expands generateTypes flag to support libs with TS entrypoints + ## 0.13.3 ### Patch Changes diff --git a/README.md b/README.md index 42d786cc..e8dc7bff 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@

Microbundle - npm travis + npm travis licenses

The zero-configuration bundler for tiny modules, powered by Rollup.

@@ -38,16 +38,19 @@ ```jsonc { - "name": "foo", // your package name + "name": "foo", // your package name "type": "module", - "source": "src/foo.js", // your source code - "exports": "./dist/foo.modern.js", // where to generate the modern bundle (see below) - "main": "./dist/foo.cjs", // where to generate the CommonJS bundle - "module": "./dist/foo.module.js", // where to generate the ESM bundle - "unpkg": "./dist/foo.umd.js", // where to generate the UMD bundle (also aliased as "umd:main") + "source": "src/foo.js", // your source code + "exports": { + "require": "./dist/foo.cjs", // used for require() in Node 12+ + "default": "./dist/foo.modern.js" // where to generate the modern bundle (see below) + }, + "main": "./dist/foo.cjs", // where to generate the CommonJS bundle + "module": "./dist/foo.module.js", // where to generate the ESM bundle + "unpkg": "./dist/foo.umd.js", // where to generate the UMD bundle (also aliased as "umd:main") "scripts": { - "build": "microbundle", // compiles "source" to "main"/"module"/"unpkg" - "dev": "microbundle watch" // re-build when source files change + "build": "microbundle", // compiles "source" to "main"/"module"/"unpkg" + "dev": "microbundle watch" // re-build when source files change } } ``` @@ -117,8 +120,8 @@ export default function (e, t, r) { ```jsonc { "main": "./dist/foo.umd.js", // legacy UMD output (for Node & CDN use) - "module": "./dist/foo.module.js", // legacy ES Modules output (for bundlers) - "exports": "./dist/foo.modern.js", // modern ES2017 output + "module": "./dist/foo.module.mjs", // legacy ES Modules output (for bundlers) + "exports": "./dist/foo.modern.mjs", // modern ES2017 output "scripts": { "build": "microbundle src/foo.js" } @@ -131,9 +134,9 @@ The `"exports"` field can also be an object for packages with multiple entry mod { "name": "foo", "exports": { - ".": "./dist/foo.modern.js", // import "foo" (the default) - "./lite": "./dist/lite.modern.js", // import "foo/lite" - "./full": "./dist/full.modern.js" // import "foo/full" + ".": "./dist/foo.modern.mjs", // import "foo" (the default) + "./lite": "./dist/lite.modern.mjs", // import "foo/lite" + "./full": "./dist/full.modern.mjs" // import "foo/full" }, "scripts": { "build": "microbundle src/*.js" // build foo.js, lite.js and full.js @@ -160,15 +163,16 @@ The filenames and paths for generated bundles in each format are defined by the ```jsonc { - "source": "src/index.js", // input - "main": "dist/foo.js", // CommonJS output bundle - "umd:main": "dist/foo.umd.js", // UMD output bundle - "module": "dist/foo.m.js", // ES Modules output bundle + "source": "src/index.js", // input + "main": "dist/foo.js", // CommonJS output bundle + "umd:main": "dist/foo.umd.js", // UMD output bundle + "module": "dist/foo.mjs", // ES Modules output bundle "exports": { - "require": "./dist/foo.js", // CommonJS output bundle - "default": "./dist/foo.modern.js", // Modern ES Modules output bundle + "types": "./dist/foo.d.ts", // TypeScript typings for NodeNext modules + "require": "./dist/foo.js", // CommonJS output bundle + "default": "./dist/foo.modern.mjs", // Modern ES Modules output bundle }, - "types": "dist/foo.d.ts" // TypeScript typings directory + "types": "dist/foo.d.ts" // TypeScript typings } ``` @@ -176,7 +180,7 @@ When deciding which bundle to use, Node.js 12+ and webpack 5+ will prefer the `e For more information about the meaning of the different properties, refer to the [Node.js documentation](https://nodejs.org/api/packages.html#packages_package_entry_points). For UMD builds, microbundle will use a camelCase version of the `name` field in your `package.json` as export name. -Alternatively, this can be explicitly by adding an `"amdName"` key in your `package.json`, or passing the `--name` command line argument. +Alternatively, this can be explicitly set by adding an `"amdName"` key in your `package.json`, or passing the `--name` command line argument. ### Usage with `{"type":"module"}` in `package.json` @@ -223,8 +227,12 @@ Just point the input to a `.ts` file through either the cli or the `source` key Microbundle will generally respect your TypeScript config defined in a `tsconfig.json` file with notable exceptions being the "[target](https://www.typescriptlang.org/tsconfig#target)" and "[module](https://www.typescriptlang.org/tsconfig#module)" settings. To ensure your TypeScript configuration matches the configuration that Microbundle uses internally it's strongly recommended that you set `"module": "ESNext"` and `"target": "ESNext"` in your `tsconfig.json`. +To ensure Microbundle does not process extraneous files, by default it only includes your entry point. If you want to include other files for compilation, such as ambient declarations, make sure to add either "[files](https://www.typescriptlang.org/tsconfig#files)" or "[include](https://www.typescriptlang.org/tsconfig#include)" into your `tsconfig.json`. + If you're using TypeScript with CSS Modules, you will want to set `"include": ["node_modules/microbundle/index.d.ts"]` in your `tsconfig.json` to tell TypeScript how to handle your CSS Module imports. +To ensure that your module's `.d.ts` type info is visible to other TypeScript projects that use [`moduleResolution: 'NodeNext'`](https://www.typescriptlang.org/docs/handbook/esm-node.html), add a [`types` key](https://www.typescriptlang.org/docs/handbook/esm-node.html#packagejson-exports-imports-and-self-referencing) to your `package.json`'s corresponding `exports` mapping. + ### CSS and CSS Modules Importing CSS files is supported via `import "./foo.css"`. By default, generated CSS output is written to disk. The `--css inline` command line option will inline generated CSS into your bundles as a string, returning the CSS string from the import: @@ -253,6 +261,30 @@ This can be customized by passing the command line argument `--css-modules "[nam | true | import './my-file.css'; | :white_check_mark: | | true | import './my-file.module.css'; | :white_check_mark: | +### Building Module Workers + +Microbundle is able to detect and bundle Module Workers when generating bundles in the +`esm` and `modern` formats. To use this feature, instantiate your Web Worker as follows: + +```js +worker = new Worker(new URL('./worker.js', import.meta.url), { type: 'module' }); +// or simply: +worker = new Worker('./worker.js', { type: 'module' }); +``` + +... then add the `--workers` flag to your build command: + +```bash +microbundle --workers +``` + +For more information see +[@surma/rollup-plugin-off-main-thread](https://github.com/surma/rollup-plugin-off-main-thread#config). + +### Visualize Bundle Makeup + +Use the `--visualize` flag to generate a `stats.html` file at build time, showing the makeup of your bundle. Uses [rollup-plugin-visualizer](https://www.npmjs.com/package/rollup-plugin-visualizer). + ### Mangling Properties To achieve the smallest possible bundle size, libraries often wish to rename internal object properties or class members to smaller names - transforming `this._internalIdValue` to `this._i`. Microbundle doesn't do this by default, however it can be enabled by creating a `mangle.json` file (or a `"mangle"` property in your package.json). Within that file, you can specify a regular expression pattern to control which properties should be mangled. For example: to mangle all property names beginning an underscore: @@ -303,19 +335,21 @@ Options --globals Specify globals dependencies, or 'none' --define Replace constants with hard-coded values (use @key=exp to replace an expression) --alias Map imports to different modules - --compress Compress output using Terser - --no-compress Disable output compressing + --compress Compress output using Terser (default true when --target is web, false when --target is node) --strict Enforce undefined global context and add "use strict" --name Specify name exposed in UMD and IIFE builds --cwd Use an alternative working directory (default .) --sourcemap Generate source map (default true) --raw Show raw byte size (default false) - --jsx A custom JSX pragma like React.createElement (default: h) - --jsxImportSource Specify the automatic import source for JSX like preact + --jsx A custom JSX pragma like React.createElement (default h) + --jsxFragment A custom JSX fragment pragma like React.Fragment (default Fragment) + --jsxImportSource Declares the module specifier to be used for importing jsx factory functions --tsconfig Specify the path to a custom tsconfig.json --generateTypes Whether or not to generate types, if `types` or `typings` is set in `package.json` then it will default to be `true` - --css Where to output CSS: "inline" or "external" (default: "external") - --css-modules Configures .css to be treated as modules (default: null) + --css Where to output CSS: "inline" or "external" (default "external") + --css-modules Configures .css to be treated as modules (default null) + --workers Bundle module workers - see https://github.com/surma/rollup-plugin-off-main-thread#auto-bundling (default false) + --visualize Generate bundle makeup visualization (stats.html) -h, --help Displays this message Examples @@ -341,14 +375,20 @@ Here's what's coming up for Microbundle: - [Microenvi](https://github.com/fwilkerson/microenvi) Bundle, serve, and hot reload with one command. - [Theme UI](https://github.com/system-ui/theme-ui) Build consistent, themeable React apps based on constraint-based design principles. - [react-recomponent](https://github.com/philipp-spiess/react-recomponent) Reason-style reducer components for React using ES6 classes. -- [brazilian-utils](https://github.com/brazilian-utils/brazilian-utils) Utils library for specific Brazilian businesses. - [react-hooks-lib](https://github.com/beizhedenglong/react-hooks-lib) A set of reusable react hooks. - [mdx-deck-live-code](https://github.com/JReinhold/mdx-deck-live-code) A library for [mdx-deck](https://github.com/jxnblk/mdx-deck) to do live React and JS coding directly in slides. - [react-router-ext](https://github.com/ri7nz/react-router-ext) An Extended [react-router-dom](https://github.com/ReactTraining/react-router/tree/master/packages/react-router-dom) with simple usage. - [routex.js](https://github.com/alexhoma/routex.js) A dynamic routing library for Next.js. - [hooked-form](https://github.com/JoviDeCroock/hooked-form) A lightweight form-management library for React. - [goober](https://github.com/cristianbote/goober) Less than 1KB css-in-js alternative with a familiar API. -- [react-model](https://github.com/byte-fe/react-model) The next generation state management library for React +- [react-model](https://github.com/byte-fe/react-model) The next generation state management library for React. +- [Teaful](https://github.com/teafuljs/teaful) Tiny, easy and powerful (P)React state management. +- [@studio-freight/lenis](https://github.com/studio-freight/lenis) Tiny, Performant, Vanilla JS, Smooth Scroll library. +- [@studio-freight/tempus](https://github.com/studio-freight/tempus) One rAF to rule them all. +- [@studio-freight/hamo](https://github.com/studio-freight/hamo) Collection of React hooks. +- [glTF Transform](https://github.com/donmccurdy/glTF-Transform) Library for working with .gltf and .glb 3D models. +- [eta](https://github.com/eta-dev/eta) Lightweight, powerful, pluggable embedded JS template engine +- [swup](https://github.com/swup/swup) Page transition library for server-rendered websites. ## 🥂 License diff --git a/appveyor.yml b/appveyor.yml deleted file mode 100644 index d0190667..00000000 --- a/appveyor.yml +++ /dev/null @@ -1,16 +0,0 @@ -environment: - nodejs_version: "10" - -install: - - ps: Install-Product node $env:nodejs_version - - npm install - -test_script: - - node --version - - npm --version - - npm test - -build: false - -cache: - - node_modules diff --git a/bors.toml b/bors.toml deleted file mode 100644 index 7209cc0e..00000000 --- a/bors.toml +++ /dev/null @@ -1,5 +0,0 @@ -status = [ - "continuous-integration/travis-ci/push", -] -delete_merged_branches = true -use_squash_merge = true diff --git a/package-lock.json b/package-lock.json index b554eb0e..6603abea 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,11 +1,12 @@ { "name": "microbundle", - "version": "0.13.1", + "version": "0.15.1", "lockfileVersion": 2, "requires": true, "packages": { "": { - "version": "0.13.1", + "name": "microbundle", + "version": "0.15.1", "license": "MIT", "dependencies": { "@babel/core": "^7.12.10", @@ -23,10 +24,11 @@ "@rollup/plugin-commonjs": "^17.0.0", "@rollup/plugin-json": "^4.1.0", "@rollup/plugin-node-resolve": "^11.0.1", + "@surma/rollup-plugin-off-main-thread": "^2.2.2", "asyncro": "^3.0.0", "autoprefixer": "^10.1.0", "babel-plugin-macros": "^3.0.1", - "babel-plugin-transform-async-to-promises": "^0.8.15", + "babel-plugin-transform-async-to-promises": "^0.8.18", "babel-plugin-transform-replace-expressions": "^0.2.0", "brotli-size": "^4.0.0", "builtin-modules": "^3.1.0", @@ -36,13 +38,15 @@ "gzip-size": "^6.0.0", "kleur": "^4.1.3", "lodash.merge": "^4.6.2", + "magic-string": "^0.25.9", "postcss": "^8.2.1", "pretty-bytes": "^5.4.1", "rollup": "^2.35.1", "rollup-plugin-bundle-size": "^1.0.3", "rollup-plugin-postcss": "^4.0.0", "rollup-plugin-terser": "^7.0.2", - "rollup-plugin-typescript2": "^0.29.0", + "rollup-plugin-typescript2": "^0.32.0", + "rollup-plugin-visualizer": "^5.6.0", "sade": "^1.7.4", "terser": "^5.7.0", "tiny-glob": "^0.2.8", @@ -75,8 +79,7 @@ "regenerator-runtime": "^0.13.7", "rimraf": "^3.0.2", "shell-quote": "^1.7.2", - "strip-ansi": "^6.0.0", - "travis-size-report": "^1.1.0" + "strip-ansi": "^6.0.0" } }, "node_modules/@babel/cli": { @@ -367,14 +370,6 @@ "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.628.tgz", "integrity": "sha512-fmhO4YGo/kapy+xL9Eq/cZwDASaTHZu3psIFYo4yc+RY1LzbZr84xjKlDImDrlrmWhOxsrDi98nX097U/xK/cQ==" }, - "node_modules/@babel/helper-compilation-targets/node_modules/escalade": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", - "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", - "engines": { - "node": ">=6" - } - }, "node_modules/@babel/helper-compilation-targets/node_modules/node-releases": { "version": "1.1.67", "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.67.tgz", @@ -3225,15 +3220,6 @@ "node": ">= 10.0.0" } }, - "node_modules/@rollup/plugin-node-resolve/node_modules/resolve": { - "version": "1.19.0", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.19.0.tgz", - "integrity": "sha512-rArEXAgsBG4UgRGcynxWIWKFvh/XZCcS8UJdHhwy91zwAvCZIbcs+vAbflgBnNjYMs/i/i+/Ux6IZhML1yPvxg==", - "dependencies": { - "is-core-module": "^2.1.0", - "path-parse": "^1.0.6" - } - }, "node_modules/@rollup/pluginutils": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-3.1.0.tgz", @@ -3265,6 +3251,16 @@ "@sinonjs/commons": "^1.7.0" } }, + "node_modules/@surma/rollup-plugin-off-main-thread": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/@surma/rollup-plugin-off-main-thread/-/rollup-plugin-off-main-thread-2.2.2.tgz", + "integrity": "sha512-dOD6nGZ79RmWKDRQuC7SOGXMvDkkLwBogu+epfVFMKiy2kOUtLZkb8wV/ettuMt37YJAJKYCKUmxSbZL2LkUQg==", + "dependencies": { + "ejs": "^3.1.6", + "json5": "^2.2.0", + "magic-string": "^0.25.0" + } + }, "node_modules/@types/babel__core": { "version": "7.1.12", "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.1.12.tgz", @@ -3748,6 +3744,11 @@ "node": ">=4" } }, + "node_modules/async": { + "version": "0.9.2", + "resolved": "https://registry.npmjs.org/async/-/async-0.9.2.tgz", + "integrity": "sha1-rqdNXmHB+JlhO/ZL2mbUx48v0X0=" + }, "node_modules/async-each": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/async-each/-/async-each-1.0.3.tgz", @@ -3834,14 +3835,6 @@ "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.628.tgz", "integrity": "sha512-fmhO4YGo/kapy+xL9Eq/cZwDASaTHZu3psIFYo4yc+RY1LzbZr84xjKlDImDrlrmWhOxsrDi98nX097U/xK/cQ==" }, - "node_modules/autoprefixer/node_modules/escalade": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", - "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", - "engines": { - "node": ">=6" - } - }, "node_modules/autoprefixer/node_modules/node-releases": { "version": "1.1.67", "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.67.tgz", @@ -4015,19 +4008,10 @@ "npm": ">=6" } }, - "node_modules/babel-plugin-macros/node_modules/resolve": { - "version": "1.19.0", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.19.0.tgz", - "integrity": "sha512-rArEXAgsBG4UgRGcynxWIWKFvh/XZCcS8UJdHhwy91zwAvCZIbcs+vAbflgBnNjYMs/i/i+/Ux6IZhML1yPvxg==", - "dependencies": { - "is-core-module": "^2.1.0", - "path-parse": "^1.0.6" - } - }, "node_modules/babel-plugin-transform-async-to-promises": { - "version": "0.8.15", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-async-to-promises/-/babel-plugin-transform-async-to-promises-0.8.15.tgz", - "integrity": "sha512-fDXP68ZqcinZO2WCiimCL9zhGjGXOnn3D33zvbh+yheZ/qOrNVVDDIBtAaM3Faz8TRvQzHiRKsu3hfrBAhEncQ==" + "version": "0.8.18", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-async-to-promises/-/babel-plugin-transform-async-to-promises-0.8.18.tgz", + "integrity": "sha512-WpOrF76nUHijnNn10eBGOHZmXQC8JYRME9rOLxStOga7Av2VO53ehVFvVNImMksVtQuL2/7ZNxEgxnx7oo/3Hw==" }, "node_modules/babel-plugin-transform-replace-expressions": { "version": "0.2.0", @@ -5033,14 +5017,6 @@ "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.628.tgz", "integrity": "sha512-fmhO4YGo/kapy+xL9Eq/cZwDASaTHZu3psIFYo4yc+RY1LzbZr84xjKlDImDrlrmWhOxsrDi98nX097U/xK/cQ==" }, - "node_modules/core-js-compat/node_modules/escalade": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", - "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", - "engines": { - "node": ">=6" - } - }, "node_modules/core-js-compat/node_modules/node-releases": { "version": "1.1.67", "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.67.tgz", @@ -5709,6 +5685,14 @@ "clone": "^1.0.2" } }, + "node_modules/define-lazy-prop": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/define-lazy-prop/-/define-lazy-prop-2.0.0.tgz", + "integrity": "sha512-Ds09qNh8yw3khSjiJjiUInaGX9xlqZDY7JVryGxdxV7NPeuqQfplOpQ66yJFZut3jLa5zOwkXw1g9EI2uKh4Og==", + "engines": { + "node": ">=8" + } + }, "node_modules/define-properties": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", @@ -5924,6 +5908,20 @@ "safer-buffer": "^2.1.0" } }, + "node_modules/ejs": { + "version": "3.1.6", + "resolved": "https://registry.npmjs.org/ejs/-/ejs-3.1.6.tgz", + "integrity": "sha512-9lt9Zse4hPucPkoP7FHDF0LQAlGyF9JVpnClFLFH3aSSbxmyoqINRpp/9wePWJTUl4KOQwRL72Iw3InHPDkoGw==", + "dependencies": { + "jake": "^10.6.1" + }, + "bin": { + "ejs": "bin/cli.js" + }, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/electron-to-chromium": { "version": "1.3.496", "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.496.tgz", @@ -5941,8 +5939,7 @@ "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 + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" }, "node_modules/emojis-list": { "version": "3.0.0", @@ -6021,9 +6018,9 @@ } }, "node_modules/escalade": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.0.2.tgz", - "integrity": "sha512-gPYAU37hYCUhW5euPeR+Y74F7BL+IBsV93j5cvGriSaD1aG6MGsqsV1yamRdrWrb2j3aiZvb0X+UBOWpx3JWtQ==", + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", + "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", "engines": { "node": ">=6" } @@ -7103,6 +7100,14 @@ "node": "^10.12.0 || >=12.0.0" } }, + "node_modules/filelist": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/filelist/-/filelist-1.0.2.tgz", + "integrity": "sha512-z7O0IS8Plc39rTCq6i6iHxk43duYOn8uFJiWSewIq0Bww1RNybVHSCjahmcC87ZqAm4OTvFzlzeGu3XAzG1ctQ==", + "dependencies": { + "minimatch": "^3.0.4" + } + }, "node_modules/filesize": { "version": "6.1.0", "resolved": "https://registry.npmjs.org/filesize/-/filesize-6.1.0.tgz", @@ -7139,9 +7144,9 @@ } }, "node_modules/find-cache-dir": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-3.3.1.tgz", - "integrity": "sha512-t2GDMt3oGC/v+BMwzmllWDuJF/xcDtE5j/fCGbqDD7OLuJkj0cfh1YSA5VKPvwMeLFLNDBkwOKZ2X85jGLVftQ==", + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-3.3.2.tgz", + "integrity": "sha512-wXZV5emFEjrridIgED11OoUKLxiYjAcqot/NJdAkOhlJ+vGzwhOAfcG5OX1jP+S0PcjEn8bdMJv+g2jwQ3Onig==", "dependencies": { "commondir": "^1.0.1", "make-dir": "^3.0.2", @@ -7149,6 +7154,9 @@ }, "engines": { "node": ">=8" + }, + "funding": { + "url": "https://github.com/avajs/find-cache-dir?sponsor=1" } }, "node_modules/find-root": { @@ -7409,7 +7417,6 @@ "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.*" } @@ -8100,11 +8107,14 @@ } }, "node_modules/is-core-module": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.2.0.tgz", - "integrity": "sha512-XRAfAdyyY5F5cOXn7hYQDqh2Xmii+DEfIcQGxK/uNwMHhIkPWO0g8msXcbzLe+MpGoR951MlqM/2iIlU4vKDdQ==", + "version": "2.9.0", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.9.0.tgz", + "integrity": "sha512-+5FPy5PnwmO3lvfMb0AsoPaBG+5KHUI0wYFXOtYPnVVVspTFUuMZNfNaNVRt3FZadstu2c8x23vykRW/NBoU6A==", "dependencies": { "has": "^1.0.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, "node_modules/is-data-descriptor": { @@ -8174,8 +8184,6 @@ "version": "2.1.1", "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-2.1.1.tgz", "integrity": "sha512-ZOoqiXfEwtGknTiuDEy8pN2CfE3TxMHprvNer1mXiqwkOT77Rw3YVrUQ52EqAOU3QAWDQ+bQdx7HJzrv7LS2Hw==", - "dev": true, - "optional": true, "bin": { "is-docker": "cli.js" }, @@ -8407,8 +8415,6 @@ "version": "2.2.0", "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-2.2.0.tgz", "integrity": "sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==", - "dev": true, - "optional": true, "dependencies": { "is-docker": "^2.0.0" }, @@ -8547,6 +8553,23 @@ "node": ">=8" } }, + "node_modules/jake": { + "version": "10.8.2", + "resolved": "https://registry.npmjs.org/jake/-/jake-10.8.2.tgz", + "integrity": "sha512-eLpKyrfG3mzvGE2Du8VoPbeSkRry093+tyNjdYaBbJS9v17knImYGNXQCUV0gLxQtF82m3E8iRb/wdSQZLoq7A==", + "dependencies": { + "async": "0.9.x", + "chalk": "^2.4.2", + "filelist": "^1.0.1", + "minimatch": "^3.0.4" + }, + "bin": { + "jake": "bin/cli.js" + }, + "engines": { + "node": "*" + } + }, "node_modules/jest": { "version": "26.6.3", "resolved": "https://registry.npmjs.org/jest/-/jest-26.6.3.tgz", @@ -9632,16 +9655,6 @@ "node": ">=8" } }, - "node_modules/jest-resolve/node_modules/resolve": { - "version": "1.19.0", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.19.0.tgz", - "integrity": "sha512-rArEXAgsBG4UgRGcynxWIWKFvh/XZCcS8UJdHhwy91zwAvCZIbcs+vAbflgBnNjYMs/i/i+/Ux6IZhML1yPvxg==", - "dev": true, - "dependencies": { - "is-core-module": "^2.1.0", - "path-parse": "^1.0.6" - } - }, "node_modules/jest-resolve/node_modules/supports-color": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", @@ -10545,9 +10558,9 @@ "dev": true }, "node_modules/json5": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/json5/-/json5-2.1.3.tgz", - "integrity": "sha512-KXPvOm8K9IJKFM0bmdn8QXh7udDh1g/giieX0NLCaMnb4hEiVFqnop2ImTXCc5e0/oHz3LTqmHGtExn5hfMkOA==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.0.tgz", + "integrity": "sha512-f+8cldu7X/y7RAJurMEJmdoKXGB/X550w2Nr3tTbezL6RwEE/iMcm+tZnXeoZtKuOq6ft8+CqzEkrIgx1fPoQA==", "dependencies": { "minimist": "^1.2.5" }, @@ -10562,6 +10575,7 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", "integrity": "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=", + "dev": true, "dependencies": { "graceful-fs": "^4.1.6" } @@ -11307,11 +11321,12 @@ } }, "node_modules/magic-string": { - "version": "0.25.7", - "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.25.7.tgz", - "integrity": "sha512-4CrMT5DOHTDk4HYDlzmwu4FVCcIYI8gauveasrdCu2IKIFOJ3f0v/8MDGJCDL9oD2ppz/Av1b0Nj345H9M+XIA==", + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.25.9.tgz", + "integrity": "sha512-RmF0AsMzgt25qzqqLc1+MbHmhdx0ojF2Fvs4XnOqz2ZOBXzzkEwc/dJQZCYHAn7v1jbVOjAZfK8msRn4BxO4VQ==", + "license": "MIT", "dependencies": { - "sourcemap-codec": "^1.4.4" + "sourcemap-codec": "^1.4.8" } }, "node_modules/make-dir": { @@ -11663,9 +11678,9 @@ "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" }, "node_modules/nanoid": { - "version": "3.1.20", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.1.20.tgz", - "integrity": "sha512-a1cQNyczgKbLX9jwbS/+d7W8fX/RfgYR7lVWwWOGIPNgK2m0MWvrGF6/m4kk6U3QcFMnZf3RIhL0v2Jgh/0Uxw==", + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.3.tgz", + "integrity": "sha512-p1sjXuopFs0xg+fPASzQ28agW1oHD7xDsd9Xkf3T15H3c/cifrFHVwrh74PdoklAPi+i7MdRsE47vm2r6JoB+w==", "bin": { "nanoid": "bin/nanoid.cjs" }, @@ -12629,6 +12644,22 @@ "node": ">=6" } }, + "node_modules/open": { + "version": "8.4.0", + "resolved": "https://registry.npmjs.org/open/-/open-8.4.0.tgz", + "integrity": "sha512-XgFPPM+B28FtCCgSb9I+s9szOC1vZRSwgWsRUA5ylIxRTgKozqjOCrVOqGsYABPYK5qnfqClxZTFBa8PKt2v6Q==", + "dependencies": { + "define-lazy-prop": "^2.0.0", + "is-docker": "^2.1.1", + "is-wsl": "^2.2.0" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/opencollective-postinstall": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/opencollective-postinstall/-/opencollective-postinstall-2.0.3.tgz", @@ -12843,9 +12874,9 @@ } }, "node_modules/path-parse": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz", - "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==" + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==" }, "node_modules/path-type": { "version": "4.0.0", @@ -14994,7 +15025,6 @@ "version": "2.1.1", "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", - "dev": true, "engines": { "node": ">=0.10.0" } @@ -15006,11 +15036,19 @@ "dev": true }, "node_modules/resolve": { - "version": "1.17.0", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.17.0.tgz", - "integrity": "sha512-ic+7JYiV8Vi2yzQGFWOkiZD5Z9z7O2Zhm9XMaTxdJExKasieFCr+yXZ/WmXsckHiKl12ar0y6XiXDx3m4RHn1w==", + "version": "1.22.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.0.tgz", + "integrity": "sha512-Hhtrw0nLeSrFQ7phPp4OOcVjLPIeMnRlr5mcnVuMe7M/7eBn98A3hmFRLoFo3DLZkivSYwhRUJTyPyWAk56WLw==", "dependencies": { - "path-parse": "^1.0.6" + "is-core-module": "^2.8.1", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" + }, + "bin": { + "resolve": "bin/resolve" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, "node_modules/resolve-cwd": { @@ -15245,15 +15283,6 @@ "node": ">=8" } }, - "node_modules/rollup-plugin-postcss/node_modules/resolve": { - "version": "1.19.0", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.19.0.tgz", - "integrity": "sha512-rArEXAgsBG4UgRGcynxWIWKFvh/XZCcS8UJdHhwy91zwAvCZIbcs+vAbflgBnNjYMs/i/i+/Ux6IZhML1yPvxg==", - "dependencies": { - "is-core-module": "^2.1.0", - "path-parse": "^1.0.6" - } - }, "node_modules/rollup-plugin-postcss/node_modules/supports-color": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", @@ -15277,34 +15306,207 @@ } }, "node_modules/rollup-plugin-typescript2": { - "version": "0.29.0", - "resolved": "https://registry.npmjs.org/rollup-plugin-typescript2/-/rollup-plugin-typescript2-0.29.0.tgz", - "integrity": "sha512-YytahBSZCIjn/elFugEGQR5qTsVhxhUwGZIsA9TmrSsC88qroGo65O5HZP/TTArH2dm0vUmYWhKchhwi2wL9bw==", + "version": "0.32.0", + "resolved": "https://registry.npmjs.org/rollup-plugin-typescript2/-/rollup-plugin-typescript2-0.32.0.tgz", + "integrity": "sha512-sIiCObzETQagImlNa/xVZY2aKB/7w77EzKAzpmVkXZbDuso6PrW2hdQv6m4/UuMqnzqTFWGF4FPLbVuQISeYZw==", "dependencies": { - "@rollup/pluginutils": "^3.1.0", - "find-cache-dir": "^3.3.1", - "fs-extra": "8.1.0", - "resolve": "1.17.0", - "tslib": "2.0.1" + "@rollup/pluginutils": "^4.1.2", + "find-cache-dir": "^3.3.2", + "fs-extra": "^10.0.0", + "resolve": "^1.20.0", + "tslib": "^2.4.0" + }, + "peerDependencies": { + "rollup": ">=1.26.3", + "typescript": ">=2.4.0" } }, + "node_modules/rollup-plugin-typescript2/node_modules/@rollup/pluginutils": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-4.2.1.tgz", + "integrity": "sha512-iKnFXr7NkdZAIHiIWE+BX5ULi/ucVFYWD6TbAV+rZctiRTY2PL6tsIKhoIOaoskiWAkgu+VsbXgUVDNLHf+InQ==", + "dependencies": { + "estree-walker": "^2.0.1", + "picomatch": "^2.2.2" + }, + "engines": { + "node": ">= 8.0.0" + } + }, + "node_modules/rollup-plugin-typescript2/node_modules/estree-walker": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-2.0.2.tgz", + "integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==" + }, "node_modules/rollup-plugin-typescript2/node_modules/fs-extra": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz", - "integrity": "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==", + "version": "10.1.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.1.0.tgz", + "integrity": "sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ==", "dependencies": { "graceful-fs": "^4.2.0", - "jsonfile": "^4.0.0", - "universalify": "^0.1.0" + "jsonfile": "^6.0.1", + "universalify": "^2.0.0" }, "engines": { - "node": ">=6 <7 || >=8" + "node": ">=12" + } + }, + "node_modules/rollup-plugin-typescript2/node_modules/jsonfile": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", + "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==", + "dependencies": { + "universalify": "^2.0.0" + }, + "optionalDependencies": { + "graceful-fs": "^4.1.6" + } + }, + "node_modules/rollup-plugin-typescript2/node_modules/universalify": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz", + "integrity": "sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==", + "engines": { + "node": ">= 10.0.0" } }, - "node_modules/rollup-plugin-typescript2/node_modules/tslib": { + "node_modules/rollup-plugin-visualizer": { + "version": "5.6.0", + "resolved": "https://registry.npmjs.org/rollup-plugin-visualizer/-/rollup-plugin-visualizer-5.6.0.tgz", + "integrity": "sha512-CKcc8GTUZjC+LsMytU8ocRr/cGZIfMR7+mdy4YnlyetlmIl/dM8BMnOEpD4JPIGt+ZVW7Db9ZtSsbgyeBH3uTA==", + "dependencies": { + "nanoid": "^3.1.32", + "open": "^8.4.0", + "source-map": "^0.7.3", + "yargs": "^17.3.1" + }, + "bin": { + "rollup-plugin-visualizer": "dist/bin/cli.js" + }, + "engines": { + "node": ">=12" + }, + "peerDependencies": { + "rollup": "^2.0.0" + } + }, + "node_modules/rollup-plugin-visualizer/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/rollup-plugin-visualizer/node_modules/cliui": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", + "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^7.0.0" + } + }, + "node_modules/rollup-plugin-visualizer/node_modules/color-convert": { "version": "2.0.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.0.1.tgz", - "integrity": "sha512-SgIkNheinmEBgx1IUNirK0TUD4X9yjjBRTqqjggWCU3pUEqIk3/Uwl3yRixYKT6WjQuGiwDv4NomL3wqRCj+CQ==" + "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/rollup-plugin-visualizer/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/rollup-plugin-visualizer/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/rollup-plugin-visualizer/node_modules/source-map": { + "version": "0.7.3", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.3.tgz", + "integrity": "sha512-CkCj6giN3S+n9qrYiBTX5gystlENnRW5jZeNLHpe6aue+SrHcG5VYwujhW9s4dY31mEGsxBDrHR6oI69fTXsaQ==", + "engines": { + "node": ">= 8" + } + }, + "node_modules/rollup-plugin-visualizer/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/rollup-plugin-visualizer/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==", + "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/rollup-plugin-visualizer/node_modules/y18n": { + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", + "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", + "engines": { + "node": ">=10" + } + }, + "node_modules/rollup-plugin-visualizer/node_modules/yargs": { + "version": "17.4.1", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.4.1.tgz", + "integrity": "sha512-WSZD9jgobAg3ZKuCQZSa3g9QOJeCCqLoLAykiWgmXnDo9EPnn4RPf5qVTtzgOx66o6/oqhcA5tHtJXpG8pMt3g==", + "dependencies": { + "cliui": "^7.0.2", + "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.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/rollup-plugin-visualizer/node_modules/yargs-parser": { + "version": "21.0.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.0.1.tgz", + "integrity": "sha512-9BK1jFpLzJROCI5TzwZL/TU4gqjK5xiHV/RfWLOahrjAko/e4DJkRDZQXfvqAsiZzzYhgAzbgz6lg48jcm4GLg==", + "engines": { + "node": ">=12" + } }, "node_modules/rollup-pluginutils": { "version": "2.8.2", @@ -15850,7 +16052,8 @@ "node_modules/sourcemap-codec": { "version": "1.4.8", "resolved": "https://registry.npmjs.org/sourcemap-codec/-/sourcemap-codec-1.4.8.tgz", - "integrity": "sha512-9NykojV5Uih4lgo5So5dtw+f0JgJX30KCNI8gwhz2J9A15wD0Ml6tjHKwf6fTSa6fAdVBdZeNOs9eJ71qCk8vA==" + "integrity": "sha512-9NykojV5Uih4lgo5So5dtw+f0JgJX30KCNI8gwhz2J9A15wD0Ml6tjHKwf6fTSa6fAdVBdZeNOs9eJ71qCk8vA==", + "deprecated": "Please use @jridgewell/sourcemap-codec instead" }, "node_modules/spawndamnit": { "version": "2.0.0", @@ -16127,22 +16330,20 @@ } }, "node_modules/strip-ansi": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", - "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", - "dev": true, + "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.0" + "ansi-regex": "^5.0.1" }, "engines": { "node": ">=8" } }, "node_modules/strip-ansi/node_modules/ansi-regex": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", - "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", - "dev": true, + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", "engines": { "node": ">=8" } @@ -16303,6 +16504,17 @@ "node": ">=8" } }, + "node_modules/supports-preserve-symlinks-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", + "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/svgo": { "version": "1.3.2", "resolved": "https://registry.npmjs.org/svgo/-/svgo-1.3.2.tgz", @@ -16587,69 +16799,6 @@ "node": ">=8" } }, - "node_modules/travis-size-report": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/travis-size-report/-/travis-size-report-1.1.0.tgz", - "integrity": "sha512-mAMeCPZ1TvUEXDvweVCAG/ek6KgPeVsmQYXtv6I85UoIUIFAI/mCXnN7vyvTSCjIa8B0+cYn5slvqNn9Jo0U0g==", - "dev": true, - "dependencies": { - "chalk": "^2.4.2", - "escape-string-regexp": "^2.0.0", - "glob": "^7.1.3", - "gzip-size": "^5.1.0", - "minimist": "^1.2.0", - "node-fetch": "^2.3.0", - "pretty-bytes": "^5.1.0", - "typescript": "^3.4.4" - }, - "bin": { - "sizereport": "build/bin.js" - } - }, - "node_modules/travis-size-report/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/travis-size-report/node_modules/gzip-size": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/gzip-size/-/gzip-size-5.1.1.tgz", - "integrity": "sha512-FNHi6mmoHvs1mxZAds4PpdCS6QG8B4C1krxJsMutgxl5t3+GlRTzzI3NEkifXx2pVsOvJdOGSmIgDhQ55FwdPA==", - "dev": true, - "dependencies": { - "duplexer": "^0.1.1", - "pify": "^4.0.1" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/travis-size-report/node_modules/pify": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", - "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/travis-size-report/node_modules/typescript": { - "version": "3.9.7", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.9.7.tgz", - "integrity": "sha512-BLbiRkiBzAwsjut4x/dsibSTB6yWpwT5qWmC2OfuCg3GgVQCSgMs4vEctYPhsaGtd0AeuuHMkjZ2h2WG8MSzRw==", - "dev": true, - "bin": { - "tsc": "bin/tsc", - "tsserver": "bin/tsserver" - }, - "engines": { - "node": ">=4.2.0" - } - }, "node_modules/trim-newlines": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-3.0.0.tgz", @@ -16660,9 +16809,9 @@ } }, "node_modules/tslib": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.0.3.tgz", - "integrity": "sha512-uZtkfKblCEQtZKBF6EBXVZeQNl82yqtDQdv+eck8u7tdPxjLu2/lp5/uPW+um2tpuxINHWy3GhiccY7QgEaVHQ==" + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.0.tgz", + "integrity": "sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ==" }, "node_modules/tsutils": { "version": "3.17.1", @@ -16900,6 +17049,7 @@ "version": "0.1.2", "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", + "dev": true, "engines": { "node": ">= 4.0.0" } @@ -17689,11 +17839,6 @@ "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.628.tgz", "integrity": "sha512-fmhO4YGo/kapy+xL9Eq/cZwDASaTHZu3psIFYo4yc+RY1LzbZr84xjKlDImDrlrmWhOxsrDi98nX097U/xK/cQ==" }, - "escalade": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", - "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==" - }, "node-releases": { "version": "1.1.67", "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.67.tgz", @@ -20290,17 +20435,6 @@ "deepmerge": "^4.2.2", "is-module": "^1.0.0", "resolve": "^1.19.0" - }, - "dependencies": { - "resolve": { - "version": "1.19.0", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.19.0.tgz", - "integrity": "sha512-rArEXAgsBG4UgRGcynxWIWKFvh/XZCcS8UJdHhwy91zwAvCZIbcs+vAbflgBnNjYMs/i/i+/Ux6IZhML1yPvxg==", - "requires": { - "is-core-module": "^2.1.0", - "path-parse": "^1.0.6" - } - } } }, "@rollup/pluginutils": { @@ -20331,6 +20465,16 @@ "@sinonjs/commons": "^1.7.0" } }, + "@surma/rollup-plugin-off-main-thread": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/@surma/rollup-plugin-off-main-thread/-/rollup-plugin-off-main-thread-2.2.2.tgz", + "integrity": "sha512-dOD6nGZ79RmWKDRQuC7SOGXMvDkkLwBogu+epfVFMKiy2kOUtLZkb8wV/ettuMt37YJAJKYCKUmxSbZL2LkUQg==", + "requires": { + "ejs": "^3.1.6", + "json5": "^2.2.0", + "magic-string": "^0.25.0" + } + }, "@types/babel__core": { "version": "7.1.12", "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.1.12.tgz", @@ -20745,6 +20889,11 @@ "integrity": "sha512-+Ryf6g3BKoRc7jfp7ad8tM4TtMiaWvbF/1/sQcZPkkS7ag3D5nMBCe2UfOTONtAkaG0tO0ij3C5Lwmf1EiyjHg==", "dev": true }, + "async": { + "version": "0.9.2", + "resolved": "https://registry.npmjs.org/async/-/async-0.9.2.tgz", + "integrity": "sha1-rqdNXmHB+JlhO/ZL2mbUx48v0X0=" + }, "async-each": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/async-each/-/async-each-1.0.3.tgz", @@ -20810,11 +20959,6 @@ "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.628.tgz", "integrity": "sha512-fmhO4YGo/kapy+xL9Eq/cZwDASaTHZu3psIFYo4yc+RY1LzbZr84xjKlDImDrlrmWhOxsrDi98nX097U/xK/cQ==" }, - "escalade": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", - "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==" - }, "node-releases": { "version": "1.1.67", "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.67.tgz", @@ -20956,23 +21100,12 @@ "@babel/runtime": "^7.12.5", "cosmiconfig": "^7.0.0", "resolve": "^1.19.0" - }, - "dependencies": { - "resolve": { - "version": "1.19.0", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.19.0.tgz", - "integrity": "sha512-rArEXAgsBG4UgRGcynxWIWKFvh/XZCcS8UJdHhwy91zwAvCZIbcs+vAbflgBnNjYMs/i/i+/Ux6IZhML1yPvxg==", - "requires": { - "is-core-module": "^2.1.0", - "path-parse": "^1.0.6" - } - } } }, "babel-plugin-transform-async-to-promises": { - "version": "0.8.15", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-async-to-promises/-/babel-plugin-transform-async-to-promises-0.8.15.tgz", - "integrity": "sha512-fDXP68ZqcinZO2WCiimCL9zhGjGXOnn3D33zvbh+yheZ/qOrNVVDDIBtAaM3Faz8TRvQzHiRKsu3hfrBAhEncQ==" + "version": "0.8.18", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-async-to-promises/-/babel-plugin-transform-async-to-promises-0.8.18.tgz", + "integrity": "sha512-WpOrF76nUHijnNn10eBGOHZmXQC8JYRME9rOLxStOga7Av2VO53ehVFvVNImMksVtQuL2/7ZNxEgxnx7oo/3Hw==" }, "babel-plugin-transform-replace-expressions": { "version": "0.2.0", @@ -21810,11 +21943,6 @@ "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.628.tgz", "integrity": "sha512-fmhO4YGo/kapy+xL9Eq/cZwDASaTHZu3psIFYo4yc+RY1LzbZr84xjKlDImDrlrmWhOxsrDi98nX097U/xK/cQ==" }, - "escalade": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", - "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==" - }, "node-releases": { "version": "1.1.67", "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.67.tgz", @@ -22347,6 +22475,11 @@ "clone": "^1.0.2" } }, + "define-lazy-prop": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/define-lazy-prop/-/define-lazy-prop-2.0.0.tgz", + "integrity": "sha512-Ds09qNh8yw3khSjiJjiUInaGX9xlqZDY7JVryGxdxV7NPeuqQfplOpQ66yJFZut3jLa5zOwkXw1g9EI2uKh4Og==" + }, "define-properties": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", @@ -22520,6 +22653,14 @@ "safer-buffer": "^2.1.0" } }, + "ejs": { + "version": "3.1.6", + "resolved": "https://registry.npmjs.org/ejs/-/ejs-3.1.6.tgz", + "integrity": "sha512-9lt9Zse4hPucPkoP7FHDF0LQAlGyF9JVpnClFLFH3aSSbxmyoqINRpp/9wePWJTUl4KOQwRL72Iw3InHPDkoGw==", + "requires": { + "jake": "^10.6.1" + } + }, "electron-to-chromium": { "version": "1.3.496", "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.496.tgz", @@ -22534,8 +22675,7 @@ "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 + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" }, "emojis-list": { "version": "3.0.0", @@ -22602,9 +22742,9 @@ } }, "escalade": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.0.2.tgz", - "integrity": "sha512-gPYAU37hYCUhW5euPeR+Y74F7BL+IBsV93j5cvGriSaD1aG6MGsqsV1yamRdrWrb2j3aiZvb0X+UBOWpx3JWtQ==" + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", + "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==" }, "escape-string-regexp": { "version": "4.0.0", @@ -23458,6 +23598,14 @@ "flat-cache": "^3.0.4" } }, + "filelist": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/filelist/-/filelist-1.0.2.tgz", + "integrity": "sha512-z7O0IS8Plc39rTCq6i6iHxk43duYOn8uFJiWSewIq0Bww1RNybVHSCjahmcC87ZqAm4OTvFzlzeGu3XAzG1ctQ==", + "requires": { + "minimatch": "^3.0.4" + } + }, "filesize": { "version": "6.1.0", "resolved": "https://registry.npmjs.org/filesize/-/filesize-6.1.0.tgz", @@ -23487,9 +23635,9 @@ } }, "find-cache-dir": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-3.3.1.tgz", - "integrity": "sha512-t2GDMt3oGC/v+BMwzmllWDuJF/xcDtE5j/fCGbqDD7OLuJkj0cfh1YSA5VKPvwMeLFLNDBkwOKZ2X85jGLVftQ==", + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-3.3.2.tgz", + "integrity": "sha512-wXZV5emFEjrridIgED11OoUKLxiYjAcqot/NJdAkOhlJ+vGzwhOAfcG5OX1jP+S0PcjEn8bdMJv+g2jwQ3Onig==", "requires": { "commondir": "^1.0.1", "make-dir": "^3.0.2", @@ -23703,8 +23851,7 @@ "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 + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==" }, "get-intrinsic": { "version": "1.0.1", @@ -24258,9 +24405,9 @@ } }, "is-core-module": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.2.0.tgz", - "integrity": "sha512-XRAfAdyyY5F5cOXn7hYQDqh2Xmii+DEfIcQGxK/uNwMHhIkPWO0g8msXcbzLe+MpGoR951MlqM/2iIlU4vKDdQ==", + "version": "2.9.0", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.9.0.tgz", + "integrity": "sha512-+5FPy5PnwmO3lvfMb0AsoPaBG+5KHUI0wYFXOtYPnVVVspTFUuMZNfNaNVRt3FZadstu2c8x23vykRW/NBoU6A==", "requires": { "has": "^1.0.3" } @@ -24317,9 +24464,7 @@ "is-docker": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-2.1.1.tgz", - "integrity": "sha512-ZOoqiXfEwtGknTiuDEy8pN2CfE3TxMHprvNer1mXiqwkOT77Rw3YVrUQ52EqAOU3QAWDQ+bQdx7HJzrv7LS2Hw==", - "dev": true, - "optional": true + "integrity": "sha512-ZOoqiXfEwtGknTiuDEy8pN2CfE3TxMHprvNer1mXiqwkOT77Rw3YVrUQ52EqAOU3QAWDQ+bQdx7HJzrv7LS2Hw==" }, "is-extendable": { "version": "0.1.1", @@ -24490,8 +24635,6 @@ "version": "2.2.0", "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-2.2.0.tgz", "integrity": "sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==", - "dev": true, - "optional": true, "requires": { "is-docker": "^2.0.0" } @@ -24603,6 +24746,17 @@ "istanbul-lib-report": "^3.0.0" } }, + "jake": { + "version": "10.8.2", + "resolved": "https://registry.npmjs.org/jake/-/jake-10.8.2.tgz", + "integrity": "sha512-eLpKyrfG3mzvGE2Du8VoPbeSkRry093+tyNjdYaBbJS9v17knImYGNXQCUV0gLxQtF82m3E8iRb/wdSQZLoq7A==", + "requires": { + "async": "0.9.x", + "chalk": "^2.4.2", + "filelist": "^1.0.1", + "minimatch": "^3.0.4" + } + }, "jest": { "version": "26.6.3", "resolved": "https://registry.npmjs.org/jest/-/jest-26.6.3.tgz", @@ -25514,16 +25668,6 @@ "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true }, - "resolve": { - "version": "1.19.0", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.19.0.tgz", - "integrity": "sha512-rArEXAgsBG4UgRGcynxWIWKFvh/XZCcS8UJdHhwy91zwAvCZIbcs+vAbflgBnNjYMs/i/i+/Ux6IZhML1yPvxg==", - "dev": true, - "requires": { - "is-core-module": "^2.1.0", - "path-parse": "^1.0.6" - } - }, "supports-color": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", @@ -26195,9 +26339,9 @@ "dev": true }, "json5": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/json5/-/json5-2.1.3.tgz", - "integrity": "sha512-KXPvOm8K9IJKFM0bmdn8QXh7udDh1g/giieX0NLCaMnb4hEiVFqnop2ImTXCc5e0/oHz3LTqmHGtExn5hfMkOA==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.0.tgz", + "integrity": "sha512-f+8cldu7X/y7RAJurMEJmdoKXGB/X550w2Nr3tTbezL6RwEE/iMcm+tZnXeoZtKuOq6ft8+CqzEkrIgx1fPoQA==", "requires": { "minimist": "^1.2.5" } @@ -26206,6 +26350,7 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", "integrity": "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=", + "dev": true, "requires": { "graceful-fs": "^4.1.6" } @@ -26795,11 +26940,11 @@ } }, "magic-string": { - "version": "0.25.7", - "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.25.7.tgz", - "integrity": "sha512-4CrMT5DOHTDk4HYDlzmwu4FVCcIYI8gauveasrdCu2IKIFOJ3f0v/8MDGJCDL9oD2ppz/Av1b0Nj345H9M+XIA==", + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.25.9.tgz", + "integrity": "sha512-RmF0AsMzgt25qzqqLc1+MbHmhdx0ojF2Fvs4XnOqz2ZOBXzzkEwc/dJQZCYHAn7v1jbVOjAZfK8msRn4BxO4VQ==", "requires": { - "sourcemap-codec": "^1.4.4" + "sourcemap-codec": "^1.4.8" } }, "make-dir": { @@ -27073,9 +27218,9 @@ "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" }, "nanoid": { - "version": "3.1.20", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.1.20.tgz", - "integrity": "sha512-a1cQNyczgKbLX9jwbS/+d7W8fX/RfgYR7lVWwWOGIPNgK2m0MWvrGF6/m4kk6U3QcFMnZf3RIhL0v2Jgh/0Uxw==" + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.3.tgz", + "integrity": "sha512-p1sjXuopFs0xg+fPASzQ28agW1oHD7xDsd9Xkf3T15H3c/cifrFHVwrh74PdoklAPi+i7MdRsE47vm2r6JoB+w==" }, "nanomatch": { "version": "1.2.13", @@ -27841,6 +27986,16 @@ "mimic-fn": "^2.1.0" } }, + "open": { + "version": "8.4.0", + "resolved": "https://registry.npmjs.org/open/-/open-8.4.0.tgz", + "integrity": "sha512-XgFPPM+B28FtCCgSb9I+s9szOC1vZRSwgWsRUA5ylIxRTgKozqjOCrVOqGsYABPYK5qnfqClxZTFBa8PKt2v6Q==", + "requires": { + "define-lazy-prop": "^2.0.0", + "is-docker": "^2.1.1", + "is-wsl": "^2.2.0" + } + }, "opencollective-postinstall": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/opencollective-postinstall/-/opencollective-postinstall-2.0.3.tgz", @@ -27998,9 +28153,9 @@ "dev": true }, "path-parse": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz", - "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==" + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==" }, "path-type": { "version": "4.0.0", @@ -29717,8 +29872,7 @@ "require-directory": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", - "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", - "dev": true + "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=" }, "require-main-filename": { "version": "2.0.0", @@ -29727,11 +29881,13 @@ "dev": true }, "resolve": { - "version": "1.17.0", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.17.0.tgz", - "integrity": "sha512-ic+7JYiV8Vi2yzQGFWOkiZD5Z9z7O2Zhm9XMaTxdJExKasieFCr+yXZ/WmXsckHiKl12ar0y6XiXDx3m4RHn1w==", + "version": "1.22.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.0.tgz", + "integrity": "sha512-Hhtrw0nLeSrFQ7phPp4OOcVjLPIeMnRlr5mcnVuMe7M/7eBn98A3hmFRLoFo3DLZkivSYwhRUJTyPyWAk56WLw==", "requires": { - "path-parse": "^1.0.6" + "is-core-module": "^2.8.1", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" } }, "resolve-cwd": { @@ -29920,15 +30076,6 @@ "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==" }, - "resolve": { - "version": "1.19.0", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.19.0.tgz", - "integrity": "sha512-rArEXAgsBG4UgRGcynxWIWKFvh/XZCcS8UJdHhwy91zwAvCZIbcs+vAbflgBnNjYMs/i/i+/Ux6IZhML1yPvxg==", - "requires": { - "is-core-module": "^2.1.0", - "path-parse": "^1.0.6" - } - }, "supports-color": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", @@ -29951,31 +30098,152 @@ } }, "rollup-plugin-typescript2": { - "version": "0.29.0", - "resolved": "https://registry.npmjs.org/rollup-plugin-typescript2/-/rollup-plugin-typescript2-0.29.0.tgz", - "integrity": "sha512-YytahBSZCIjn/elFugEGQR5qTsVhxhUwGZIsA9TmrSsC88qroGo65O5HZP/TTArH2dm0vUmYWhKchhwi2wL9bw==", + "version": "0.32.0", + "resolved": "https://registry.npmjs.org/rollup-plugin-typescript2/-/rollup-plugin-typescript2-0.32.0.tgz", + "integrity": "sha512-sIiCObzETQagImlNa/xVZY2aKB/7w77EzKAzpmVkXZbDuso6PrW2hdQv6m4/UuMqnzqTFWGF4FPLbVuQISeYZw==", "requires": { - "@rollup/pluginutils": "^3.1.0", - "find-cache-dir": "^3.3.1", - "fs-extra": "8.1.0", - "resolve": "1.17.0", - "tslib": "2.0.1" + "@rollup/pluginutils": "^4.1.2", + "find-cache-dir": "^3.3.2", + "fs-extra": "^10.0.0", + "resolve": "^1.20.0", + "tslib": "^2.4.0" }, "dependencies": { + "@rollup/pluginutils": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-4.2.1.tgz", + "integrity": "sha512-iKnFXr7NkdZAIHiIWE+BX5ULi/ucVFYWD6TbAV+rZctiRTY2PL6tsIKhoIOaoskiWAkgu+VsbXgUVDNLHf+InQ==", + "requires": { + "estree-walker": "^2.0.1", + "picomatch": "^2.2.2" + } + }, + "estree-walker": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-2.0.2.tgz", + "integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==" + }, "fs-extra": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz", - "integrity": "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==", + "version": "10.1.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.1.0.tgz", + "integrity": "sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ==", "requires": { "graceful-fs": "^4.2.0", - "jsonfile": "^4.0.0", - "universalify": "^0.1.0" + "jsonfile": "^6.0.1", + "universalify": "^2.0.0" } }, - "tslib": { + "jsonfile": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", + "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==", + "requires": { + "graceful-fs": "^4.1.6", + "universalify": "^2.0.0" + } + }, + "universalify": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz", + "integrity": "sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==" + } + } + }, + "rollup-plugin-visualizer": { + "version": "5.6.0", + "resolved": "https://registry.npmjs.org/rollup-plugin-visualizer/-/rollup-plugin-visualizer-5.6.0.tgz", + "integrity": "sha512-CKcc8GTUZjC+LsMytU8ocRr/cGZIfMR7+mdy4YnlyetlmIl/dM8BMnOEpD4JPIGt+ZVW7Db9ZtSsbgyeBH3uTA==", + "requires": { + "nanoid": "^3.1.32", + "open": "^8.4.0", + "source-map": "^0.7.3", + "yargs": "^17.3.1" + }, + "dependencies": { + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "requires": { + "color-convert": "^2.0.1" + } + }, + "cliui": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", + "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", + "requires": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^7.0.0" + } + }, + "color-convert": { "version": "2.0.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.0.1.tgz", - "integrity": "sha512-SgIkNheinmEBgx1IUNirK0TUD4X9yjjBRTqqjggWCU3pUEqIk3/Uwl3yRixYKT6WjQuGiwDv4NomL3wqRCj+CQ==" + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "requires": { + "color-name": "~1.1.4" + } + }, + "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==" + }, + "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==" + }, + "source-map": { + "version": "0.7.3", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.3.tgz", + "integrity": "sha512-CkCj6giN3S+n9qrYiBTX5gystlENnRW5jZeNLHpe6aue+SrHcG5VYwujhW9s4dY31mEGsxBDrHR6oI69fTXsaQ==" + }, + "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==", + "requires": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + } + }, + "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==", + "requires": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + } + }, + "y18n": { + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", + "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==" + }, + "yargs": { + "version": "17.4.1", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.4.1.tgz", + "integrity": "sha512-WSZD9jgobAg3ZKuCQZSa3g9QOJeCCqLoLAykiWgmXnDo9EPnn4RPf5qVTtzgOx66o6/oqhcA5tHtJXpG8pMt3g==", + "requires": { + "cliui": "^7.0.2", + "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.0.0" + } + }, + "yargs-parser": { + "version": "21.0.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.0.1.tgz", + "integrity": "sha512-9BK1jFpLzJROCI5TzwZL/TU4gqjK5xiHV/RfWLOahrjAko/e4DJkRDZQXfvqAsiZzzYhgAzbgz6lg48jcm4GLg==" } } }, @@ -30682,19 +30950,17 @@ } }, "strip-ansi": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", - "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", - "dev": true, + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", "requires": { - "ansi-regex": "^5.0.0" + "ansi-regex": "^5.0.1" }, "dependencies": { "ansi-regex": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", - "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", - "dev": true + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==" } } }, @@ -30816,6 +31082,11 @@ } } }, + "supports-preserve-symlinks-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", + "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==" + }, "svgo": { "version": "1.3.2", "resolved": "https://registry.npmjs.org/svgo/-/svgo-1.3.2.tgz", @@ -31046,52 +31317,6 @@ "punycode": "^2.1.1" } }, - "travis-size-report": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/travis-size-report/-/travis-size-report-1.1.0.tgz", - "integrity": "sha512-mAMeCPZ1TvUEXDvweVCAG/ek6KgPeVsmQYXtv6I85UoIUIFAI/mCXnN7vyvTSCjIa8B0+cYn5slvqNn9Jo0U0g==", - "dev": true, - "requires": { - "chalk": "^2.4.2", - "escape-string-regexp": "^2.0.0", - "glob": "^7.1.3", - "gzip-size": "^5.1.0", - "minimist": "^1.2.0", - "node-fetch": "^2.3.0", - "pretty-bytes": "^5.1.0", - "typescript": "^3.4.4" - }, - "dependencies": { - "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 - }, - "gzip-size": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/gzip-size/-/gzip-size-5.1.1.tgz", - "integrity": "sha512-FNHi6mmoHvs1mxZAds4PpdCS6QG8B4C1krxJsMutgxl5t3+GlRTzzI3NEkifXx2pVsOvJdOGSmIgDhQ55FwdPA==", - "dev": true, - "requires": { - "duplexer": "^0.1.1", - "pify": "^4.0.1" - } - }, - "pify": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", - "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==", - "dev": true - }, - "typescript": { - "version": "3.9.7", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.9.7.tgz", - "integrity": "sha512-BLbiRkiBzAwsjut4x/dsibSTB6yWpwT5qWmC2OfuCg3GgVQCSgMs4vEctYPhsaGtd0AeuuHMkjZ2h2WG8MSzRw==", - "dev": true - } - } - }, "trim-newlines": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-3.0.0.tgz", @@ -31099,9 +31324,9 @@ "dev": true }, "tslib": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.0.3.tgz", - "integrity": "sha512-uZtkfKblCEQtZKBF6EBXVZeQNl82yqtDQdv+eck8u7tdPxjLu2/lp5/uPW+um2tpuxINHWy3GhiccY7QgEaVHQ==" + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.0.tgz", + "integrity": "sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ==" }, "tsutils": { "version": "3.17.1", @@ -31284,7 +31509,8 @@ "universalify": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", - "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==" + "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", + "dev": true }, "unquote": { "version": "1.1.1", diff --git a/package.json b/package.json index 95a55247..1f4488f5 100644 --- a/package.json +++ b/package.json @@ -1,10 +1,23 @@ { "name": "microbundle", - "version": "0.13.3", + "version": "0.15.1", "description": "Zero-configuration bundler for tiny JS libs, powered by Rollup.", "main": "dist/microbundle.js", "source": "src/index.js", "bin": "dist/cli.js", + "repository": "developit/microbundle", + "keywords": [ + "bundle", + "rollup", + "micro library" + ], + "files": [ + "src", + "dist", + "index.d.ts" + ], + "author": "Jason Miller (http://jasonformat.com)", + "license": "MIT", "scripts": { "build": "npm run -s build:babel && npm run -s build:self", "build:babel": "babel-node src/cli.js --target=node --format cjs src/{cli,index}.js", @@ -18,7 +31,6 @@ "changeset": "changeset", "release": "npm run -s prepare && npm test && changeset publish" }, - "repository": "developit/microbundle", "prettier": { "singleQuote": true, "trailingComma": "all", @@ -55,23 +67,6 @@ "pre-commit": "lint-staged" } }, - "greenkeeper": { - "lockfiles": { - "outOfRangeUpdatesOnly": true - } - }, - "keywords": [ - "bundle", - "rollup", - "micro library" - ], - "files": [ - "src", - "dist", - "index.d.ts" - ], - "author": "Jason Miller (http://jasonformat.com)", - "license": "MIT", "dependencies": { "@babel/core": "^7.12.10", "@babel/plugin-proposal-class-properties": "7.12.1", @@ -88,10 +83,11 @@ "@rollup/plugin-commonjs": "^17.0.0", "@rollup/plugin-json": "^4.1.0", "@rollup/plugin-node-resolve": "^11.0.1", + "@surma/rollup-plugin-off-main-thread": "^2.2.2", "asyncro": "^3.0.0", "autoprefixer": "^10.1.0", "babel-plugin-macros": "^3.0.1", - "babel-plugin-transform-async-to-promises": "^0.8.15", + "babel-plugin-transform-async-to-promises": "^0.8.18", "babel-plugin-transform-replace-expressions": "^0.2.0", "brotli-size": "^4.0.0", "builtin-modules": "^3.1.0", @@ -101,13 +97,15 @@ "gzip-size": "^6.0.0", "kleur": "^4.1.3", "lodash.merge": "^4.6.2", + "magic-string": "^0.25.9", "postcss": "^8.2.1", "pretty-bytes": "^5.4.1", "rollup": "^2.35.1", "rollup-plugin-bundle-size": "^1.0.3", "rollup-plugin-postcss": "^4.0.0", "rollup-plugin-terser": "^7.0.2", - "rollup-plugin-typescript2": "^0.29.0", + "rollup-plugin-typescript2": "^0.32.0", + "rollup-plugin-visualizer": "^5.6.0", "sade": "^1.7.4", "terser": "^5.7.0", "tiny-glob": "^0.2.8", @@ -137,7 +135,6 @@ "regenerator-runtime": "^0.13.7", "rimraf": "^3.0.2", "shell-quote": "^1.7.2", - "strip-ansi": "^6.0.0", - "travis-size-report": "^1.1.0" + "strip-ansi": "^6.0.0" } } diff --git a/sizereport.config.js b/sizereport.config.js deleted file mode 100644 index 4e188d38..00000000 --- a/sizereport.config.js +++ /dev/null @@ -1,5 +0,0 @@ -module.exports = { - repo: 'developit/microbundle', - path: ['dist/!(*.js.map)', 'test/fixtures/**/dist/!(*.map)'], - branch: 'master', -}; diff --git a/src/index.js b/src/index.js index 47448a08..c1e2f151 100644 --- a/src/index.js +++ b/src/index.js @@ -2,7 +2,7 @@ import fs from 'fs'; import { resolve, relative, dirname, basename, extname } from 'path'; import camelCase from 'camelcase'; import escapeStringRegexp from 'escape-string-regexp'; -import { blue, red } from 'kleur'; +import { blue, yellow, red } from 'kleur'; import { map, series } from 'asyncro'; import glob from 'tiny-glob/sync'; import autoprefixer from 'autoprefixer'; @@ -14,12 +14,21 @@ import babel from '@rollup/plugin-babel'; import customBabel from './lib/babel-custom'; import nodeResolve from '@rollup/plugin-node-resolve'; import { terser } from 'rollup-plugin-terser'; +import { visualizer } from 'rollup-plugin-visualizer'; import alias from '@rollup/plugin-alias'; import postcss from 'rollup-plugin-postcss'; import typescript from 'rollup-plugin-typescript2'; import json from '@rollup/plugin-json'; +import OMT from '@surma/rollup-plugin-off-main-thread'; import logError from './log-error'; -import { isDir, isFile, stdout, isTruthy, removeScope } from './utils'; +import { + EXTENSION, + isDir, + isFile, + isTruthy, + stdout, + removeScope, +} from './utils'; import { getSizeInfo } from './lib/compressed-size'; import { normalizeMinifyOptions } from './lib/terser'; import { @@ -29,6 +38,8 @@ import { } from './lib/option-normalization'; import { getConfigFromPkgJson, getName } from './lib/package-info'; import { shouldCssModules, cssModulesConfig } from './lib/css-modules'; +import { EOL } from 'os'; +import MagicString from 'magic-string'; // Extensions to use when resolving modules const EXTENSIONS = ['.ts', '.tsx', '.js', '.jsx', '.es6', '.es', '.mjs']; @@ -101,12 +112,7 @@ export default async function microbundle(inputOptions) { for (let i = 0; i < options.entries.length; i++) { for (let j = 0; j < formats.length; j++) { steps.push( - createConfig( - options, - options.entries[i], - formats[j], - i === 0 && j === 0, - ), + createConfig(options, options.entries[i], formats[j], j === 0), ); } } @@ -132,10 +138,10 @@ export default async function microbundle(inputOptions) { const targetDir = relative(cwd, dirname(options.output)) || '.'; const sourceExist = options.input.length > 0; const banner = sourceExist - ? blue(`Build "${options.name}" to ${targetDir}:`) - : red(`Error: No entry module found for "${options.name}"`); + ? blue(`Build "${options.pkg.name}" to ${targetDir}:`) + : red(`Error: No entry module found for "${options.pkg.name}"`); return { - output: `${banner}\n ${out.join('\n ')}`, + output: `${banner}\n${out.join('\n')}`, }; } @@ -168,9 +174,11 @@ function doWatch(options, cwd, steps) { } } if (e.code === 'END') { - options._sizeInfo.then(text => { - stdout(`Wrote ${text.trim()}`); - }); + if (options._sizeInfo) { + options._sizeInfo.then(text => { + stdout(`Wrote ${text.trim()}`); + }); + } if (typeof onBuild === 'function') { onBuild(e); } @@ -259,14 +267,18 @@ function replaceName(filename, name) { ); } -function walk(exports) { +function walk(exports, includeDefault) { + if (!exports) return null; if (typeof exports === 'string') return exports; - return walk(exports['.'] || exports.import || exports.module); + let p = exports['.'] || exports.import || exports.module; + if (!p && includeDefault) p = exports.default; + return walk(p, includeDefault); } function getMain({ options, entry, format }) { const { pkg } = options; const pkgMain = options['pkg-main']; + const pkgTypeModule = pkg.type === 'module'; if (!pkgMain) { return options.output; @@ -274,35 +286,31 @@ function getMain({ options, entry, format }) { let mainNoExtension = options.output; if (options.multipleEntries) { - let name = entry.match( - /([\\/])index(\.(umd|cjs|es|m))?\.(mjs|cjs|[tj]sx?)$/, - ) + let name = entry.match(new RegExp(/([\\/])index/.source + EXTENSION.source)) ? mainNoExtension : entry; mainNoExtension = resolve(dirname(mainNoExtension), basename(name)); } - mainNoExtension = mainNoExtension.replace( - /(\.(umd|cjs|es|m))?\.(mjs|cjs|[tj]sx?)$/, - '', - ); + mainNoExtension = mainNoExtension.replace(EXTENSION, ''); const mainsByFormat = {}; mainsByFormat.es = replaceName( pkg.module && !pkg.module.match(/src\//) ? pkg.module - : pkg['jsnext:main'] || 'x.esm.js', + : pkg['jsnext:main'] || (pkgTypeModule ? 'x.esm.js' : 'x.esm.mjs'), mainNoExtension, ); + mainsByFormat.modern = replaceName( - (pkg.exports && walk(pkg.exports)) || + (pkg.exports && walk(pkg.exports, pkgTypeModule)) || (pkg.syntax && pkg.syntax.esmodules) || pkg.esmodule || - 'x.modern.js', + (pkgTypeModule ? 'x.modern.js' : 'x.modern.mjs'), mainNoExtension, ); mainsByFormat.cjs = replaceName( - pkg['cjs:main'] || (pkg.type && pkg.type === 'module' ? 'x.cjs' : 'x.js'), + pkg['cjs:main'] || (pkgTypeModule ? 'x.cjs' : 'x.js'), mainNoExtension, ); mainsByFormat.umd = replaceName( @@ -331,7 +339,7 @@ function createConfig(options, entry, format, writeMeta) { // We want to silence rollup warnings for node builtins as we rollup-node-resolve threats them as externals anyway // @see https://github.com/rollup/plugins/tree/master/packages/node-resolve/#resolving-built-ins-like-fs if (options.target === 'node') { - external = external.concat(builtinModules); + external = [/node:.*/].concat(builtinModules); } const peerDeps = Object.keys(pkg.peerDependencies || {}); @@ -389,6 +397,8 @@ function createConfig(options, entry, format, writeMeta) { options.generateTypes == null ? !!(pkg.types || pkg.typings) : options.generateTypes; + const useWorkerLoader = options.workers !== false; + const escapeStringExternals = ext => ext instanceof RegExp ? ext.source : escapeStringRegexp(ext); const externalPredicate = new RegExp( @@ -397,9 +407,15 @@ function createConfig(options, entry, format, writeMeta) { const externalTest = external.length === 0 ? id => false : id => externalPredicate.test(id); + let endsWithNewLine = false; + + let nameCacheIndentTabs = false; function loadNameCache() { try { - nameCache = JSON.parse(fs.readFileSync(getNameCachePath(), 'utf8')); + const data = fs.readFileSync(getNameCachePath(), 'utf8'); + nameCacheIndentTabs = /^\t+/gm.test(data); + endsWithNewLine = data.endsWith(EOL); + nameCache = JSON.parse(data); // mangle.json can contain a "minify" field, same format as the pkg.mangle: if (nameCache.minify) { minifyOptions = Object.assign( @@ -424,10 +440,19 @@ function createConfig(options, entry, format, writeMeta) { const outputDir = dirname(absMain); const outputEntryFileName = basename(absMain); + // Warn about the (somewhat) breaking change in #950 + if (format === 'es' && !pkg.module && outputEntryFileName.endsWith('.mjs')) { + stdout( + yellow( + 'Warning: your package.json does not specify {"type":"module"}. Microbundle assumes this is a CommonJS package and is generating ES Modules with the ".mjs" file extension.', + ), + ); + } + let config = { /** @type {import('rollup').InputOptions} */ inputOptions: { - // disable Rollup's cache for the modern build to prevent re-use of legacy transpiled modules: + // disable Rollup's cache for modern builds to prevent re-use of legacy transpiled modules: cache, input: entry, external: id => { @@ -451,7 +476,7 @@ function createConfig(options, entry, format, writeMeta) { `\n ↳ to depend on a module via import/require, install it to "dependencies".`, ); return; - } + } else if (warning.code === 'THIS_IS_UNDEFINED') return; warn(warning); }, @@ -471,10 +496,7 @@ function createConfig(options, entry, format, writeMeta) { extract: !!writeMeta && options.css !== 'inline' && - options.output.replace( - /(\.(umd|cjs|es|m))?\.(mjs|[tj]sx?)$/, - '.css', - ), + absMain.replace(EXTENSION, '.css'), minimize: options.compress, sourceMap: options.sourcemap && options.css !== 'inline', }), @@ -487,6 +509,7 @@ function createConfig(options, entry, format, writeMeta) { nodeResolve({ mainFields: ['module', 'jsnext', 'main'], browser: options.target !== 'node', + exportConditions: [options.target === 'node' ? 'node' : 'browser'], // defaults + .jsx extensions: ['.mjs', '.js', '.jsx', '.json', '.node'], preferBuiltins: options.target === 'node', @@ -509,6 +532,7 @@ function createConfig(options, entry, format, writeMeta) { }, (useTypescript || emitDeclaration) && typescript({ + cwd: options.cwd, typescript: require(resolveFrom.silent( options.cwd, 'typescript', @@ -518,17 +542,15 @@ function createConfig(options, entry, format, writeMeta) { tsconfigDefaults: { compilerOptions: { sourceMap: options.sourcemap, - declaration: true, + declaration: options.generateTypes !== false, allowJs: true, emitDeclarationOnly: options.generateTypes && !useTypescript, - declarationDir: getDeclarationDir({ options, pkg }), + ...(options.generateTypes !== false && { + declarationDir: getDeclarationDir({ options, pkg }), + }), jsx: 'preserve', - jsxFactory: - // TypeScript fails to resolve Fragments when jsxFactory - // is set, even when it's the same as the default value. - options.jsx === 'React.createElement' - ? undefined - : options.jsx || 'h', + jsxFactory: options.jsx, + jsxFragmentFactory: options.jsxFragment, }, files: options.entries, }, @@ -558,15 +580,16 @@ function createConfig(options, entry, format, writeMeta) { customBabel()({ babelHelpers: 'bundled', extensions: EXTENSIONS, - exclude: 'node_modules/**', + // use a regex to make sure to exclude eventual hoisted packages + exclude: /\/node_modules\//, passPerPreset: true, // @see https://babeljs.io/docs/en/options#passperpreset custom: { defines, modern, compress: options.compress !== false, - targets: options.target === 'node' ? { node: '8' } : undefined, - pragma: options.jsx || 'h', - pragmaFrag: options.jsxFragment || 'Fragment', + targets: options.target === 'node' ? { node: '12' } : undefined, + pragma: options.jsx, + pragmaFrag: options.jsxFragment, typescript: !!useTypescript, jsxImportSource: options.jsxImportSource || false, }, @@ -589,7 +612,7 @@ function createConfig(options, entry, format, writeMeta) { // By default, Terser wraps function arguments in extra parens to trigger eager parsing. // Whether this is a good idea is way too specific to guess, so we optimize for size by default: wrap_func_args: false, - comments: /^\s*([@#]__[A-Z]__\s*$|@cc_on)/, + comments: /^\s*([@#]__[A-Z]+__\s*$|@cc_on)/, preserve_annotations: true, }, module: modern, @@ -607,15 +630,22 @@ function createConfig(options, entry, format, writeMeta) { // after hook writeBundle() { if (writeMeta && nameCache) { - fs.writeFile( - getNameCachePath(), - JSON.stringify(nameCache, null, 2), - () => {}, + let filename = getNameCachePath(); + let json = JSON.stringify( + nameCache, + null, + nameCacheIndentTabs ? '\t' : 2, ); + if (endsWithNewLine) json += EOL; + fs.writeFile(filename, json, () => {}); } }, }, ], + options.visualize && visualizer(), + // NOTE: OMT only works with amd and esm + // Source: https://github.com/surma/rollup-plugin-off-main-thread#config + useWorkerLoader && (format === 'es' || modern) && OMT(), /** @type {import('rollup').Plugin} */ ({ name: 'postprocessing', @@ -624,17 +654,36 @@ function createConfig(options, entry, format, writeMeta) { // So we remove the globalThis check, replacing it with `this||self` to match Rollup 1's output: renderChunk(code, chunk, opts) { if (opts.format === 'umd') { - // minified: - code = code.replace( + // Can swap this out with MagicString.replace() when we bump it: + // https://github.com/developit/microbundle/blob/f815a01cb63d90b9f847a4dcad2a64e6b2f8596f/src/index.js#L657-L671 + const s = new MagicString(code); + + const minified = code.match( /([a-zA-Z$_]+)="undefined"!=typeof globalThis\?globalThis:(\1\|\|self)/, - '$2', ); - // unminified: - code = code.replace( + if (minified) { + s.overwrite( + minified.index, + minified.index + minified[0].length, + minified[2], + ); + } + + const unminified = code.match( /(global *= *)typeof +globalThis *!== *['"]undefined['"] *\? *globalThis *: *(global *\|\| *self)/, - '$1$2', ); - return { code, map: null }; + if (unminified) { + s.overwrite( + unminified.index, + unminified.index + unminified[0].length, + unminified[1] + unminified[2], + ); + } + + return { + code: s.toString(), + map: s.generateMap({ hires: true }), + }; } }, // Grab size info before writing files to disk: diff --git a/src/lib/compressed-size.js b/src/lib/compressed-size.js index dd7c869a..b8642105 100644 --- a/src/lib/compressed-size.js +++ b/src/lib/compressed-size.js @@ -11,7 +11,7 @@ function getPadLeft(str, width, char = ' ') { function formatSize(size, filename, type, raw) { const pretty = raw ? `${size} B` : prettyBytes(size); const color = size < 5000 ? green : size > 40000 ? red : yellow; - const indent = getPadLeft(pretty, type === 'br' ? 13 : 10); + const indent = getPadLeft(pretty, 13); return `${indent}${color(pretty)}: ${white(basename(filename))}.${type}`; } diff --git a/src/lib/css-modules.js b/src/lib/css-modules.js index fcda6dc7..e4fa1889 100644 --- a/src/lib/css-modules.js +++ b/src/lib/css-modules.js @@ -33,9 +33,9 @@ export function cssModulesConfig(options) { } /** - * This is done because if you use the cli default property, you get a primiatve "null" or "false", + * This is done because if you use the cli default property, you get a primitive "null" or "false", * but when using the cli arguments, you always get back strings. This method aims at correcting those - * for both realms. So that both realms _convert_ into primatives. + * for both realms. So that both realms _convert_ into primitives. */ function processCssmodulesArgument(options) { if (options['css-modules'] === 'true' || options['css-modules'] === true) diff --git a/src/prog.js b/src/prog.js index 10fd9b8d..7cd4aa3e 100644 --- a/src/prog.js +++ b/src/prog.js @@ -13,7 +13,7 @@ export default handler => { opts.entries = toArray(str || opts.entry).concat(opts._); - if (opts.compress != null) { + if (typeof opts.compress !== 'undefined') { // Convert `--compress true/false/1/0` to booleans: if (typeof opts.compress !== 'boolean') { opts.compress = opts.compress !== 'false' && opts.compress !== '0'; @@ -46,34 +46,54 @@ export default handler => { .option('--target', 'Specify your target environment (node or web)', 'web') .option('--external', `Specify external dependencies, or 'none'`) .option('--globals', `Specify globals dependencies, or 'none'`) - .example('microbundle --globals react=React,jquery=$') + .example('--globals react=React,jquery=$') .option('--define', 'Replace constants with hard-coded values') - .example('microbundle --define API_KEY=1234') + .example('--define API_KEY=1234') .option('--alias', `Map imports to different modules`) - .example('microbundle --alias react=preact') - .option('--compress', 'Compress output using Terser', null) + .example('--alias react=preact') + .option( + '--compress', + 'Compress output using Terser (default true when --target is web, false when --target is node)', + ) + .example('build --target web --no-compress') .option('--strict', 'Enforce undefined global context and add "use strict"') .option('--name', 'Specify name exposed in UMD builds') .option('--cwd', 'Use an alternative working directory', '.') .option('--sourcemap', 'Generate source map') - .option('--css', 'Where to output CSS: "inline" or "external"', 'external') + .example("watch --no-sourcemap # don't generate sourcemaps") + .option('--raw', 'Show raw byte size', false) + .option('--jsx', 'A custom JSX pragma like React.createElement', 'h') .option( - '--css-modules', - 'Turns on css-modules for all .css imports. Passing a string will override the scopeName. eg --css-modules="_[hash]"', - null, + '--jsxFragment', + 'A custom JSX fragment pragma like React.Fragment', + 'Fragment', ) - .example("microbundle --no-sourcemap # don't generate sourcemaps") - .option('--raw', 'Show raw byte size', false) .option( - '--jsx', - 'A custom JSX pragma like React.createElement (default: h)', + '--jsxImportSource', + 'Declares the module specifier to be used for importing jsx factory functions', ) .option('--tsconfig', 'Specify the path to a custom tsconfig.json') + .example('build --tsconfig tsconfig.build.json') .option( '--generateTypes', 'Whether or not to generate types , if `types` or `typings` is set in `package.json` then it will default to be `true`', ) - .example('microbundle build --tsconfig tsconfig.build.json'); + .option('--css', 'Where to output CSS: "inline" or "external"', 'external') + .option( + '--css-modules', + 'Turns on css-modules for all .css imports. Passing a string will override the scopeName. eg --css-modules="_[hash]"', + null, + ) + .option( + '--workers', + 'Bundle module workers - see https://github.com/surma/rollup-plugin-off-main-thread#auto-bundling', + false, + ) + .option( + '--visualize', + 'Generate bundle makeup visualization (stats.html)', + false, + ); prog .command('build [...entries]', '', { default: true }) diff --git a/src/utils.js b/src/utils.js index dbb5e82f..aa3b8449 100644 --- a/src/utils.js +++ b/src/utils.js @@ -43,3 +43,5 @@ export function safeVariableName(name) { const identifier = normalized.replace(INVALID_ES3_IDENT, ''); return camelCase(identifier); } + +export const EXTENSION = /(\.(umd|cjs|es|m))?\.([cm]?[tj]sx?)$/; diff --git a/test/__snapshots__/index.test.js.snap b/test/__snapshots__/index.test.js.snap index e70c9176..27dedc37 100644 --- a/test/__snapshots__/index.test.js.snap +++ b/test/__snapshots__/index.test.js.snap @@ -7,7 +7,7 @@ Directory tree: alias dist - alias-mapping.esm.js + alias-mapping.esm.mjs alias-mapping.js alias-mapping.umd.js package.json @@ -17,11 +17,11 @@ alias index.js -Build \\"aliasMapping\\" to dist: +Build \\"alias-mapping\\" to dist: 62 B: alias-mapping.js.gz 46 B: alias-mapping.js.br -62 B: alias-mapping.esm.js.gz -46 B: alias-mapping.esm.js.br +62 B: alias-mapping.esm.mjs.gz +46 B: alias-mapping.esm.mjs.br 118 B: alias-mapping.umd.js.gz 83 B: alias-mapping.umd.js.br" `; @@ -50,8 +50,8 @@ Directory tree: alias-external dist - alias-external.esm.js - alias-external.esm.js.map + alias-external.esm.mjs + alias-external.esm.mjs.map alias-external.js alias-external.js.map alias-external.umd.js @@ -62,11 +62,11 @@ alias-external index.js -Build \\"aliasExternal\\" to dist: +Build \\"alias-external\\" to dist: 37 B: alias-external.js.gz 21 B: alias-external.js.br -37 B: alias-external.esm.js.gz -21 B: alias-external.esm.js.br +37 B: alias-external.esm.mjs.gz +21 B: alias-external.esm.mjs.br 93 B: alias-external.umd.js.gz 89 B: alias-external.umd.js.br" `; @@ -75,7 +75,7 @@ exports[`fixtures build alias-external with microbundle 2`] = `6`; exports[`fixtures build alias-external with microbundle 3`] = ` "console.log(42); -//# sourceMappingURL=alias-external.esm.js.map +//# sourceMappingURL=alias-external.esm.mjs.map " `; @@ -98,8 +98,8 @@ Directory tree: async-iife-ts dist - async-iife-ts.esm.js - async-iife-ts.esm.js.map + async-iife-ts.esm.mjs + async-iife-ts.esm.mjs.map async-iife-ts.js async-iife-ts.js.map async-iife-ts.umd.js @@ -112,11 +112,11 @@ async-iife-ts tsconfig.json -Build \\"asyncIifeTs\\" to dist: +Build \\"async-iife-ts\\" to dist: 70 B: async-iife-ts.js.gz 55 B: async-iife-ts.js.br -70 B: async-iife-ts.esm.js.gz -55 B: async-iife-ts.esm.js.br +70 B: async-iife-ts.esm.mjs.gz +55 B: async-iife-ts.esm.mjs.br 125 B: async-iife-ts.umd.js.gz 95 B: async-iife-ts.umd.js.br" `; @@ -125,7 +125,7 @@ exports[`fixtures build async-iife-ts with microbundle 2`] = `7`; exports[`fixtures build async-iife-ts with microbundle 3`] = ` "try{console.log(\\"foo\\")}catch(o){Promise.reject(o)} -//# sourceMappingURL=async-iife-ts.esm.js.map +//# sourceMappingURL=async-iife-ts.esm.mjs.map " `; @@ -150,8 +150,8 @@ Directory tree: async-ts dist - async-ts.esm.js - async-ts.esm.js.map + async-ts.esm.mjs + async-ts.esm.mjs.map async-ts.js async-ts.js.map async-ts.umd.js @@ -164,31 +164,31 @@ async-ts tsconfig.json -Build \\"asyncTs\\" to dist: -103 B: async-ts.js.gz -72 B: async-ts.js.br -112 B: async-ts.esm.js.gz -91 B: async-ts.esm.js.br -200 B: async-ts.umd.js.gz -156 B: async-ts.umd.js.br" +Build \\"async-ts\\" to dist: +117 B: async-ts.js.gz +91 B: async-ts.js.br +128 B: async-ts.esm.mjs.gz +108 B: async-ts.esm.mjs.br +217 B: async-ts.umd.js.gz +164 B: async-ts.umd.js.br" `; exports[`fixtures build async-ts with microbundle 2`] = `7`; exports[`fixtures build async-ts with microbundle 3`] = ` -"var o=function(){function o(){}return o.prototype.foo=function(){return Promise.resolve()},o}();export{o as MyClass}; -//# sourceMappingURL=async-ts.esm.js.map +"var o=/*#__PURE__*/function(){function o(){}return o.prototype.foo=function(){return Promise.resolve()},o}();export{o as MyClass}; +//# sourceMappingURL=async-ts.esm.mjs.map " `; exports[`fixtures build async-ts with microbundle 4`] = ` -"exports.MyClass=function(){function o(){}return o.prototype.foo=function(){return Promise.resolve()},o}(); +"exports.MyClass=/*#__PURE__*/function(){function o(){}return o.prototype.foo=function(){return Promise.resolve()},o}(); //# sourceMappingURL=async-ts.js.map " `; exports[`fixtures build async-ts with microbundle 5`] = ` -"!function(e,o){\\"object\\"==typeof exports&&\\"undefined\\"!=typeof module?o(exports):\\"function\\"==typeof define&&define.amd?define([\\"exports\\"],o):o((e||self).asyncTs={})}(this,function(e){e.MyClass=function(){function e(){}return e.prototype.foo=function(){return Promise.resolve()},e}()}); +"!function(e,o){\\"object\\"==typeof exports&&\\"undefined\\"!=typeof module?o(exports):\\"function\\"==typeof define&&define.amd?define([\\"exports\\"],o):o((e||self).asyncTs={})}(this,function(e){e.MyClass=/*#__PURE__*/function(){function e(){}return e.prototype.foo=function(){return Promise.resolve()},e}()}); //# sourceMappingURL=async-ts.umd.js.map " `; @@ -207,8 +207,8 @@ Directory tree: basic dist - basic-lib.esm.js - basic-lib.esm.js.map + basic-lib.esm.mjs + basic-lib.esm.mjs.map basic-lib.js basic-lib.js.map basic-lib.umd.js @@ -219,11 +219,11 @@ basic two.js -Build \\"basicLib\\" to dist: +Build \\"basic-lib\\" to dist: 187 B: basic-lib.js.gz 138 B: basic-lib.js.br -188 B: basic-lib.esm.js.gz -139 B: basic-lib.esm.js.br +188 B: basic-lib.esm.mjs.gz +139 B: basic-lib.esm.mjs.br 273 B: basic-lib.umd.js.gz 211 B: basic-lib.umd.js.br" `; @@ -232,7 +232,7 @@ exports[`fixtures build basic with microbundle 2`] = `6`; exports[`fixtures build basic with microbundle 3`] = ` "var r=function(){try{var r=arguments;return Promise.resolve([].slice.call(r).reduce(function(r,e){return r+e},0))}catch(r){return Promise.reject(r)}};export default function(){try{var e=arguments,t=[].slice.call(e);return Promise.resolve(r.apply(void 0,t)).then(function(e){return Promise.resolve(r.apply(void 0,t)).then(function(r){return[e,r]})})}catch(r){return Promise.reject(r)}} -//# sourceMappingURL=basic-lib.esm.js.map +//# sourceMappingURL=basic-lib.esm.mjs.map " `; @@ -255,8 +255,8 @@ Directory tree: basic-babelrc dist - basic-babelrc.esm.js - basic-babelrc.esm.js.map + basic-babelrc.esm.mjs + basic-babelrc.esm.mjs.map basic-babelrc.js basic-babelrc.js.map basic-babelrc.umd.js @@ -266,11 +266,11 @@ basic-babelrc index.js -Build \\"basicBabelrc\\" to dist: +Build \\"basic-babelrc\\" to dist: 122 B: basic-babelrc.js.gz 91 B: basic-babelrc.js.br -122 B: basic-babelrc.esm.js.gz -91 B: basic-babelrc.esm.js.br +122 B: basic-babelrc.esm.mjs.gz +91 B: basic-babelrc.esm.mjs.br 158 B: basic-babelrc.umd.js.gz 121 B: basic-babelrc.umd.js.br" `; @@ -279,7 +279,7 @@ exports[`fixtures build basic-babelrc with microbundle 2`] = `6`; exports[`fixtures build basic-babelrc with microbundle 3`] = ` "function r(r){return void 0===r&&(r=function(r){throw new Error(\\"required!\\")}()),!0===r||function(r){throw new Error(\\"Falsey!\\")}()}r(!0),r(!1); -//# sourceMappingURL=basic-babelrc.esm.js.map +//# sourceMappingURL=basic-babelrc.esm.mjs.map " `; @@ -302,8 +302,8 @@ Directory tree: basic-compress-false dist - basic-compress-false.esm.js - basic-compress-false.esm.js.map + basic-compress-false.esm.mjs + basic-compress-false.esm.mjs.map basic-compress-false.js basic-compress-false.js.map basic-compress-false.umd.js @@ -314,11 +314,11 @@ basic-compress-false two.js -Build \\"basicCompressFalse\\" to dist: +Build \\"basic-compress-false\\" to dist: 260 B: basic-compress-false.js.gz 206 B: basic-compress-false.js.br -258 B: basic-compress-false.esm.js.gz -209 B: basic-compress-false.esm.js.br +258 B: basic-compress-false.esm.mjs.gz +209 B: basic-compress-false.esm.mjs.br 383 B: basic-compress-false.umd.js.gz 305 B: basic-compress-false.umd.js.br" `; @@ -352,7 +352,7 @@ var index = (function () { }); export default index; -//# sourceMappingURL=basic-compress-false.esm.js.map +//# sourceMappingURL=basic-compress-false.esm.mjs.map " `; @@ -434,8 +434,8 @@ basic-css dist basic-css.css basic-css.css.map - basic-css.esm.js - basic-css.esm.js.map + basic-css.esm.mjs + basic-css.esm.mjs.map basic-css.js basic-css.js.map basic-css.umd.js @@ -446,11 +446,11 @@ basic-css two.css -Build \\"basicCss\\" to dist: +Build \\"basic-css\\" to dist: 107 B: basic-css.js.gz 60 B: basic-css.js.br -109 B: basic-css.esm.js.gz -67 B: basic-css.esm.js.br +109 B: basic-css.esm.mjs.gz +67 B: basic-css.esm.mjs.br 195 B: basic-css.umd.js.gz 138 B: basic-css.umd.js.br" `; @@ -464,7 +464,7 @@ exports[`fixtures build basic-css with microbundle 3`] = ` exports[`fixtures build basic-css with microbundle 4`] = ` "function e(){var e=document.createElement(\\"div\\");return e.className=\\"testing\\",e}export default e; -//# sourceMappingURL=basic-css.esm.js.map +//# sourceMappingURL=basic-css.esm.mjs.map " `; @@ -487,8 +487,8 @@ Directory tree: basic-dashed-external dist - basic-dashed-external.esm.js - basic-dashed-external.esm.js.map + basic-dashed-external.esm.mjs + basic-dashed-external.esm.mjs.map basic-dashed-external.js basic-dashed-external.js.map basic-dashed-external.umd.js @@ -499,31 +499,31 @@ basic-dashed-external two.js -Build \\"basicDashedExternal\\" to dist: -259 B: basic-dashed-external.js.gz -196 B: basic-dashed-external.js.br -214 B: basic-dashed-external.esm.js.gz -164 B: basic-dashed-external.esm.js.br -343 B: basic-dashed-external.umd.js.gz -286 B: basic-dashed-external.umd.js.br" +Build \\"basic-dashed-external\\" to dist: +276 B: basic-dashed-external.js.gz +212 B: basic-dashed-external.js.br +214 B: basic-dashed-external.esm.mjs.gz +164 B: basic-dashed-external.esm.mjs.br +357 B: basic-dashed-external.umd.js.gz +285 B: basic-dashed-external.umd.js.br" `; exports[`fixtures build basic-dashed-external with microbundle 2`] = `6`; exports[`fixtures build basic-dashed-external with microbundle 3`] = ` "import r from\\"tiny-glob\\";var e=function(){try{var r=arguments;return Promise.resolve([].slice.call(r).reduce(function(r,e){return r+e},0))}catch(r){return Promise.reject(r)}};console.log(r);export default function(){try{var r=arguments,t=[].slice.call(r);return Promise.resolve(e.apply(void 0,t)).then(function(r){return Promise.resolve(e.apply(void 0,t)).then(function(e){return[r,e]})})}catch(r){return Promise.reject(r)}} -//# sourceMappingURL=basic-dashed-external.esm.js.map +//# sourceMappingURL=basic-dashed-external.esm.mjs.map " `; exports[`fixtures build basic-dashed-external with microbundle 4`] = ` -"var e=require(\\"tiny-glob\\");function r(e){return e&&\\"object\\"==typeof e&&\\"default\\"in e?e:{default:e}}var t=function(){try{var e=arguments;return Promise.resolve([].slice.call(e).reduce(function(e,r){return e+r},0))}catch(e){return Promise.reject(e)}};console.log(r(e).default),module.exports=function(){try{var e=arguments,r=[].slice.call(e);return Promise.resolve(t.apply(void 0,r)).then(function(e){return Promise.resolve(t.apply(void 0,r)).then(function(r){return[e,r]})})}catch(e){return Promise.reject(e)}}; +"var e=require(\\"tiny-glob\\");function r(e){return e&&\\"object\\"==typeof e&&\\"default\\"in e?e:{default:e}}var t=function(){try{var e=arguments;return Promise.resolve([].slice.call(e).reduce(function(e,r){return e+r},0))}catch(e){return Promise.reject(e)}};console.log(/*#__PURE__*/r(e).default),module.exports=function(){try{var e=arguments,r=[].slice.call(e);return Promise.resolve(t.apply(void 0,r)).then(function(e){return Promise.resolve(t.apply(void 0,r)).then(function(r){return[e,r]})})}catch(e){return Promise.reject(e)}}; //# sourceMappingURL=basic-dashed-external.js.map " `; exports[`fixtures build basic-dashed-external with microbundle 5`] = ` -"!function(e,t){\\"object\\"==typeof exports&&\\"undefined\\"!=typeof module?module.exports=t(require(\\"tiny-glob\\")):\\"function\\"==typeof define&&define.amd?define([\\"tiny-glob\\"],t):(e||self).basicDashedExternal=t(e.tinyGlob)}(this,function(e){function t(e){return e&&\\"object\\"==typeof e&&\\"default\\"in e?e:{default:e}}var n=function(){try{var e=arguments;return Promise.resolve([].slice.call(e).reduce(function(e,t){return e+t},0))}catch(e){return Promise.reject(e)}};return console.log(t(e).default),function(){try{var e=arguments,t=[].slice.call(e);return Promise.resolve(n.apply(void 0,t)).then(function(e){return Promise.resolve(n.apply(void 0,t)).then(function(t){return[e,t]})})}catch(e){return Promise.reject(e)}}}); +"!function(e,t){\\"object\\"==typeof exports&&\\"undefined\\"!=typeof module?module.exports=t(require(\\"tiny-glob\\")):\\"function\\"==typeof define&&define.amd?define([\\"tiny-glob\\"],t):(e||self).basicDashedExternal=t(e.tinyGlob)}(this,function(e){function t(e){return e&&\\"object\\"==typeof e&&\\"default\\"in e?e:{default:e}}var n=function(){try{var e=arguments;return Promise.resolve([].slice.call(e).reduce(function(e,t){return e+t},0))}catch(e){return Promise.reject(e)}};return console.log(/*#__PURE__*/t(e).default),function(){try{var e=arguments,t=[].slice.call(e);return Promise.resolve(n.apply(void 0,t)).then(function(e){return Promise.resolve(n.apply(void 0,t)).then(function(t){return[e,t]})})}catch(e){return Promise.reject(e)}}}); //# sourceMappingURL=basic-dashed-external.umd.js.map " `; @@ -535,8 +535,8 @@ Directory tree: basic-flow dist - basic-lib-flow.esm.js - basic-lib-flow.esm.js.map + basic-lib-flow.esm.mjs + basic-lib-flow.esm.mjs.map basic-lib-flow.js basic-lib-flow.js.map basic-lib-flow.umd.js @@ -547,11 +547,11 @@ basic-flow index.js -Build \\"basicLibFlow\\" to dist: +Build \\"basic-lib-flow\\" to dist: 57 B: basic-lib-flow.js.gz 43 B: basic-lib-flow.js.br -56 B: basic-lib-flow.esm.js.gz -42 B: basic-lib-flow.esm.js.br +56 B: basic-lib-flow.esm.mjs.gz +42 B: basic-lib-flow.esm.mjs.br 171 B: basic-lib-flow.umd.js.gz 132 B: basic-lib-flow.umd.js.br" `; @@ -560,7 +560,7 @@ exports[`fixtures build basic-flow with microbundle 2`] = `6`; exports[`fixtures build basic-flow with microbundle 3`] = ` "export default[\\"banana\\",\\"raspberry\\"]; -//# sourceMappingURL=basic-lib-flow.esm.js.map +//# sourceMappingURL=basic-lib-flow.esm.mjs.map " `; @@ -583,8 +583,8 @@ Directory tree: basic-json dist - basic-json.esm.js - basic-json.esm.js.map + basic-json.esm.mjs + basic-json.esm.mjs.map basic-json.js basic-json.js.map basic-json.umd.js @@ -595,11 +595,11 @@ basic-json two.json -Build \\"basicJson\\" to dist: +Build \\"basic-json\\" to dist: 93 B: basic-json.js.gz 65 B: basic-json.js.br -92 B: basic-json.esm.js.gz -64 B: basic-json.esm.js.br +92 B: basic-json.esm.mjs.gz +64 B: basic-json.esm.mjs.br 180 B: basic-json.umd.js.gz 129 B: basic-json.umd.js.br" `; @@ -608,7 +608,7 @@ exports[`fixtures build basic-json with microbundle 2`] = `6`; exports[`fixtures build basic-json with microbundle 3`] = ` "var e={test:\\"true\\"};export default function(){return Promise.resolve(e)} -//# sourceMappingURL=basic-json.esm.js.map +//# sourceMappingURL=basic-json.esm.mjs.map " `; @@ -633,14 +633,14 @@ basic-multi-source a.js b.js dist - a.esm.js - a.esm.js.map + a.esm.mjs + a.esm.mjs.map a.js a.js.map a.umd.js a.umd.js.map - b.esm.js - b.esm.js.map + b.esm.mjs + b.esm.mjs.map b.js b.js.map b.umd.js @@ -648,17 +648,17 @@ basic-multi-source package.json -Build \\"basicMultiSource\\" to dist: +Build \\"basic-multi-source\\" to dist: 43 B: a.js.gz 27 B: a.js.br -43 B: a.esm.js.gz -27 B: a.esm.js.br +43 B: a.esm.mjs.gz +27 B: a.esm.mjs.br 99 B: a.umd.js.gz 84 B: a.umd.js.br 43 B: b.js.gz 27 B: b.js.br -43 B: b.esm.js.gz -27 B: b.esm.js.br +43 B: b.esm.mjs.gz +27 B: b.esm.mjs.br 99 B: b.umd.js.gz 79 B: b.umd.js.br" `; @@ -667,7 +667,7 @@ exports[`fixtures build basic-multi-source with microbundle 2`] = `12`; exports[`fixtures build basic-multi-source with microbundle 3`] = ` "console.log(\\"i am a\\"); -//# sourceMappingURL=a.esm.js.map +//# sourceMappingURL=a.esm.mjs.map " `; @@ -685,7 +685,7 @@ exports[`fixtures build basic-multi-source with microbundle 5`] = ` exports[`fixtures build basic-multi-source with microbundle 6`] = ` "console.log(\\"i am b\\"); -//# sourceMappingURL=b.esm.js.map +//# sourceMappingURL=b.esm.mjs.map " `; @@ -701,6 +701,99 @@ exports[`fixtures build basic-multi-source with microbundle 8`] = ` " `; +exports[`fixtures build basic-multi-source-css with microbundle 1`] = ` +"Used script: microbundle + +Directory tree: + +basic-multi-source-css + a.css + a.js + b.css + b.js + dist + a.css + a.css.map + a.esm.mjs + a.esm.mjs.map + a.js + a.js.map + a.umd.js + a.umd.js.map + b.css + b.css.map + b.esm.mjs + b.esm.mjs.map + b.js + b.js.map + b.umd.js + b.umd.js.map + package.json + + +Build \\"basic-multi-source-css\\" to dist: +104 B: a.js.gz +61 B: a.js.br +105 B: a.esm.mjs.gz +67 B: a.esm.mjs.br +201 B: a.umd.js.gz +133 B: a.umd.js.br +104 B: b.js.gz +61 B: b.js.br +106 B: b.esm.mjs.gz +67 B: b.esm.mjs.br +201 B: b.umd.js.gz +134 B: b.umd.js.br" +`; + +exports[`fixtures build basic-multi-source-css with microbundle 2`] = `16`; + +exports[`fixtures build basic-multi-source-css with microbundle 3`] = ` +".a{display:flex;color:green;background:pink} +/*# sourceMappingURL=a.css.map */" +`; + +exports[`fixtures build basic-multi-source-css with microbundle 4`] = ` +"function e(){var e=document.createElement(\\"div\\");return e.className=\\"a\\",e}export default e; +//# sourceMappingURL=a.esm.mjs.map +" +`; + +exports[`fixtures build basic-multi-source-css with microbundle 5`] = ` +"module.exports=function(){var e=document.createElement(\\"div\\");return e.className=\\"a\\",e}; +//# sourceMappingURL=a.js.map +" +`; + +exports[`fixtures build basic-multi-source-css with microbundle 6`] = ` +"!function(e,n){\\"object\\"==typeof exports&&\\"undefined\\"!=typeof module?module.exports=n():\\"function\\"==typeof define&&define.amd?define(n):(e||self).basicMultiSourceCss=n()}(this,function(){return function(){var e=document.createElement(\\"div\\");return e.className=\\"a\\",e}}); +//# sourceMappingURL=a.umd.js.map +" +`; + +exports[`fixtures build basic-multi-source-css with microbundle 7`] = ` +".b{display:flex;color:red;background:#00f} +/*# sourceMappingURL=b.css.map */" +`; + +exports[`fixtures build basic-multi-source-css with microbundle 8`] = ` +"function e(){var e=document.createElement(\\"div\\");return e.className=\\"b\\",e}export default e; +//# sourceMappingURL=b.esm.mjs.map +" +`; + +exports[`fixtures build basic-multi-source-css with microbundle 9`] = ` +"module.exports=function(){var e=document.createElement(\\"div\\");return e.className=\\"b\\",e}; +//# sourceMappingURL=b.js.map +" +`; + +exports[`fixtures build basic-multi-source-css with microbundle 10`] = ` +"!function(e,n){\\"object\\"==typeof exports&&\\"undefined\\"!=typeof module?module.exports=n():\\"function\\"==typeof define&&define.amd?define(n):(e||self).basicMultiSourceCss=n()}(this,function(){return function(){var e=document.createElement(\\"div\\");return e.className=\\"b\\",e}}); +//# sourceMappingURL=b.umd.js.map +" +`; + exports[`fixtures build basic-no-compress with microbundle 1`] = ` "Used script: microbundle --no-compress @@ -708,8 +801,8 @@ Directory tree: basic-no-compress dist - basic-no-compress.esm.js - basic-no-compress.esm.js.map + basic-no-compress.esm.mjs + basic-no-compress.esm.mjs.map basic-no-compress.js basic-no-compress.js.map basic-no-compress.umd.js @@ -720,11 +813,11 @@ basic-no-compress two.js -Build \\"basicNoCompress\\" to dist: +Build \\"basic-no-compress\\" to dist: 260 B: basic-no-compress.js.gz 206 B: basic-no-compress.js.br -258 B: basic-no-compress.esm.js.gz -209 B: basic-no-compress.esm.js.br +258 B: basic-no-compress.esm.mjs.gz +209 B: basic-no-compress.esm.mjs.br 381 B: basic-no-compress.umd.js.gz 310 B: basic-no-compress.umd.js.br" `; @@ -758,7 +851,7 @@ var index = (function () { }); export default index; -//# sourceMappingURL=basic-no-compress.esm.js.map +//# sourceMappingURL=basic-no-compress.esm.mjs.map " `; @@ -846,7 +939,7 @@ basic-no-pkg-main two.js -Build \\"basicNoPkgMain\\" to dist: +Build \\"basic-no-pkg-main\\" to dist: 187 B: basic-no-pkg-main.js.gz 138 B: basic-no-pkg-main.js.br 188 B: basic-no-pkg-main.js.gz @@ -877,7 +970,7 @@ basic-node-internals index.js -Build \\"basicNodeInternals\\" to dist: +Build \\"basic-node-internals\\" to dist: 191 B: basic-node-internals.js.gz 149 B: basic-node-internals.js.br" `; @@ -911,8 +1004,8 @@ Directory tree: basic-ts dist - basic-lib-ts.esm.js - basic-lib-ts.esm.js.map + basic-lib-ts.esm.mjs + basic-lib-ts.esm.mjs.map basic-lib-ts.js basic-lib-ts.js.map basic-lib-ts.umd.js @@ -927,31 +1020,31 @@ basic-ts tsconfig.json -Build \\"basicLibTs\\" to dist: -104 B: basic-lib-ts.js.gz -76 B: basic-lib-ts.js.br -104 B: basic-lib-ts.esm.js.gz -82 B: basic-lib-ts.esm.js.br -186 B: basic-lib-ts.umd.js.gz -141 B: basic-lib-ts.umd.js.br" +Build \\"basic-lib-ts\\" to dist: +118 B: basic-lib-ts.js.gz +94 B: basic-lib-ts.js.br +118 B: basic-lib-ts.esm.mjs.gz +97 B: basic-lib-ts.esm.mjs.br +201 B: basic-lib-ts.umd.js.gz +150 B: basic-lib-ts.umd.js.br" `; exports[`fixtures build basic-ts with microbundle 2`] = `8`; exports[`fixtures build basic-ts with microbundle 3`] = ` -"var n=new(function(){function n(){}return n.prototype.drive=function(n){return!0},n}());export default n; -//# sourceMappingURL=basic-lib-ts.esm.js.map +"var n=new(/*#__PURE__*/function(){function n(){}return n.prototype.drive=function(n){return!0},n}());export default n; +//# sourceMappingURL=basic-lib-ts.esm.mjs.map " `; exports[`fixtures build basic-ts with microbundle 4`] = ` -"var n=new(function(){function n(){}return n.prototype.drive=function(n){return!0},n}());module.exports=n; +"var n=new(/*#__PURE__*/function(){function n(){}return n.prototype.drive=function(n){return!0},n}());module.exports=n; //# sourceMappingURL=basic-lib-ts.js.map " `; exports[`fixtures build basic-ts with microbundle 5`] = ` -"!function(e,n){\\"object\\"==typeof exports&&\\"undefined\\"!=typeof module?module.exports=n():\\"function\\"==typeof define&&define.amd?define(n):(e||self).basicLibTs=n()}(this,function(){return new(function(){function e(){}return e.prototype.drive=function(e){return!0},e}())}); +"!function(e,n){\\"object\\"==typeof exports&&\\"undefined\\"!=typeof module?module.exports=n():\\"function\\"==typeof define&&define.amd?define(n):(e||self).basicLibTs=n()}(this,function(){return new(/*#__PURE__*/function(){function e(){}return e.prototype.drive=function(e){return!0},e}())}); //# sourceMappingURL=basic-lib-ts.umd.js.map " `; @@ -980,8 +1073,8 @@ Directory tree: basic-tsx dist - basic-lib-tsx.esm.js - basic-lib-tsx.esm.js.map + basic-lib-tsx.esm.mjs + basic-lib-tsx.esm.mjs.map basic-lib-tsx.js basic-lib-tsx.js.map basic-lib-tsx.umd.js @@ -994,31 +1087,32 @@ basic-tsx tsconfig.json -Build \\"basicLibTsx\\" to dist: -199 B: basic-lib-tsx.js.gz -153 B: basic-lib-tsx.js.br -200 B: basic-lib-tsx.esm.js.gz -153 B: basic-lib-tsx.esm.js.br -281 B: basic-lib-tsx.umd.js.gz -217 B: basic-lib-tsx.umd.js.br" +Build \\"basic-lib-tsx\\" to dist: +213 B: basic-lib-tsx.js.gz +164 B: basic-lib-tsx.js.br +218 B: basic-lib-tsx.esm.mjs.gz +172 B: basic-lib-tsx.esm.mjs.br +298 B: basic-lib-tsx.umd.js.gz +232 B: basic-lib-tsx.umd.js.br" `; exports[`fixtures build basic-tsx with microbundle 2`] = `7`; exports[`fixtures build basic-tsx with microbundle 3`] = ` -"var n=function(n,r){return{tag:n,props:r,children:[].slice.call(arguments,2)}},r=function(){function r(){}return r.prototype.render=function(){return n(\\"div\\",{id:\\"app\\"},n(\\"h1\\",null,\\"Hello, World!\\"),n(\\"p\\",null,\\"A JSX demo.\\"))},r}();export default r; -//# sourceMappingURL=basic-lib-tsx.esm.js.map +"var n=function(n,r){return{tag:n,props:r,children:[].slice.call(arguments,2)}},r=/*#__PURE__*/function(){function r(){}return r.prototype.render=function(){return n(\\"div\\",{id:\\"app\\"},n(\\"h1\\",null,\\"Hello, World!\\"),n(\\"p\\",null,\\"A JSX demo.\\"))},r}();export default r; +//# sourceMappingURL=basic-lib-tsx.esm.mjs.map " `; exports[`fixtures build basic-tsx with microbundle 4`] = ` -"var n=function(n,r){return{tag:n,props:r,children:[].slice.call(arguments,2)}};module.exports=function(){function r(){}return r.prototype.render=function(){return n(\\"div\\",{id:\\"app\\"},n(\\"h1\\",null,\\"Hello, World!\\"),n(\\"p\\",null,\\"A JSX demo.\\"))},r}(); +"var n=function(n,r){return{tag:n,props:r,children:[].slice.call(arguments,2)}};module.exports=/*#__PURE__*/function(){function r(){}return r.prototype.render=function(){return n(\\"div\\",{id:\\"app\\"},n(\\"h1\\",null,\\"Hello, World!\\"),n(\\"p\\",null,\\"A JSX demo.\\"))},r}(); //# sourceMappingURL=basic-lib-tsx.js.map " `; exports[`fixtures build basic-tsx with microbundle 5`] = ` -"!function(e,n){\\"object\\"==typeof exports&&\\"undefined\\"!=typeof module?module.exports=n():\\"function\\"==typeof define&&define.amd?define(n):(e||self).basicLibTsx=n()}(this,function(){var e=function(e,n){return{tag:e,props:n,children:[].slice.call(arguments,2)}};return function(){function n(){}return n.prototype.render=function(){return e(\\"div\\",{id:\\"app\\"},e(\\"h1\\",null,\\"Hello, World!\\"),e(\\"p\\",null,\\"A JSX demo.\\"))},n}()}); +"!function(e,n){\\"object\\"==typeof exports&&\\"undefined\\"!=typeof module?module.exports=n():\\"function\\"==typeof define&&define.amd?define(n):(e||self).basicLibTsx=n()}(this,function(){var e=function(e,n){return{tag:e,props:n,children:[].slice.call(arguments,2)}};/*#__PURE__*/ +return function(){function n(){}return n.prototype.render=function(){return e(\\"div\\",{id:\\"app\\"},e(\\"h1\\",null,\\"Hello, World!\\"),e(\\"p\\",null,\\"A JSX demo.\\"))},n}()}); //# sourceMappingURL=basic-lib-tsx.umd.js.map " `; @@ -1037,8 +1131,8 @@ Directory tree: basic dist - basic.esm.js - basic.esm.js.map + basic.esm.mjs + basic.esm.mjs.map basic.js basic.js.map basic.umd.js @@ -1052,8 +1146,8 @@ basic Build \\"basic\\" to dist: 187 B: basic.js.gz 138 B: basic.js.br -188 B: basic.esm.js.gz -139 B: basic.esm.js.br +188 B: basic.esm.mjs.gz +139 B: basic.esm.mjs.br 269 B: basic.umd.js.gz 198 B: basic.umd.js.br" `; @@ -1062,7 +1156,7 @@ exports[`fixtures build basic-with-cwd with microbundle 2`] = `6`; exports[`fixtures build basic-with-cwd with microbundle 3`] = ` "var r=function(){try{var r=arguments;return Promise.resolve([].slice.call(r).reduce(function(r,e){return r+e},0))}catch(r){return Promise.reject(r)}};export default function(){try{var e=arguments,t=[].slice.call(e);return Promise.resolve(r.apply(void 0,t)).then(function(e){return Promise.resolve(r.apply(void 0,t)).then(function(r){return[e,r]})})}catch(r){return Promise.reject(r)}} -//# sourceMappingURL=basic.esm.js.map +//# sourceMappingURL=basic.esm.mjs.map " `; @@ -1085,8 +1179,8 @@ Directory tree: class-decorators-ts dist - class-decorators-ts.esm.js - class-decorators-ts.esm.js.map + class-decorators-ts.esm.mjs + class-decorators-ts.esm.mjs.map class-decorators-ts.js class-decorators-ts.js.map class-decorators-ts.umd.js @@ -1099,31 +1193,31 @@ class-decorators-ts tsconfig.json -Build \\"classDecoratorsTs\\" to dist: -333 B: class-decorators-ts.js.gz -276 B: class-decorators-ts.js.br -333 B: class-decorators-ts.esm.js.gz -278 B: class-decorators-ts.esm.js.br -400 B: class-decorators-ts.umd.js.gz -341 B: class-decorators-ts.umd.js.br" +Build \\"class-decorators-ts\\" to dist: +348 B: class-decorators-ts.js.gz +288 B: class-decorators-ts.js.br +348 B: class-decorators-ts.esm.mjs.gz +288 B: class-decorators-ts.esm.mjs.br +415 B: class-decorators-ts.umd.js.gz +353 B: class-decorators-ts.umd.js.br" `; exports[`fixtures build class-decorators-ts with microbundle 2`] = `7`; exports[`fixtures build class-decorators-ts with microbundle 3`] = ` -"var e=function(){function e(e){this.greeting=e}return e.prototype.greet=function(){return\\"Hello, \\"+this.greeting},e}(),t=new(e=function(e,t,r,n){var o,c=arguments.length,l=c<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if(\\"object\\"==typeof Reflect&&\\"function\\"==typeof Reflect.decorate)l=Reflect.decorate(e,t,r,n);else for(var f=e.length-1;f>=0;f--)(o=e[f])&&(l=(c<3?o(l):c>3?o(t,r,l):o(t,r))||l);return c>3&&l&&Object.defineProperty(t,r,l),l}([function(e){Object.seal(e),Object.seal(e.prototype)}],e))(\\"Hello World\\");export default t; -//# sourceMappingURL=class-decorators-ts.esm.js.map +"var e=/*#__PURE__*/function(){function e(e){this.greeting=e}return e.prototype.greet=function(){return\\"Hello, \\"+this.greeting},e}(),t=new(e=function(e,t,r,n){var o,c=arguments.length,l=c<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if(\\"object\\"==typeof Reflect&&\\"function\\"==typeof Reflect.decorate)l=Reflect.decorate(e,t,r,n);else for(var f=e.length-1;f>=0;f--)(o=e[f])&&(l=(c<3?o(l):c>3?o(t,r,l):o(t,r))||l);return c>3&&l&&Object.defineProperty(t,r,l),l}([function(e){Object.seal(e),Object.seal(e.prototype)}],e))(\\"Hello World\\");export default t; +//# sourceMappingURL=class-decorators-ts.esm.mjs.map " `; exports[`fixtures build class-decorators-ts with microbundle 4`] = ` -"var e=function(){function e(e){this.greeting=e}return e.prototype.greet=function(){return\\"Hello, \\"+this.greeting},e}(),t=new(e=function(e,t,r,o){var n,c=arguments.length,l=c<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if(\\"object\\"==typeof Reflect&&\\"function\\"==typeof Reflect.decorate)l=Reflect.decorate(e,t,r,o);else for(var f=e.length-1;f>=0;f--)(n=e[f])&&(l=(c<3?n(l):c>3?n(t,r,l):n(t,r))||l);return c>3&&l&&Object.defineProperty(t,r,l),l}([function(e){Object.seal(e),Object.seal(e.prototype)}],e))(\\"Hello World\\");module.exports=t; +"var e=/*#__PURE__*/function(){function e(e){this.greeting=e}return e.prototype.greet=function(){return\\"Hello, \\"+this.greeting},e}(),t=new(e=function(e,t,r,o){var n,c=arguments.length,l=c<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if(\\"object\\"==typeof Reflect&&\\"function\\"==typeof Reflect.decorate)l=Reflect.decorate(e,t,r,o);else for(var f=e.length-1;f>=0;f--)(n=e[f])&&(l=(c<3?n(l):c>3?n(t,r,l):n(t,r))||l);return c>3&&l&&Object.defineProperty(t,r,l),l}([function(e){Object.seal(e),Object.seal(e.prototype)}],e))(\\"Hello World\\");module.exports=t; //# sourceMappingURL=class-decorators-ts.js.map " `; exports[`fixtures build class-decorators-ts with microbundle 5`] = ` -"!function(e,t){\\"object\\"==typeof exports&&\\"undefined\\"!=typeof module?module.exports=t():\\"function\\"==typeof define&&define.amd?define(t):(e||self).classDecoratorsTs=t()}(this,function(){var e=function(){function e(e){this.greeting=e}return e.prototype.greet=function(){return\\"Hello, \\"+this.greeting},e}();return new(e=function(e,t,o,n){var r,f=arguments.length,i=f<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,o):n;if(\\"object\\"==typeof Reflect&&\\"function\\"==typeof Reflect.decorate)i=Reflect.decorate(e,t,o,n);else for(var c=e.length-1;c>=0;c--)(r=e[c])&&(i=(f<3?r(i):f>3?r(t,o,i):r(t,o))||i);return f>3&&i&&Object.defineProperty(t,o,i),i}([function(e){Object.seal(e),Object.seal(e.prototype)}],e))(\\"Hello World\\")}); +"!function(e,t){\\"object\\"==typeof exports&&\\"undefined\\"!=typeof module?module.exports=t():\\"function\\"==typeof define&&define.amd?define(t):(e||self).classDecoratorsTs=t()}(this,function(){var e=/*#__PURE__*/function(){function e(e){this.greeting=e}return e.prototype.greet=function(){return\\"Hello, \\"+this.greeting},e}();return new(e=function(e,t,o,n){var r,f=arguments.length,i=f<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,o):n;if(\\"object\\"==typeof Reflect&&\\"function\\"==typeof Reflect.decorate)i=Reflect.decorate(e,t,o,n);else for(var c=e.length-1;c>=0;c--)(r=e[c])&&(i=(f<3?r(i):f>3?r(t,o,i):r(t,o))||i);return f>3&&i&&Object.defineProperty(t,o,i),i}([function(e){Object.seal(e),Object.seal(e.prototype)}],e))(\\"Hello World\\")}); //# sourceMappingURL=class-decorators-ts.umd.js.map " `; @@ -1146,8 +1240,8 @@ Directory tree: class-properties dist - class-properties.esm.js - class-properties.esm.js.map + class-properties.esm.mjs + class-properties.esm.mjs.map class-properties.js class-properties.js.map class-properties.umd.js @@ -1157,11 +1251,11 @@ class-properties index.js -Build \\"classProperties\\" to dist: +Build \\"class-properties\\" to dist: 93 B: class-properties.js.gz 79 B: class-properties.js.br -96 B: class-properties.esm.js.gz -85 B: class-properties.esm.js.br +96 B: class-properties.esm.mjs.gz +85 B: class-properties.esm.mjs.br 197 B: class-properties.umd.js.gz 150 B: class-properties.umd.js.br" `; @@ -1170,7 +1264,7 @@ exports[`fixtures build class-properties with microbundle 2`] = `6`; exports[`fixtures build class-properties with microbundle 3`] = ` "var a=function(){this.baz=3};a.bar=2;var r=new a;export default r;export{a as Foo}; -//# sourceMappingURL=class-properties.esm.js.map +//# sourceMappingURL=class-properties.esm.mjs.map " `; @@ -1194,7 +1288,7 @@ Directory tree: css-modules--false dist css-modules--false.css - css-modules--false.esm.js + css-modules--false.esm.mjs css-modules--false.js css-modules--false.umd.js package.json @@ -1204,11 +1298,11 @@ css-modules--false not_scoped.module.css -Build \\"cssModulesFalse\\" to dist: +Build \\"css-modules--false\\" to dist: 49 B: css-modules--false.js.gz 23 B: css-modules--false.js.br -52 B: css-modules--false.esm.js.gz -36 B: css-modules--false.esm.js.br +52 B: css-modules--false.esm.mjs.gz +36 B: css-modules--false.esm.mjs.br 156 B: css-modules--false.umd.js.gz 109 B: css-modules--false.umd.js.br" `; @@ -1240,7 +1334,7 @@ Directory tree: css-modules--null dist css-modules--null.css - css-modules--null.esm.js + css-modules--null.esm.mjs css-modules--null.js css-modules--null.umd.js package.json @@ -1250,11 +1344,11 @@ css-modules--null scoped.module.css -Build \\"cssModulesNull\\" to dist: +Build \\"css-modules--null\\" to dist: 110 B: css-modules--null.js.gz 72 B: css-modules--null.js.br -112 B: css-modules--null.esm.js.gz -77 B: css-modules--null.esm.js.br +112 B: css-modules--null.esm.mjs.gz +77 B: css-modules--null.esm.mjs.br 200 B: css-modules--null.umd.js.gz 140 B: css-modules--null.umd.js.br" `; @@ -1286,7 +1380,7 @@ Directory tree: css-modules--string dist css-modules--string.css - css-modules--string.esm.js + css-modules--string.esm.mjs css-modules--string.js css-modules--string.umd.js package.json @@ -1296,11 +1390,11 @@ css-modules--string scoped.module.css -Build \\"cssModulesString\\" to dist: +Build \\"css-modules--string\\" to dist: 166 B: css-modules--string.js.gz 118 B: css-modules--string.js.br -168 B: css-modules--string.esm.js.gz -122 B: css-modules--string.esm.js.br +168 B: css-modules--string.esm.mjs.gz +122 B: css-modules--string.esm.mjs.br 263 B: css-modules--string.umd.js.gz 192 B: css-modules--string.umd.js.br" `; @@ -1332,7 +1426,7 @@ Directory tree: css-modules--true dist css-modules--true.css - css-modules--true.esm.js + css-modules--true.esm.mjs css-modules--true.js css-modules--true.umd.js package.json @@ -1342,11 +1436,11 @@ css-modules--true scoped.module.css -Build \\"cssModulesTrue\\" to dist: +Build \\"css-modules--true\\" to dist: 139 B: css-modules--true.js.gz 94 B: css-modules--true.js.br -141 B: css-modules--true.esm.js.gz -108 B: css-modules--true.esm.js.br +141 B: css-modules--true.esm.mjs.gz +108 B: css-modules--true.esm.mjs.br 230 B: css-modules--true.umd.js.gz 165 B: css-modules--true.umd.js.br" `; @@ -1377,8 +1471,8 @@ Directory tree: custom-babelrc dist - custom-babelrc.esm.js - custom-babelrc.esm.js.map + custom-babelrc.esm.mjs + custom-babelrc.esm.mjs.map custom-babelrc.js custom-babelrc.js.map custom-babelrc.umd.js @@ -1388,11 +1482,11 @@ custom-babelrc index.js -Build \\"customBabelrc\\" to dist: +Build \\"custom-babelrc\\" to dist: 218 B: custom-babelrc.js.gz 193 B: custom-babelrc.js.br -222 B: custom-babelrc.esm.js.gz -185 B: custom-babelrc.esm.js.br +222 B: custom-babelrc.esm.mjs.gz +185 B: custom-babelrc.esm.mjs.br 309 B: custom-babelrc.umd.js.gz 260 B: custom-babelrc.umd.js.br" `; @@ -1401,7 +1495,7 @@ exports[`fixtures build custom-babelrc with microbundle 2`] = `6`; exports[`fixtures build custom-babelrc with microbundle 3`] = ` "class e{constructor(){var e,r;r=[\\"foo\\",\\"bar\\"],(e=\\"myFields\\")in this?Object.defineProperty(this,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):this[e]=r}foo(){try{return Promise.resolve(this.myFields.find(e=>\\"bar\\"===e))}catch(e){return Promise.reject(e)}}}export{e as MyClass}; -//# sourceMappingURL=custom-babelrc.esm.js.map +//# sourceMappingURL=custom-babelrc.esm.mjs.map " `; @@ -1417,6 +1511,122 @@ exports[`fixtures build custom-babelrc with microbundle 5`] = ` " `; +exports[`fixtures build custom-outputs with microbundle 1`] = ` +"Used script: microbundle -f modern,es,umd,cjs + +Directory tree: + +custom-outputs + dist + custom-outputs.exportsx.mjs + custom-outputs.exportsx.mjs.map + custom-outputs.js + custom-outputs.js.map + custom-outputs.modulex.mjs + custom-outputs.modulex.mjs.map + custom-outputs.umdx.js + custom-outputs.umdx.js.map + package.json + src + index.js + two.js + + +Build \\"custom-outputs\\" to dist: +187 B: custom-outputs.js.gz +138 B: custom-outputs.js.br +113 B: custom-outputs.exportsx.mjs.gz +92 B: custom-outputs.exportsx.mjs.br +188 B: custom-outputs.modulex.mjs.gz +139 B: custom-outputs.modulex.mjs.br +273 B: custom-outputs.umdx.js.gz +203 B: custom-outputs.umdx.js.br" +`; + +exports[`fixtures build custom-outputs with microbundle 2`] = `8`; + +exports[`fixtures build custom-outputs with microbundle 3`] = ` +"async function n(...n){return n.reduce((n,t)=>n+t,0)}async function t(...t){return[await n(...t),await n(...t)]}export default t; +//# sourceMappingURL=custom-outputs.exportsx.mjs.map +" +`; + +exports[`fixtures build custom-outputs with microbundle 4`] = ` +"var r=function(){try{var r=arguments;return Promise.resolve([].slice.call(r).reduce(function(r,e){return r+e},0))}catch(r){return Promise.reject(r)}};module.exports=function(){try{var e=arguments,t=[].slice.call(e);return Promise.resolve(r.apply(void 0,t)).then(function(e){return Promise.resolve(r.apply(void 0,t)).then(function(r){return[e,r]})})}catch(r){return Promise.reject(r)}}; +//# sourceMappingURL=custom-outputs.js.map +" +`; + +exports[`fixtures build custom-outputs with microbundle 5`] = ` +"var r=function(){try{var r=arguments;return Promise.resolve([].slice.call(r).reduce(function(r,e){return r+e},0))}catch(r){return Promise.reject(r)}};export default function(){try{var e=arguments,t=[].slice.call(e);return Promise.resolve(r.apply(void 0,t)).then(function(e){return Promise.resolve(r.apply(void 0,t)).then(function(r){return[e,r]})})}catch(r){return Promise.reject(r)}} +//# sourceMappingURL=custom-outputs.modulex.mjs.map +" +`; + +exports[`fixtures build custom-outputs with microbundle 6`] = ` +"!function(e,t){\\"object\\"==typeof exports&&\\"undefined\\"!=typeof module?module.exports=t():\\"function\\"==typeof define&&define.amd?define(t):(e||self).customOutputs=t()}(this,function(){var e=function(){try{var e=arguments;return Promise.resolve([].slice.call(e).reduce(function(e,t){return e+t},0))}catch(e){return Promise.reject(e)}};return function(){try{var t=arguments,r=[].slice.call(t);return Promise.resolve(e.apply(void 0,r)).then(function(t){return Promise.resolve(e.apply(void 0,r)).then(function(e){return[t,e]})})}catch(e){return Promise.reject(e)}}}); +//# sourceMappingURL=custom-outputs.umdx.js.map +" +`; + +exports[`fixtures build custom-outputs-alt with microbundle 1`] = ` +"Used script: microbundle -f modern,es,umd,cjs + +Directory tree: + +custom-outputs-alt + dist + custom-outputs-alt.cjsmain.js + custom-outputs-alt.cjsmain.js.map + custom-outputs-alt.esmodule.mjs + custom-outputs-alt.esmodule.mjs.map + custom-outputs-alt.jsnextmain.mjs + custom-outputs-alt.jsnextmain.mjs.map + custom-outputs-alt.unpkg.js + custom-outputs-alt.unpkg.js.map + package.json + src + index.js + two.js + + +Build \\"custom-outputs-alt\\" to dist: +187 B: custom-outputs-alt.cjsmain.js.gz +138 B: custom-outputs-alt.cjsmain.js.br +113 B: custom-outputs-alt.esmodule.mjs.gz +92 B: custom-outputs-alt.esmodule.mjs.br +188 B: custom-outputs-alt.jsnextmain.mjs.gz +139 B: custom-outputs-alt.jsnextmain.mjs.br +277 B: custom-outputs-alt.unpkg.js.gz +226 B: custom-outputs-alt.unpkg.js.br" +`; + +exports[`fixtures build custom-outputs-alt with microbundle 2`] = `8`; + +exports[`fixtures build custom-outputs-alt with microbundle 3`] = ` +"var r=function(){try{var r=arguments;return Promise.resolve([].slice.call(r).reduce(function(r,e){return r+e},0))}catch(r){return Promise.reject(r)}};module.exports=function(){try{var e=arguments,t=[].slice.call(e);return Promise.resolve(r.apply(void 0,t)).then(function(e){return Promise.resolve(r.apply(void 0,t)).then(function(r){return[e,r]})})}catch(r){return Promise.reject(r)}}; +//# sourceMappingURL=custom-outputs-alt.cjsmain.js.map +" +`; + +exports[`fixtures build custom-outputs-alt with microbundle 4`] = ` +"async function n(...n){return n.reduce((n,t)=>n+t,0)}async function t(...t){return[await n(...t),await n(...t)]}export default t; +//# sourceMappingURL=custom-outputs-alt.esmodule.mjs.map +" +`; + +exports[`fixtures build custom-outputs-alt with microbundle 5`] = ` +"var r=function(){try{var r=arguments;return Promise.resolve([].slice.call(r).reduce(function(r,e){return r+e},0))}catch(r){return Promise.reject(r)}};export default function(){try{var e=arguments,t=[].slice.call(e);return Promise.resolve(r.apply(void 0,t)).then(function(e){return Promise.resolve(r.apply(void 0,t)).then(function(r){return[e,r]})})}catch(r){return Promise.reject(r)}} +//# sourceMappingURL=custom-outputs-alt.jsnextmain.mjs.map +" +`; + +exports[`fixtures build custom-outputs-alt with microbundle 6`] = ` +"!function(e,t){\\"object\\"==typeof exports&&\\"undefined\\"!=typeof module?module.exports=t():\\"function\\"==typeof define&&define.amd?define(t):(e||self).customOutputsAlt=t()}(this,function(){var e=function(){try{var e=arguments;return Promise.resolve([].slice.call(e).reduce(function(e,t){return e+t},0))}catch(e){return Promise.reject(e)}};return function(){try{var t=arguments,r=[].slice.call(t);return Promise.resolve(e.apply(void 0,r)).then(function(t){return Promise.resolve(e.apply(void 0,r)).then(function(e){return[t,e]})})}catch(e){return Promise.reject(e)}}}); +//# sourceMappingURL=custom-outputs-alt.unpkg.js.map +" +`; + exports[`fixtures build custom-source with microbundle 1`] = ` "Used script: microbundle @@ -1424,8 +1634,8 @@ Directory tree: custom-source dist - custom-source.esm.js - custom-source.esm.js.map + custom-source.esm.mjs + custom-source.esm.mjs.map custom-source.js custom-source.js.map custom-source.umd.js @@ -1436,11 +1646,11 @@ custom-source two.js -Build \\"customSource\\" to dist: +Build \\"custom-source\\" to dist: 187 B: custom-source.js.gz 138 B: custom-source.js.br -188 B: custom-source.esm.js.gz -139 B: custom-source.esm.js.br +188 B: custom-source.esm.mjs.gz +139 B: custom-source.esm.mjs.br 275 B: custom-source.umd.js.gz 203 B: custom-source.umd.js.br" `; @@ -1449,7 +1659,7 @@ exports[`fixtures build custom-source with microbundle 2`] = `6`; exports[`fixtures build custom-source with microbundle 3`] = ` "var r=function(){try{var r=arguments;return Promise.resolve([].slice.call(r).reduce(function(r,e){return r+e},0))}catch(r){return Promise.reject(r)}};export default function(){try{var e=arguments,t=[].slice.call(e);return Promise.resolve(r.apply(void 0,t)).then(function(e){return Promise.resolve(r.apply(void 0,t)).then(function(r){return[e,r]})})}catch(r){return Promise.reject(r)}} -//# sourceMappingURL=custom-source.esm.js.map +//# sourceMappingURL=custom-source.esm.mjs.map " `; @@ -1472,8 +1682,8 @@ Directory tree: custom-source dist - custom-src.esm.js - custom-src.esm.js.map + custom-src.esm.mjs + custom-src.esm.mjs.map custom-src.js custom-src.js.map custom-src.umd.js @@ -1484,11 +1694,11 @@ custom-source two.js -Build \\"customSrc\\" to dist: +Build \\"custom-src\\" to dist: 187 B: custom-src.js.gz 138 B: custom-src.js.br -188 B: custom-src.esm.js.gz -139 B: custom-src.esm.js.br +188 B: custom-src.esm.mjs.gz +139 B: custom-src.esm.mjs.br 273 B: custom-src.umd.js.gz 203 B: custom-src.umd.js.br" `; @@ -1497,7 +1707,7 @@ exports[`fixtures build custom-source-with-cwd with microbundle 2`] = `6`; exports[`fixtures build custom-source-with-cwd with microbundle 3`] = ` "var r=function(){try{var r=arguments;return Promise.resolve([].slice.call(r).reduce(function(r,e){return r+e},0))}catch(r){return Promise.reject(r)}};export default function(){try{var e=arguments,t=[].slice.call(e);return Promise.resolve(r.apply(void 0,t)).then(function(e){return Promise.resolve(r.apply(void 0,t)).then(function(r){return[e,r]})})}catch(r){return Promise.reject(r)}} -//# sourceMappingURL=custom-src.esm.js.map +//# sourceMappingURL=custom-src.esm.mjs.map " `; @@ -1520,8 +1730,8 @@ Directory tree: default-named dist - default-named.esm.js - default-named.esm.js.map + default-named.esm.mjs + default-named.esm.mjs.map default-named.js default-named.js.map default-named.umd.js @@ -1531,11 +1741,11 @@ default-named index.js -Build \\"defaultNamed\\" to dist: +Build \\"default-named\\" to dist: 60 B: default-named.js.gz 46 B: default-named.js.br -74 B: default-named.esm.js.gz -62 B: default-named.esm.js.br +74 B: default-named.esm.mjs.gz +62 B: default-named.esm.mjs.br 169 B: default-named.umd.js.gz 122 B: default-named.umd.js.br" `; @@ -1544,7 +1754,7 @@ exports[`fixtures build default-named with microbundle 2`] = `6`; exports[`fixtures build default-named with microbundle 3`] = ` "var t=42;function e(){}export default e;export{t as foo}; -//# sourceMappingURL=default-named.esm.js.map +//# sourceMappingURL=default-named.esm.mjs.map " `; @@ -1567,7 +1777,7 @@ Directory tree: define dist - define.esm.js + define.esm.mjs define.js define.umd.js index.js @@ -1577,8 +1787,8 @@ define Build \\"define\\" to dist: 55 B: define.js.gz 37 B: define.js.br -55 B: define.esm.js.gz -37 B: define.esm.js.br +55 B: define.esm.mjs.gz +37 B: define.esm.mjs.br 108 B: define.umd.js.gz 78 B: define.umd.js.br" `; @@ -1607,14 +1817,14 @@ Directory tree: define-expression dist - define-expression.esm.js + define-expression.esm.mjs index.js package.json -Build \\"defineExpression\\" to dist: -56 B: define-expression.esm.js.gz -40 B: define-expression.esm.js.br" +Build \\"define-expression\\" to dist: +56 B: define-expression.esm.mjs.gz +40 B: define-expression.esm.mjs.br" `; exports[`fixtures build define-expression with microbundle 2`] = `1`; @@ -1631,8 +1841,8 @@ Directory tree: esnext-ts dist - esnext-ts.esm.js - esnext-ts.esm.js.map + esnext-ts.esm.mjs + esnext-ts.esm.mjs.map esnext-ts.js esnext-ts.js.map esnext-ts.umd.js @@ -1645,31 +1855,31 @@ esnext-ts tsconfig.json -Build \\"esnextTs\\" to dist: -989 B: esnext-ts.js.gz -883 B: esnext-ts.js.br -990 B: esnext-ts.esm.js.gz -881 B: esnext-ts.esm.js.br -1050 B: esnext-ts.umd.js.gz -932 B: esnext-ts.umd.js.br" +Build \\"esnext-ts\\" to dist: +1010 B: esnext-ts.js.gz +899 B: esnext-ts.js.br +1011 B: esnext-ts.esm.mjs.gz +896 B: esnext-ts.esm.mjs.br +1072 B: esnext-ts.umd.js.gz +959 B: esnext-ts.umd.js.br" `; exports[`fixtures build esnext-ts with microbundle 2`] = `7`; exports[`fixtures build esnext-ts with microbundle 3`] = ` -"function n(t,e,i){if(!t.s){if(i instanceof r){if(!i.s)return void(i.o=n.bind(null,t,e));1&e&&(e=i.s),i=i.v}if(i&&i.then)return void i.then(n.bind(null,t,e),n.bind(null,t,2));t.s=e,t.v=i;var o=t.o;o&&o(t)}}var t=function(){try{var t,o,u,f,h=[],c=!0,v=!1,a=i(function(){return function(i,f){try{var v=function(){t=function(n){var t;if(\\"undefined\\"!=typeof Symbol){if(Symbol.asyncIterator&&null!=(t=n[Symbol.asyncIterator]))return t.call(n);if(Symbol.iterator&&null!=(t=n[Symbol.iterator]))return t.call(n)}throw new TypeError(\\"Object is not async iterable\\")}([1,2]);var i=function(t,i,o){for(var u;;){var f=t();if(e(f)&&(f=f.v),!f)return h;if(f.then){u=0;break}var h=o();if(h&&h.then){if(!e(h)){u=1;break}h=h.s}if(i){var c=i();if(c&&c.then&&!e(c)){u=2;break}}}var v=new r,a=n.bind(null,v,2);return(0===u?f.then(s):1===u?h.then(l):c.then(d)).then(void 0,a),v;function l(r){h=r;do{if(i&&(c=i())&&c.then&&!e(c))return void c.then(d).then(void 0,a);if(!(f=t())||e(f)&&!f.v)return void n(v,1,h);if(f.then)return void f.then(s).then(void 0,a);e(h=o())&&(h=h.v)}while(!h||!h.then);h.then(l).then(void 0,a)}function s(t){t?(h=o())&&h.then?h.then(l).then(void 0,a):l(h):n(v,1,h)}function d(){(f=t())?f.then?f.then(s).then(void 0,a):s(f):n(v,1,h)}}(function(){return!!Promise.resolve(t.next()).then(function(n){return c=o.done,o=n,Promise.resolve(o.value).then(function(n){return u=n,!c})})},function(){return!!(c=!0)},function(){h.push(u)});if(i&&i.then)return i.then(function(){})}()}catch(n){return f(n)}return v&&v.then?v.then(void 0,f):v}(0,function(n){v=!0,f=n})},function(n,r){function e(t){if(n)throw r;return r}var o=i(function(){var n=function(){if(!c&&null!=t.return)return Promise.resolve(t.return()).then(function(){})}();if(n&&n.then)return n.then(function(){})},function(n,t){if(v)throw f;if(n)throw t;return t});return o&&o.then?o.then(e):e()});return Promise.resolve(a&&a.then?a.then(function(n){return h}):h)}catch(n){return Promise.reject(n)}},r=function(){function t(){}return t.prototype.then=function(r,e){var i=new t,o=this.s;if(o){var u=1&o?r:e;if(u){try{n(i,1,u(this.v))}catch(t){n(i,2,t)}return i}return this}return this.o=function(t){try{var o=t.v;1&t.s?n(i,1,r?r(o):o):e?n(i,1,e(o)):n(i,2,o)}catch(t){n(i,2,t)}},i},t}();function e(n){return n instanceof r&&1&n.s}function i(n,t){try{var r=n()}catch(n){return t(!0,n)}return r&&r.then?r.then(t.bind(null,!1),t.bind(null,!0)):t(!1,r)}t().then(console.log);export default t; -//# sourceMappingURL=esnext-ts.esm.js.map +"function n(t,e,i){if(!t.s){if(i instanceof r){if(!i.s)return void(i.o=n.bind(null,t,e));1&e&&(e=i.s),i=i.v}if(i&&i.then)return void i.then(n.bind(null,t,e),n.bind(null,t,2));t.s=e,t.v=i;var o=t.o;o&&o(t)}}var t=function(){try{var t,o,u,f,h=[],c=!0,v=!1,l=i(function(){return function(i,f){try{var v=function(){t=function(n){var t;if(\\"undefined\\"!=typeof Symbol){if(Symbol.asyncIterator&&null!=(t=n[Symbol.asyncIterator]))return t.call(n);if(Symbol.iterator&&null!=(t=n[Symbol.iterator]))return t.call(n)}throw new TypeError(\\"Object is not async iterable\\")}([1,2]);var i=function(t,i,o){for(var u;;){var f=t();if(e(f)&&(f=f.v),!f)return h;if(f.then){u=0;break}var h=o();if(h&&h.then){if(!e(h)){u=1;break}h=h.s}if(i){var c=i();if(c&&c.then&&!e(c)){u=2;break}}}var v=new r,l=n.bind(null,v,2);return(0===u?f.then(s):1===u?h.then(a):c.then(d)).then(void 0,l),v;function a(r){h=r;do{if(i&&(c=i())&&c.then&&!e(c))return void c.then(d).then(void 0,l);if(!(f=t())||e(f)&&!f.v)return void n(v,1,h);if(f.then)return void f.then(s).then(void 0,l);e(h=o())&&(h=h.v)}while(!h||!h.then);h.then(a).then(void 0,l)}function s(t){t?(h=o())&&h.then?h.then(a).then(void 0,l):a(h):n(v,1,h)}function d(){(f=t())?f.then?f.then(s).then(void 0,l):s(f):n(v,1,h)}}(function(){return Promise.resolve(t.next()).then(function(n){return c=o.done,o=n,Promise.resolve(o.value).then(function(n){return u=n,!c})})},function(){return!!(c=!0)},function(){h.push(u)});if(i&&i.then)return i.then(function(){})}()}catch(n){return f(n)}return v&&v.then?v.then(void 0,f):v}(0,function(n){v=!0,f=n})},function(n,r){function e(t){if(n)throw r;return r}var o=i(function(){var n=function(){if(!c&&null!=t.return)return Promise.resolve(t.return()).then(function(){})}();if(n&&n.then)return n.then(function(){})},function(n,t){if(v)throw f;if(n)throw t;return t});return o&&o.then?o.then(e):e()});return Promise.resolve(l&&l.then?l.then(function(n){return h}):h)}catch(n){return Promise.reject(n)}};const r=/*#__PURE__*/function(){function t(){}return t.prototype.then=function(r,e){const i=new t,o=this.s;if(o){const t=1&o?r:e;if(t){try{n(i,1,t(this.v))}catch(t){n(i,2,t)}return i}return this}return this.o=function(t){try{const o=t.v;1&t.s?n(i,1,r?r(o):o):e?n(i,1,e(o)):n(i,2,o)}catch(t){n(i,2,t)}},i},t}();function e(n){return n instanceof r&&1&n.s}function i(n,t){try{var r=n()}catch(n){return t(!0,n)}return r&&r.then?r.then(t.bind(null,!1),t.bind(null,!0)):t(!1,r)}t().then(console.log);export default t; +//# sourceMappingURL=esnext-ts.esm.mjs.map " `; exports[`fixtures build esnext-ts with microbundle 4`] = ` -"function n(t,e,i){if(!t.s){if(i instanceof r){if(!i.s)return void(i.o=n.bind(null,t,e));1&e&&(e=i.s),i=i.v}if(i&&i.then)return void i.then(n.bind(null,t,e),n.bind(null,t,2));t.s=e,t.v=i;var o=t.o;o&&o(t)}}var t=function(){try{var t,o,u,f,h=[],c=!0,v=!1,a=i(function(){return function(i,f){try{var v=function(){t=function(n){var t;if(\\"undefined\\"!=typeof Symbol){if(Symbol.asyncIterator&&null!=(t=n[Symbol.asyncIterator]))return t.call(n);if(Symbol.iterator&&null!=(t=n[Symbol.iterator]))return t.call(n)}throw new TypeError(\\"Object is not async iterable\\")}([1,2]);var i=function(t,i,o){for(var u;;){var f=t();if(e(f)&&(f=f.v),!f)return h;if(f.then){u=0;break}var h=o();if(h&&h.then){if(!e(h)){u=1;break}h=h.s}if(i){var c=i();if(c&&c.then&&!e(c)){u=2;break}}}var v=new r,a=n.bind(null,v,2);return(0===u?f.then(s):1===u?h.then(l):c.then(d)).then(void 0,a),v;function l(r){h=r;do{if(i&&(c=i())&&c.then&&!e(c))return void c.then(d).then(void 0,a);if(!(f=t())||e(f)&&!f.v)return void n(v,1,h);if(f.then)return void f.then(s).then(void 0,a);e(h=o())&&(h=h.v)}while(!h||!h.then);h.then(l).then(void 0,a)}function s(t){t?(h=o())&&h.then?h.then(l).then(void 0,a):l(h):n(v,1,h)}function d(){(f=t())?f.then?f.then(s).then(void 0,a):s(f):n(v,1,h)}}(function(){return!!Promise.resolve(t.next()).then(function(n){return c=o.done,o=n,Promise.resolve(o.value).then(function(n){return u=n,!c})})},function(){return!!(c=!0)},function(){h.push(u)});if(i&&i.then)return i.then(function(){})}()}catch(n){return f(n)}return v&&v.then?v.then(void 0,f):v}(0,function(n){v=!0,f=n})},function(n,r){function e(t){if(n)throw r;return r}var o=i(function(){var n=function(){if(!c&&null!=t.return)return Promise.resolve(t.return()).then(function(){})}();if(n&&n.then)return n.then(function(){})},function(n,t){if(v)throw f;if(n)throw t;return t});return o&&o.then?o.then(e):e()});return Promise.resolve(a&&a.then?a.then(function(n){return h}):h)}catch(n){return Promise.reject(n)}},r=function(){function t(){}return t.prototype.then=function(r,e){var i=new t,o=this.s;if(o){var u=1&o?r:e;if(u){try{n(i,1,u(this.v))}catch(t){n(i,2,t)}return i}return this}return this.o=function(t){try{var o=t.v;1&t.s?n(i,1,r?r(o):o):e?n(i,1,e(o)):n(i,2,o)}catch(t){n(i,2,t)}},i},t}();function e(n){return n instanceof r&&1&n.s}function i(n,t){try{var r=n()}catch(n){return t(!0,n)}return r&&r.then?r.then(t.bind(null,!1),t.bind(null,!0)):t(!1,r)}t().then(console.log),module.exports=t; +"function n(t,e,i){if(!t.s){if(i instanceof r){if(!i.s)return void(i.o=n.bind(null,t,e));1&e&&(e=i.s),i=i.v}if(i&&i.then)return void i.then(n.bind(null,t,e),n.bind(null,t,2));t.s=e,t.v=i;var o=t.o;o&&o(t)}}var t=function(){try{var t,o,u,f,h=[],c=!0,v=!1,l=i(function(){return function(i,f){try{var v=function(){t=function(n){var t;if(\\"undefined\\"!=typeof Symbol){if(Symbol.asyncIterator&&null!=(t=n[Symbol.asyncIterator]))return t.call(n);if(Symbol.iterator&&null!=(t=n[Symbol.iterator]))return t.call(n)}throw new TypeError(\\"Object is not async iterable\\")}([1,2]);var i=function(t,i,o){for(var u;;){var f=t();if(e(f)&&(f=f.v),!f)return h;if(f.then){u=0;break}var h=o();if(h&&h.then){if(!e(h)){u=1;break}h=h.s}if(i){var c=i();if(c&&c.then&&!e(c)){u=2;break}}}var v=new r,l=n.bind(null,v,2);return(0===u?f.then(s):1===u?h.then(a):c.then(d)).then(void 0,l),v;function a(r){h=r;do{if(i&&(c=i())&&c.then&&!e(c))return void c.then(d).then(void 0,l);if(!(f=t())||e(f)&&!f.v)return void n(v,1,h);if(f.then)return void f.then(s).then(void 0,l);e(h=o())&&(h=h.v)}while(!h||!h.then);h.then(a).then(void 0,l)}function s(t){t?(h=o())&&h.then?h.then(a).then(void 0,l):a(h):n(v,1,h)}function d(){(f=t())?f.then?f.then(s).then(void 0,l):s(f):n(v,1,h)}}(function(){return Promise.resolve(t.next()).then(function(n){return c=o.done,o=n,Promise.resolve(o.value).then(function(n){return u=n,!c})})},function(){return!!(c=!0)},function(){h.push(u)});if(i&&i.then)return i.then(function(){})}()}catch(n){return f(n)}return v&&v.then?v.then(void 0,f):v}(0,function(n){v=!0,f=n})},function(n,r){function e(t){if(n)throw r;return r}var o=i(function(){var n=function(){if(!c&&null!=t.return)return Promise.resolve(t.return()).then(function(){})}();if(n&&n.then)return n.then(function(){})},function(n,t){if(v)throw f;if(n)throw t;return t});return o&&o.then?o.then(e):e()});return Promise.resolve(l&&l.then?l.then(function(n){return h}):h)}catch(n){return Promise.reject(n)}};const r=/*#__PURE__*/function(){function t(){}return t.prototype.then=function(r,e){const i=new t,o=this.s;if(o){const t=1&o?r:e;if(t){try{n(i,1,t(this.v))}catch(t){n(i,2,t)}return i}return this}return this.o=function(t){try{const o=t.v;1&t.s?n(i,1,r?r(o):o):e?n(i,1,e(o)):n(i,2,o)}catch(t){n(i,2,t)}},i},t}();function e(n){return n instanceof r&&1&n.s}function i(n,t){try{var r=n()}catch(n){return t(!0,n)}return r&&r.then?r.then(t.bind(null,!1),t.bind(null,!0)):t(!1,r)}t().then(console.log),module.exports=t; //# sourceMappingURL=esnext-ts.js.map " `; exports[`fixtures build esnext-ts with microbundle 5`] = ` -"!function(n,t){\\"object\\"==typeof exports&&\\"undefined\\"!=typeof module?module.exports=t():\\"function\\"==typeof define&&define.amd?define(t):(n||self).esnextTs=t()}(this,function(){function n(t,r,i){if(!t.s){if(i instanceof e){if(!i.s)return void(i.o=n.bind(null,t,r));1&r&&(r=i.s),i=i.v}if(i&&i.then)return void i.then(n.bind(null,t,r),n.bind(null,t,2));t.s=r,t.v=i;var o=t.o;o&&o(t)}}var t=function(){try{var t,o,u,f,h=[],c=!0,l=!1,a=i(function(){return function(i,f){try{var l=function(){t=function(n){var t;if(\\"undefined\\"!=typeof Symbol){if(Symbol.asyncIterator&&null!=(t=n[Symbol.asyncIterator]))return t.call(n);if(Symbol.iterator&&null!=(t=n[Symbol.iterator]))return t.call(n)}throw new TypeError(\\"Object is not async iterable\\")}([1,2]);var i=function(t,i,o){for(var u;;){var f=t();if(r(f)&&(f=f.v),!f)return h;if(f.then){u=0;break}var h=o();if(h&&h.then){if(!r(h)){u=1;break}h=h.s}if(i){var c=i();if(c&&c.then&&!r(c)){u=2;break}}}var l=new e,a=n.bind(null,l,2);return(0===u?f.then(s):1===u?h.then(v):c.then(d)).then(void 0,a),l;function v(e){h=e;do{if(i&&(c=i())&&c.then&&!r(c))return void c.then(d).then(void 0,a);if(!(f=t())||r(f)&&!f.v)return void n(l,1,h);if(f.then)return void f.then(s).then(void 0,a);r(h=o())&&(h=h.v)}while(!h||!h.then);h.then(v).then(void 0,a)}function s(t){t?(h=o())&&h.then?h.then(v).then(void 0,a):v(h):n(l,1,h)}function d(){(f=t())?f.then?f.then(s).then(void 0,a):s(f):n(l,1,h)}}(function(){return!!Promise.resolve(t.next()).then(function(n){return c=o.done,o=n,Promise.resolve(o.value).then(function(n){return u=n,!c})})},function(){return!!(c=!0)},function(){h.push(u)});if(i&&i.then)return i.then(function(){})}()}catch(n){return f(n)}return l&&l.then?l.then(void 0,f):l}(0,function(n){l=!0,f=n})},function(n,e){function r(t){if(n)throw e;return e}var o=i(function(){var n=function(){if(!c&&null!=t.return)return Promise.resolve(t.return()).then(function(){})}();if(n&&n.then)return n.then(function(){})},function(n,t){if(l)throw f;if(n)throw t;return t});return o&&o.then?o.then(r):r()});return Promise.resolve(a&&a.then?a.then(function(n){return h}):h)}catch(n){return Promise.reject(n)}},e=function(){function t(){}return t.prototype.then=function(e,r){var i=new t,o=this.s;if(o){var u=1&o?e:r;if(u){try{n(i,1,u(this.v))}catch(t){n(i,2,t)}return i}return this}return this.o=function(t){try{var o=t.v;1&t.s?n(i,1,e?e(o):o):r?n(i,1,r(o)):n(i,2,o)}catch(t){n(i,2,t)}},i},t}();function r(n){return n instanceof e&&1&n.s}function i(n,t){try{var e=n()}catch(n){return t(!0,n)}return e&&e.then?e.then(t.bind(null,!1),t.bind(null,!0)):t(!1,e)}return t().then(console.log),t}); +"!function(n,t){\\"object\\"==typeof exports&&\\"undefined\\"!=typeof module?module.exports=t():\\"function\\"==typeof define&&define.amd?define(t):(n||self).esnextTs=t()}(this,function(){function n(t,r,i){if(!t.s){if(i instanceof e){if(!i.s)return void(i.o=n.bind(null,t,r));1&r&&(r=i.s),i=i.v}if(i&&i.then)return void i.then(n.bind(null,t,r),n.bind(null,t,2));t.s=r,t.v=i;var o=t.o;o&&o(t)}}var t=function(){try{var t,o,u,f,c=[],h=!0,l=!1,s=i(function(){return function(i,f){try{var l=function(){t=function(n){var t;if(\\"undefined\\"!=typeof Symbol){if(Symbol.asyncIterator&&null!=(t=n[Symbol.asyncIterator]))return t.call(n);if(Symbol.iterator&&null!=(t=n[Symbol.iterator]))return t.call(n)}throw new TypeError(\\"Object is not async iterable\\")}([1,2]);var i=function(t,i,o){for(var u;;){var f=t();if(r(f)&&(f=f.v),!f)return c;if(f.then){u=0;break}var c=o();if(c&&c.then){if(!r(c)){u=1;break}c=c.s}if(i){var h=i();if(h&&h.then&&!r(h)){u=2;break}}}var l=new e,s=n.bind(null,l,2);return(0===u?f.then(v):1===u?c.then(a):h.then(d)).then(void 0,s),l;function a(e){c=e;do{if(i&&(h=i())&&h.then&&!r(h))return void h.then(d).then(void 0,s);if(!(f=t())||r(f)&&!f.v)return void n(l,1,c);if(f.then)return void f.then(v).then(void 0,s);r(c=o())&&(c=c.v)}while(!c||!c.then);c.then(a).then(void 0,s)}function v(t){t?(c=o())&&c.then?c.then(a).then(void 0,s):a(c):n(l,1,c)}function d(){(f=t())?f.then?f.then(v).then(void 0,s):v(f):n(l,1,c)}}(function(){return Promise.resolve(t.next()).then(function(n){return h=o.done,o=n,Promise.resolve(o.value).then(function(n){return u=n,!h})})},function(){return!!(h=!0)},function(){c.push(u)});if(i&&i.then)return i.then(function(){})}()}catch(n){return f(n)}return l&&l.then?l.then(void 0,f):l}(0,function(n){l=!0,f=n})},function(n,e){function r(t){if(n)throw e;return e}var o=i(function(){var n=function(){if(!h&&null!=t.return)return Promise.resolve(t.return()).then(function(){})}();if(n&&n.then)return n.then(function(){})},function(n,t){if(l)throw f;if(n)throw t;return t});return o&&o.then?o.then(r):r()});return Promise.resolve(s&&s.then?s.then(function(n){return c}):c)}catch(n){return Promise.reject(n)}};const e=/*#__PURE__*/function(){function t(){}return t.prototype.then=function(e,r){const i=new t,o=this.s;if(o){const t=1&o?e:r;if(t){try{n(i,1,t(this.v))}catch(t){n(i,2,t)}return i}return this}return this.o=function(t){try{const o=t.v;1&t.s?n(i,1,e?e(o):o):r?n(i,1,r(o)):n(i,2,o)}catch(t){n(i,2,t)}},i},t}();function r(n){return n instanceof e&&1&n.s}function i(n,t){try{var e=n()}catch(n){return t(!0,n)}return e&&e.then?e.then(t.bind(null,!1),t.bind(null,!0)):t(!1,e)}return t().then(console.log),t}); //# sourceMappingURL=esnext-ts.umd.js.map " `; @@ -1686,7 +1896,7 @@ Directory tree: inline-source-map dist - inline-source-map.esm.js + inline-source-map.esm.mjs inline-source-map.js inline-source-map.umd.js package.json @@ -1695,11 +1905,11 @@ inline-source-map two.js -Build \\"inlineSourceMap\\" to dist: +Build \\"inline-source-map\\" to dist: 187 B: inline-source-map.js.gz 138 B: inline-source-map.js.br -188 B: inline-source-map.esm.js.gz -139 B: inline-source-map.esm.js.br +188 B: inline-source-map.esm.mjs.gz +139 B: inline-source-map.esm.mjs.br 278 B: inline-source-map.umd.js.gz 217 B: inline-source-map.umd.js.br" `; @@ -1708,19 +1918,19 @@ exports[`fixtures build inline-source-map with microbundle 2`] = `3`; exports[`fixtures build inline-source-map with microbundle 3`] = ` "var r=function(){try{var r=arguments;return Promise.resolve([].slice.call(r).reduce(function(r,e){return r+e},0))}catch(r){return Promise.reject(r)}};export default function(){try{var e=arguments,t=[].slice.call(e);return Promise.resolve(r.apply(void 0,t)).then(function(e){return Promise.resolve(r.apply(void 0,t)).then(function(r){return[e,r]})})}catch(r){return Promise.reject(r)}} -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5saW5lLXNvdXJjZS1tYXAuZXNtLmpzIiwic291cmNlcyI6WyIuLi9zcmMvdHdvLmpzIiwiLi4vc3JjL2luZGV4LmpzIl0sInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCBhc3luYyBmdW5jdGlvbiB0d28oLi4uYXJncykge1xuXHRyZXR1cm4gYXJncy5yZWR1Y2UoKHRvdGFsLCB2YWx1ZSkgPT4gdG90YWwgKyB2YWx1ZSwgMCk7XG59XG4iLCJpbXBvcnQgeyB0d28gfSBmcm9tICcuL3R3byc7XG5cbmV4cG9ydCBkZWZhdWx0IGFzeW5jIGZ1bmN0aW9uKC4uLmFyZ3MpIHtcblx0cmV0dXJuIFthd2FpdCB0d28oLi4uYXJncyksIGF3YWl0IHR3byguLi5hcmdzKV07XG59XG4iXSwibmFtZXMiOlsidHdvIiwicmVkdWNlIiwidG90YWwiLCJ2YWx1ZSIsImFyZ3MiXSwibWFwcGluZ3MiOiJJQUFzQkEsaUNBQ3JCLHVCQUFPLGlCQUFLQyxPQUFPLFNBQUNDLEVBQU9DLFVBQVVELEVBQVFDLEdBQU8sSUFEckQsa0ZDRWlDQywwQ0FDbEJKLGVBQU9JLDRDQUFhSixlQUFPSSxxQkFBekMsTUFBTyxVQURSIn0= +//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5saW5lLXNvdXJjZS1tYXAuZXNtLm1qcyIsInNvdXJjZXMiOlsiLi4vc3JjL3R3by5qcyIsIi4uL3NyYy9pbmRleC5qcyJdLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgYXN5bmMgZnVuY3Rpb24gdHdvKC4uLmFyZ3MpIHtcblx0cmV0dXJuIGFyZ3MucmVkdWNlKCh0b3RhbCwgdmFsdWUpID0+IHRvdGFsICsgdmFsdWUsIDApO1xufVxuIiwiaW1wb3J0IHsgdHdvIH0gZnJvbSAnLi90d28nO1xuXG5leHBvcnQgZGVmYXVsdCBhc3luYyBmdW5jdGlvbiAoLi4uYXJncykge1xuXHRyZXR1cm4gW2F3YWl0IHR3byguLi5hcmdzKSwgYXdhaXQgdHdvKC4uLmFyZ3MpXTtcbn1cbiJdLCJuYW1lcyI6WyJ0d28iLCJyZWR1Y2UiLCJ0b3RhbCIsInZhbHVlIiwiYXJncyJdLCJtYXBwaW5ncyI6IklBQXNCQSxpQ0FDckIsdUJBQU8saUJBQUtDLE9BQU8sU0FBQ0MsRUFBT0MsVUFBVUQsRUFBUUMsR0FBTyxJQURyRCxrRkNFa0NDLDBDQUNuQkosZUFBT0ksNENBQWFKLGVBQU9JLHFCQUF6QyxNQUFPLFVBRFIifQ== " `; exports[`fixtures build inline-source-map with microbundle 4`] = ` "var r=function(){try{var r=arguments;return Promise.resolve([].slice.call(r).reduce(function(r,e){return r+e},0))}catch(r){return Promise.reject(r)}};module.exports=function(){try{var e=arguments,t=[].slice.call(e);return Promise.resolve(r.apply(void 0,t)).then(function(e){return Promise.resolve(r.apply(void 0,t)).then(function(r){return[e,r]})})}catch(r){return Promise.reject(r)}}; -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5saW5lLXNvdXJjZS1tYXAuanMiLCJzb3VyY2VzIjpbIi4uL3NyYy90d28uanMiLCIuLi9zcmMvaW5kZXguanMiXSwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0IGFzeW5jIGZ1bmN0aW9uIHR3byguLi5hcmdzKSB7XG5cdHJldHVybiBhcmdzLnJlZHVjZSgodG90YWwsIHZhbHVlKSA9PiB0b3RhbCArIHZhbHVlLCAwKTtcbn1cbiIsImltcG9ydCB7IHR3byB9IGZyb20gJy4vdHdvJztcblxuZXhwb3J0IGRlZmF1bHQgYXN5bmMgZnVuY3Rpb24oLi4uYXJncykge1xuXHRyZXR1cm4gW2F3YWl0IHR3byguLi5hcmdzKSwgYXdhaXQgdHdvKC4uLmFyZ3MpXTtcbn1cbiJdLCJuYW1lcyI6WyJ0d28iLCJyZWR1Y2UiLCJ0b3RhbCIsInZhbHVlIiwiYXJncyJdLCJtYXBwaW5ncyI6IklBQXNCQSxpQ0FDckIsdUJBQU8saUJBQUtDLE9BQU8sU0FBQ0MsRUFBT0MsVUFBVUQsRUFBUUMsR0FBTyxJQURyRCxrRkNFaUNDLDBDQUNsQkosZUFBT0ksNENBQWFKLGVBQU9JLHFCQUF6QyxNQUFPLFVBRFIifQ== +//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5saW5lLXNvdXJjZS1tYXAuanMiLCJzb3VyY2VzIjpbIi4uL3NyYy90d28uanMiLCIuLi9zcmMvaW5kZXguanMiXSwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0IGFzeW5jIGZ1bmN0aW9uIHR3byguLi5hcmdzKSB7XG5cdHJldHVybiBhcmdzLnJlZHVjZSgodG90YWwsIHZhbHVlKSA9PiB0b3RhbCArIHZhbHVlLCAwKTtcbn1cbiIsImltcG9ydCB7IHR3byB9IGZyb20gJy4vdHdvJztcblxuZXhwb3J0IGRlZmF1bHQgYXN5bmMgZnVuY3Rpb24gKC4uLmFyZ3MpIHtcblx0cmV0dXJuIFthd2FpdCB0d28oLi4uYXJncyksIGF3YWl0IHR3byguLi5hcmdzKV07XG59XG4iXSwibmFtZXMiOlsidHdvIiwicmVkdWNlIiwidG90YWwiLCJ2YWx1ZSIsImFyZ3MiXSwibWFwcGluZ3MiOiJJQUFzQkEsaUNBQ3JCLHVCQUFPLGlCQUFLQyxPQUFPLFNBQUNDLEVBQU9DLFVBQVVELEVBQVFDLEdBQU8sSUFEckQsa0ZDRWtDQywwQ0FDbkJKLGVBQU9JLDRDQUFhSixlQUFPSSxxQkFBekMsTUFBTyxVQURSIn0= " `; exports[`fixtures build inline-source-map with microbundle 5`] = ` "!function(e,n){\\"object\\"==typeof exports&&\\"undefined\\"!=typeof module?module.exports=n():\\"function\\"==typeof define&&define.amd?define(n):(e||self).inlineSourceMap=n()}(this,function(){var e=function(){try{var e=arguments;return Promise.resolve([].slice.call(e).reduce(function(e,n){return e+n},0))}catch(e){return Promise.reject(e)}};return function(){try{var n=arguments,r=[].slice.call(n);return Promise.resolve(e.apply(void 0,r)).then(function(n){return Promise.resolve(e.apply(void 0,r)).then(function(e){return[n,e]})})}catch(e){return Promise.reject(e)}}}); -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5saW5lLXNvdXJjZS1tYXAudW1kLmpzIiwic291cmNlcyI6WyIuLi9zcmMvdHdvLmpzIiwiLi4vc3JjL2luZGV4LmpzIl0sInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCBhc3luYyBmdW5jdGlvbiB0d28oLi4uYXJncykge1xuXHRyZXR1cm4gYXJncy5yZWR1Y2UoKHRvdGFsLCB2YWx1ZSkgPT4gdG90YWwgKyB2YWx1ZSwgMCk7XG59XG4iLCJpbXBvcnQgeyB0d28gfSBmcm9tICcuL3R3byc7XG5cbmV4cG9ydCBkZWZhdWx0IGFzeW5jIGZ1bmN0aW9uKC4uLmFyZ3MpIHtcblx0cmV0dXJuIFthd2FpdCB0d28oLi4uYXJncyksIGF3YWl0IHR3byguLi5hcmdzKV07XG59XG4iXSwibmFtZXMiOlsidHdvIiwicmVkdWNlIiwidG90YWwiLCJ2YWx1ZSIsImFyZ3MiXSwibWFwcGluZ3MiOiJzT0FBc0JBLGlDQUNyQix1QkFBTyxpQkFBS0MsT0FBTyxTQUFDQyxFQUFPQyxVQUFVRCxFQUFRQyxHQUFPLElBRHJELDBFQ0VpQ0MsMENBQ2xCSixlQUFPSSw0Q0FBYUosZUFBT0kscUJBQXpDLE1BQU8sVUFEUiJ9 +//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5saW5lLXNvdXJjZS1tYXAudW1kLmpzIiwic291cmNlcyI6WyIuLi9zcmMvdHdvLmpzIiwiLi4vc3JjL2luZGV4LmpzIl0sInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCBhc3luYyBmdW5jdGlvbiB0d28oLi4uYXJncykge1xuXHRyZXR1cm4gYXJncy5yZWR1Y2UoKHRvdGFsLCB2YWx1ZSkgPT4gdG90YWwgKyB2YWx1ZSwgMCk7XG59XG4iLCJpbXBvcnQgeyB0d28gfSBmcm9tICcuL3R3byc7XG5cbmV4cG9ydCBkZWZhdWx0IGFzeW5jIGZ1bmN0aW9uICguLi5hcmdzKSB7XG5cdHJldHVybiBbYXdhaXQgdHdvKC4uLmFyZ3MpLCBhd2FpdCB0d28oLi4uYXJncyldO1xufVxuIl0sIm5hbWVzIjpbInR3byIsInJlZHVjZSIsInRvdGFsIiwidmFsdWUiLCJhcmdzIl0sIm1hcHBpbmdzIjoiMExBQXNCQSxpQ0FDckIsdUJBQU8saUJBQUtDLE9BQU8sU0FBQ0MsRUFBT0MsVUFBVUQsRUFBUUMsR0FBTyxJQURyRCwwRUNFa0NDLDBDQUNuQkosZUFBT0ksNENBQWFKLGVBQU9JLHFCQUF6QyxNQUFPLFVBRFIifQ== " `; @@ -1731,8 +1941,8 @@ Directory tree: jsx dist - jsx.esm.js - jsx.esm.js.map + jsx.esm.mjs + jsx.esm.mjs.map jsx.js jsx.js.map jsx.umd.js @@ -1742,30 +1952,31 @@ jsx Build \\"jsx\\" to dist: -221 B: jsx.js.gz -179 B: jsx.js.br -223 B: jsx.esm.js.gz -193 B: jsx.esm.js.br -297 B: jsx.umd.js.gz -236 B: jsx.umd.js.br" +239 B: jsx.js.gz +195 B: jsx.js.br +237 B: jsx.esm.mjs.gz +201 B: jsx.esm.mjs.br +313 B: jsx.umd.js.gz +248 B: jsx.umd.js.br" `; exports[`fixtures build jsx with microbundle 2`] = `6`; exports[`fixtures build jsx with microbundle 3`] = ` -"var n=function(n,r){return{tag:n,props:r,children:[].slice.call(arguments,2)}},r=function(n){return n.children},l=function(){function l(){}return l.prototype.render=function(){return n(\\"div\\",{id:\\"app\\"},n(\\"h1\\",null,\\"Hello, World!\\"),n(\\"p\\",null,\\"A JSX demo.\\"),n(r,null,n(\\"p\\",null,\\"Test fragment\\")))},l}();export default l; -//# sourceMappingURL=jsx.esm.js.map +"var n=function(n,r){return{tag:n,props:r,children:[].slice.call(arguments,2)}},r=function(n){return n.children},l=/*#__PURE__*/function(){function l(){}return l.prototype.render=function(){return n(\\"div\\",{id:\\"app\\"},n(\\"h1\\",null,\\"Hello, World!\\"),n(\\"p\\",null,\\"A JSX demo.\\"),n(r,null,n(\\"p\\",null,\\"Test fragment\\")))},l}();export default l; +//# sourceMappingURL=jsx.esm.mjs.map " `; exports[`fixtures build jsx with microbundle 4`] = ` -"var n=function(n,r){return{tag:n,props:r,children:[].slice.call(arguments,2)}},r=function(n){return n.children};module.exports=function(){function l(){}return l.prototype.render=function(){return n(\\"div\\",{id:\\"app\\"},n(\\"h1\\",null,\\"Hello, World!\\"),n(\\"p\\",null,\\"A JSX demo.\\"),n(r,null,n(\\"p\\",null,\\"Test fragment\\")))},l}(); +"var n=function(n,r){return{tag:n,props:r,children:[].slice.call(arguments,2)}},r=function(n){return n.children};module.exports=/*#__PURE__*/function(){function l(){}return l.prototype.render=function(){return n(\\"div\\",{id:\\"app\\"},n(\\"h1\\",null,\\"Hello, World!\\"),n(\\"p\\",null,\\"A JSX demo.\\"),n(r,null,n(\\"p\\",null,\\"Test fragment\\")))},l}(); //# sourceMappingURL=jsx.js.map " `; exports[`fixtures build jsx with microbundle 5`] = ` -"!function(n,e){\\"object\\"==typeof exports&&\\"undefined\\"!=typeof module?module.exports=e():\\"function\\"==typeof define&&define.amd?define(e):(n||self).jsx=e()}(this,function(){var n=function(n,e){return{tag:n,props:e,children:[].slice.call(arguments,2)}},e=function(n){return n.children};return function(){function t(){}return t.prototype.render=function(){return n(\\"div\\",{id:\\"app\\"},n(\\"h1\\",null,\\"Hello, World!\\"),n(\\"p\\",null,\\"A JSX demo.\\"),n(e,null,n(\\"p\\",null,\\"Test fragment\\")))},t}()}); +"!function(n,e){\\"object\\"==typeof exports&&\\"undefined\\"!=typeof module?module.exports=e():\\"function\\"==typeof define&&define.amd?define(e):(n||self).jsx=e()}(this,function(){var n=function(n,e){return{tag:n,props:e,children:[].slice.call(arguments,2)}},e=function(n){return n.children};/*#__PURE__*/ +return function(){function t(){}return t.prototype.render=function(){return n(\\"div\\",{id:\\"app\\"},n(\\"h1\\",null,\\"Hello, World!\\"),n(\\"p\\",null,\\"A JSX demo.\\"),n(e,null,n(\\"p\\",null,\\"Test fragment\\")))},t}()}); //# sourceMappingURL=jsx.umd.js.map " `; @@ -1777,8 +1988,8 @@ Directory tree: macro dist - macro-lib.esm.js - macro-lib.esm.js.map + macro-lib.esm.mjs + macro-lib.esm.mjs.map macro-lib.js macro-lib.js.map macro-lib.umd.js @@ -1789,11 +2000,11 @@ macro macro.js -Build \\"macroLib\\" to dist: +Build \\"macro-lib\\" to dist: 49 B: macro-lib.js.gz 33 B: macro-lib.js.br -48 B: macro-lib.esm.js.gz -32 B: macro-lib.esm.js.br +48 B: macro-lib.esm.mjs.gz +32 B: macro-lib.esm.mjs.br 156 B: macro-lib.umd.js.gz 126 B: macro-lib.umd.js.br" `; @@ -1802,7 +2013,7 @@ exports[`fixtures build macro with microbundle 2`] = `6`; exports[`fixtures build macro with microbundle 3`] = ` "export default\\"name-macro\\"; -//# sourceMappingURL=macro-lib.esm.js.map +//# sourceMappingURL=macro-lib.esm.mjs.map " `; @@ -1825,8 +2036,8 @@ Directory tree: mangle-json-file dist - mangle-json-file.esm.js - mangle-json-file.esm.js.map + mangle-json-file.esm.mjs + mangle-json-file.esm.mjs.map mangle-json-file.js mangle-json-file.js.map mangle-json-file.umd.js @@ -1838,11 +2049,11 @@ mangle-json-file two.js -Build \\"mangleJsonFile\\" to dist: +Build \\"mangle-json-file\\" to dist: 103 B: mangle-json-file.js.gz 89 B: mangle-json-file.js.br -105 B: mangle-json-file.esm.js.gz -91 B: mangle-json-file.esm.js.br +105 B: mangle-json-file.esm.mjs.gz +91 B: mangle-json-file.esm.mjs.br 196 B: mangle-json-file.umd.js.gz 171 B: mangle-json-file.umd.js.br" `; @@ -1851,7 +2062,7 @@ exports[`fixtures build mangle-json-file with microbundle 2`] = `6`; exports[`fixtures build mangle-json-file with microbundle 3`] = ` "var o={prop1:1,__p2:2};function r(){return console.log(o.prop1),console.log(o.__p2),o}export default r; -//# sourceMappingURL=mangle-json-file.esm.js.map +//# sourceMappingURL=mangle-json-file.esm.mjs.map " `; @@ -1874,8 +2085,8 @@ Directory tree: minify-config dist - minify-config.esm.js - minify-config.esm.js.map + minify-config.esm.mjs + minify-config.esm.mjs.map minify-config.js minify-config.js.map minify-config.umd.js @@ -1886,11 +2097,11 @@ minify-config two.js -Build \\"minifyConfig\\" to dist: +Build \\"minify-config\\" to dist: 99 B: minify-config.js.gz 85 B: minify-config.js.br -101 B: minify-config.esm.js.gz -87 B: minify-config.esm.js.br +101 B: minify-config.esm.mjs.gz +87 B: minify-config.esm.mjs.br 189 B: minify-config.umd.js.gz 140 B: minify-config.umd.js.br" `; @@ -1899,7 +2110,7 @@ exports[`fixtures build minify-config with microbundle 2`] = `6`; exports[`fixtures build minify-config with microbundle 3`] = ` "var o={prop1:1,o:2};function r(){return console.log(o.prop1),console.log(o.o),o}export default r; -//# sourceMappingURL=minify-config.esm.js.map +//# sourceMappingURL=minify-config.esm.mjs.map " `; @@ -1922,8 +2133,8 @@ Directory tree: minify-config-boolean dist - minify-config-boolean.esm.js - minify-config-boolean.esm.js.map + minify-config-boolean.esm.mjs + minify-config-boolean.esm.mjs.map minify-config-boolean.js minify-config-boolean.js.map minify-config-boolean.umd.js @@ -1934,11 +2145,11 @@ minify-config-boolean two.js -Build \\"minifyConfigBoolean\\" to dist: +Build \\"minify-config-boolean\\" to dist: 107 B: minify-config-boolean.js.gz 84 B: minify-config-boolean.js.br -114 B: minify-config-boolean.esm.js.gz -90 B: minify-config-boolean.esm.js.br +114 B: minify-config-boolean.esm.mjs.gz +90 B: minify-config-boolean.esm.mjs.br 216 B: minify-config-boolean.umd.js.gz 159 B: minify-config-boolean.umd.js.br" `; @@ -1947,7 +2158,7 @@ exports[`fixtures build minify-config-boolean with microbundle 2`] = `6`; exports[`fixtures build minify-config-boolean with microbundle 3`] = ` "var two={prop1:1,_prop2:2};function index(){return console.log(two.prop1),console.log(two._prop2),two}export default index; -//# sourceMappingURL=minify-config-boolean.esm.js.map +//# sourceMappingURL=minify-config-boolean.esm.mjs.map " `; @@ -1970,8 +2181,8 @@ Directory tree: minify-path-config dist - minify-path-config.esm.js - minify-path-config.esm.js.map + minify-path-config.esm.mjs + minify-path-config.esm.mjs.map minify-path-config.js minify-path-config.js.map minify-path-config.umd.js @@ -1983,11 +2194,11 @@ minify-path-config two.js -Build \\"minifyPathConfig\\" to dist: +Build \\"minify-path-config\\" to dist: 103 B: minify-path-config.js.gz 89 B: minify-path-config.js.br -105 B: minify-path-config.esm.js.gz -91 B: minify-path-config.esm.js.br +105 B: minify-path-config.esm.mjs.gz +91 B: minify-path-config.esm.mjs.br 198 B: minify-path-config.umd.js.gz 152 B: minify-path-config.umd.js.br" `; @@ -1996,7 +2207,7 @@ exports[`fixtures build minify-path-config with microbundle 2`] = `6`; exports[`fixtures build minify-path-config with microbundle 3`] = ` "var o={prop1:1,__p2:2};function r(){return console.log(o.prop1),console.log(o.__p2),o}export default r; -//# sourceMappingURL=minify-path-config.esm.js.map +//# sourceMappingURL=minify-path-config.esm.mjs.map " `; @@ -2019,8 +2230,8 @@ Directory tree: minify-path-parent-dir dist - minify-path-parent-dir.esm.js - minify-path-parent-dir.esm.js.map + minify-path-parent-dir.esm.mjs + minify-path-parent-dir.esm.mjs.map minify-path-parent-dir.js minify-path-parent-dir.js.map minify-path-parent-dir.umd.js @@ -2030,11 +2241,11 @@ minify-path-parent-dir two.js -Build \\"minifyPathParentDir\\" to dist: +Build \\"minify-path-parent-dir\\" to dist: 103 B: minify-path-parent-dir.js.gz 89 B: minify-path-parent-dir.js.br -105 B: minify-path-parent-dir.esm.js.gz -91 B: minify-path-parent-dir.esm.js.br +105 B: minify-path-parent-dir.esm.mjs.gz +91 B: minify-path-parent-dir.esm.mjs.br 200 B: minify-path-parent-dir.umd.js.gz 161 B: minify-path-parent-dir.umd.js.br" `; @@ -2043,7 +2254,7 @@ exports[`fixtures build minify-path-parent-dir-with-cwd with microbundle 2`] = ` exports[`fixtures build minify-path-parent-dir-with-cwd with microbundle 3`] = ` "var o={prop1:1,__p2:2};function r(){return console.log(o.prop1),console.log(o.__p2),o}export default r; -//# sourceMappingURL=minify-path-parent-dir.esm.js.map +//# sourceMappingURL=minify-path-parent-dir.esm.mjs.map " `; @@ -2066,24 +2277,24 @@ Directory tree: modern dist - modern-lib.modern.js - modern-lib.modern.js.map + modern-lib.modern.mjs + modern-lib.modern.mjs.map package.json src index.js two.js -Build \\"modernLib\\" to dist: -113 B: modern-lib.modern.js.gz -92 B: modern-lib.modern.js.br" +Build \\"modern-lib\\" to dist: +113 B: modern-lib.modern.mjs.gz +92 B: modern-lib.modern.mjs.br" `; exports[`fixtures build modern with microbundle 2`] = `2`; exports[`fixtures build modern with microbundle 3`] = ` "async function n(...n){return n.reduce((n,t)=>n+t,0)}async function t(...t){return[await n(...t),await n(...t)]}export default t; -//# sourceMappingURL=modern-lib.modern.js.map +//# sourceMappingURL=modern-lib.modern.mjs.map " `; @@ -2094,12 +2305,12 @@ Directory tree: modern-generators dist - modern-generators.esm.js - modern-generators.esm.js.map + modern-generators.esm.mjs + modern-generators.esm.mjs.map modern-generators.js modern-generators.js.map - modern-generators.modern.js - modern-generators.modern.js.map + modern-generators.modern.mjs + modern-generators.modern.mjs.map modern-generators.umd.js modern-generators.umd.js.map package.json @@ -2108,39 +2319,39 @@ modern-generators two.js -Build \\"modernGenerators\\" to dist: -234 B: modern-generators.js.gz -207 B: modern-generators.js.br -118 B: modern-generators.modern.js.gz -99 B: modern-generators.modern.js.br -233 B: modern-generators.esm.js.gz -191 B: modern-generators.esm.js.br -310 B: modern-generators.umd.js.gz -257 B: modern-generators.umd.js.br" +Build \\"modern-generators\\" to dist: +248 B: modern-generators.js.gz +201 B: modern-generators.js.br +118 B: modern-generators.modern.mjs.gz +99 B: modern-generators.modern.mjs.br +247 B: modern-generators.esm.mjs.gz +218 B: modern-generators.esm.mjs.br +326 B: modern-generators.umd.js.gz +267 B: modern-generators.umd.js.br" `; exports[`fixtures build modern-generators with microbundle 2`] = `8`; exports[`fixtures build modern-generators with microbundle 3`] = ` -"var e=regeneratorRuntime.mark(r);function r(){var r;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:r=0;case 1:return e.next=4,r++;case 4:e.next=1;break;case 6:case\\"end\\":return e.stop()}},e)}export default function(){try{var e=r();return Promise.resolve([e.next().value,e.next().value])}catch(e){return Promise.reject(e)}} -//# sourceMappingURL=modern-generators.esm.js.map +"var e=/*#__PURE__*/regeneratorRuntime.mark(r);function r(){var r;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:r=0;case 1:return e.next=4,r++;case 4:e.next=1;break;case 6:case\\"end\\":return e.stop()}},e)}export default function(){try{var e=r();return Promise.resolve([e.next().value,e.next().value])}catch(e){return Promise.reject(e)}} +//# sourceMappingURL=modern-generators.esm.mjs.map " `; exports[`fixtures build modern-generators with microbundle 4`] = ` -"var e=regeneratorRuntime.mark(r);function r(){var r;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:r=0;case 1:return e.next=4,r++;case 4:e.next=1;break;case 6:case\\"end\\":return e.stop()}},e)}module.exports=function(){try{var e=r();return Promise.resolve([e.next().value,e.next().value])}catch(e){return Promise.reject(e)}}; +"var e=/*#__PURE__*/regeneratorRuntime.mark(r);function r(){var r;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:r=0;case 1:return e.next=4,r++;case 4:e.next=1;break;case 6:case\\"end\\":return e.stop()}},e)}module.exports=function(){try{var e=r();return Promise.resolve([e.next().value,e.next().value])}catch(e){return Promise.reject(e)}}; //# sourceMappingURL=modern-generators.js.map " `; exports[`fixtures build modern-generators with microbundle 5`] = ` "async function e(){const e=function*(){let e=0;for(;;)yield e++}();return[e.next().value,e.next().value]}export default e; -//# sourceMappingURL=modern-generators.modern.js.map +//# sourceMappingURL=modern-generators.modern.mjs.map " `; exports[`fixtures build modern-generators with microbundle 6`] = ` -"!function(e,n){\\"object\\"==typeof exports&&\\"undefined\\"!=typeof module?module.exports=n():\\"function\\"==typeof define&&define.amd?define(n):(e||self).modernGenerators=n()}(this,function(){var e=regeneratorRuntime.mark(n);function n(){var n;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:n=0;case 1:return e.next=4,n++;case 4:e.next=1;break;case 6:case\\"end\\":return e.stop()}},e)}return function(){try{var e=n();return Promise.resolve([e.next().value,e.next().value])}catch(e){return Promise.reject(e)}}}); +"!function(e,n){\\"object\\"==typeof exports&&\\"undefined\\"!=typeof module?module.exports=n():\\"function\\"==typeof define&&define.amd?define(n):(e||self).modernGenerators=n()}(this,function(){var e=/*#__PURE__*/regeneratorRuntime.mark(n);function n(){var n;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:n=0;case 1:return e.next=4,n++;case 4:e.next=1;break;case 6:case\\"end\\":return e.stop()}},e)}return function(){try{var e=n();return Promise.resolve([e.next().value,e.next().value])}catch(e){return Promise.reject(e)}}}); //# sourceMappingURL=modern-generators.umd.js.map " `; @@ -2152,8 +2363,8 @@ Directory tree: name-custom-amd dist - name-custom-amd.esm.js - name-custom-amd.esm.js.map + name-custom-amd.esm.mjs + name-custom-amd.esm.mjs.map name-custom-amd.js name-custom-amd.js.map name-custom-amd.umd.js @@ -2164,11 +2375,11 @@ name-custom-amd two.js -Build \\"customNameAmd\\" to dist: +Build \\"name-custom-amd\\" to dist: 187 B: name-custom-amd.js.gz 138 B: name-custom-amd.js.br -188 B: name-custom-amd.esm.js.gz -139 B: name-custom-amd.esm.js.br +188 B: name-custom-amd.esm.mjs.gz +139 B: name-custom-amd.esm.mjs.br 277 B: name-custom-amd.umd.js.gz 208 B: name-custom-amd.umd.js.br" `; @@ -2177,7 +2388,7 @@ exports[`fixtures build name-custom-amd with microbundle 2`] = `6`; exports[`fixtures build name-custom-amd with microbundle 3`] = ` "var r=function(){try{var r=arguments;return Promise.resolve([].slice.call(r).reduce(function(r,e){return r+e},0))}catch(r){return Promise.reject(r)}};export default function(){try{var e=arguments,t=[].slice.call(e);return Promise.resolve(r.apply(void 0,t)).then(function(e){return Promise.resolve(r.apply(void 0,t)).then(function(r){return[e,r]})})}catch(r){return Promise.reject(r)}} -//# sourceMappingURL=name-custom-amd.esm.js.map +//# sourceMappingURL=name-custom-amd.esm.mjs.map " `; @@ -2200,8 +2411,8 @@ Directory tree: name-custom-cli dist - name-custom.esm.js - name-custom.esm.js.map + name-custom.esm.mjs + name-custom.esm.mjs.map name-custom.js name-custom.js.map name-custom.umd.js @@ -2212,11 +2423,11 @@ name-custom-cli two.js -Build \\"nameCustomCli\\" to dist: +Build \\"name-custom\\" to dist: 187 B: name-custom.js.gz 138 B: name-custom.js.br -188 B: name-custom.esm.js.gz -139 B: name-custom.esm.js.br +188 B: name-custom.esm.mjs.gz +139 B: name-custom.esm.mjs.br 276 B: name-custom.umd.js.gz 215 B: name-custom.umd.js.br" `; @@ -2225,7 +2436,7 @@ exports[`fixtures build name-custom-cli with microbundle 2`] = `6`; exports[`fixtures build name-custom-cli with microbundle 3`] = ` "var r=function(){try{var r=arguments;return Promise.resolve([].slice.call(r).reduce(function(r,e){return r+e},0))}catch(r){return Promise.reject(r)}};export default function(){try{var e=arguments,t=[].slice.call(e);return Promise.resolve(r.apply(void 0,t)).then(function(e){return Promise.resolve(r.apply(void 0,t)).then(function(r){return[e,r]})})}catch(r){return Promise.reject(r)}} -//# sourceMappingURL=name-custom.esm.js.map +//# sourceMappingURL=name-custom.esm.mjs.map " `; @@ -2248,8 +2459,8 @@ Directory tree: no-pkg dist - no-pkg.esm.js - no-pkg.esm.js.map + no-pkg.esm.mjs + no-pkg.esm.mjs.map no-pkg.js no-pkg.js.map no-pkg.umd.js @@ -2259,11 +2470,11 @@ no-pkg two.js -Build \\"noPkg\\" to dist: +Build \\"no-pkg\\" to dist: 187 B: no-pkg.js.gz 138 B: no-pkg.js.br -188 B: no-pkg.esm.js.gz -139 B: no-pkg.esm.js.br +188 B: no-pkg.esm.mjs.gz +139 B: no-pkg.esm.mjs.br 270 B: no-pkg.umd.js.gz 216 B: no-pkg.umd.js.br" `; @@ -2272,7 +2483,7 @@ exports[`fixtures build no-pkg with microbundle 2`] = `6`; exports[`fixtures build no-pkg with microbundle 3`] = ` "var r=function(){try{var r=arguments;return Promise.resolve([].slice.call(r).reduce(function(r,e){return r+e},0))}catch(r){return Promise.reject(r)}};export default function(){try{var e=arguments,t=[].slice.call(e);return Promise.resolve(r.apply(void 0,t)).then(function(e){return Promise.resolve(r.apply(void 0,t)).then(function(r){return[e,r]})})}catch(r){return Promise.reject(r)}} -//# sourceMappingURL=no-pkg.esm.js.map +//# sourceMappingURL=no-pkg.esm.mjs.map " `; @@ -2295,8 +2506,8 @@ Directory tree: no-pkg-name dist - no-pkg-name.esm.js - no-pkg-name.esm.js.map + no-pkg-name.esm.mjs + no-pkg-name.esm.mjs.map no-pkg-name.js no-pkg-name.js.map no-pkg-name.umd.js @@ -2307,11 +2518,11 @@ no-pkg-name two.js -Build \\"noPkgName\\" to dist: +Build \\"no-pkg-name\\" to dist: 187 B: no-pkg-name.js.gz 138 B: no-pkg-name.js.br -188 B: no-pkg-name.esm.js.gz -139 B: no-pkg-name.esm.js.br +188 B: no-pkg-name.esm.mjs.gz +139 B: no-pkg-name.esm.mjs.br 274 B: no-pkg-name.umd.js.gz 219 B: no-pkg-name.umd.js.br" `; @@ -2320,7 +2531,7 @@ exports[`fixtures build no-pkg-name with microbundle 2`] = `6`; exports[`fixtures build no-pkg-name with microbundle 3`] = ` "var r=function(){try{var r=arguments;return Promise.resolve([].slice.call(r).reduce(function(r,e){return r+e},0))}catch(r){return Promise.reject(r)}};export default function(){try{var e=arguments,t=[].slice.call(e);return Promise.resolve(r.apply(void 0,t)).then(function(e){return Promise.resolve(r.apply(void 0,t)).then(function(r){return[e,r]})})}catch(r){return Promise.reject(r)}} -//# sourceMappingURL=no-pkg-name.esm.js.map +//# sourceMappingURL=no-pkg-name.esm.mjs.map " `; @@ -2344,8 +2555,8 @@ Directory tree: optional-chaining-ts dist index.d.ts - optional-chaining-ts.esm.js - optional-chaining-ts.esm.js.map + optional-chaining-ts.esm.mjs + optional-chaining-ts.esm.mjs.map optional-chaining-ts.js optional-chaining-ts.js.map optional-chaining-ts.umd.js @@ -2357,11 +2568,11 @@ optional-chaining-ts tsconfig.json -Build \\"optionalChainingTs\\" to dist: +Build \\"optional-chaining-ts\\" to dist: 109 B: optional-chaining-ts.js.gz 88 B: optional-chaining-ts.js.br -111 B: optional-chaining-ts.esm.js.gz -97 B: optional-chaining-ts.esm.js.br +111 B: optional-chaining-ts.esm.mjs.gz +97 B: optional-chaining-ts.esm.mjs.br 210 B: optional-chaining-ts.umd.js.gz 169 B: optional-chaining-ts.umd.js.br" `; @@ -2379,7 +2590,7 @@ exports[`fixtures build optional-chaining-ts with microbundle 3`] = ` exports[`fixtures build optional-chaining-ts with microbundle 4`] = ` "function n(n){var r,i;return null!=(r=null==(i=n.maybeVar)?void 0:i.thing)?r:void 0}export{n as chain}; -//# sourceMappingURL=optional-chaining-ts.esm.js.map +//# sourceMappingURL=optional-chaining-ts.esm.mjs.map " `; @@ -2402,8 +2613,8 @@ Directory tree: parameters-rest-closure dist - parameters-rest-closure.esm.js - parameters-rest-closure.esm.js.map + parameters-rest-closure.esm.mjs + parameters-rest-closure.esm.mjs.map parameters-rest-closure.js parameters-rest-closure.js.map parameters-rest-closure.umd.js @@ -2413,11 +2624,11 @@ parameters-rest-closure index.js -Build \\"parametersRestClosure\\" to dist: +Build \\"parameters-rest-closure\\" to dist: 157 B: parameters-rest-closure.js.gz 115 B: parameters-rest-closure.js.br -165 B: parameters-rest-closure.esm.js.gz -124 B: parameters-rest-closure.esm.js.br +165 B: parameters-rest-closure.esm.mjs.gz +124 B: parameters-rest-closure.esm.mjs.br 247 B: parameters-rest-closure.umd.js.gz 189 B: parameters-rest-closure.umd.js.br" `; @@ -2426,7 +2637,7 @@ exports[`fixtures build parameters-rest-closure with microbundle 2`] = `6`; exports[`fixtures build parameters-rest-closure with microbundle 3`] = ` "function n(n){var c=[].slice.call(arguments,1);return function(){n.apply(void 0,c)}}function c(n){var c=arguments;return function(){n.apply(void 0,[].slice.call(c,1))}}export{n as parametersRestWithClosure,c as parametersRestWithInnerArrowFunction}; -//# sourceMappingURL=parameters-rest-closure.esm.js.map +//# sourceMappingURL=parameters-rest-closure.esm.mjs.map " `; @@ -2449,8 +2660,8 @@ Directory tree: pretty dist - pretty.esm.js - pretty.esm.js.map + pretty.esm.mjs + pretty.esm.mjs.map pretty.js pretty.js.map pretty.umd.js @@ -2463,8 +2674,8 @@ pretty Build \\"pretty\\" to dist: 6.33 kB: pretty.js.gz 5.19 kB: pretty.js.br -6.34 kB: pretty.esm.js.gz -5.21 kB: pretty.esm.js.br +6.34 kB: pretty.esm.mjs.gz +5.21 kB: pretty.esm.mjs.br 6.46 kB: pretty.umd.js.gz 5.31 kB: pretty.umd.js.br" `; @@ -2473,7 +2684,7 @@ exports[`fixtures build pretty with microbundle 2`] = `6`; exports[`fixtures build pretty with microbundle 3`] = ` "var n=\\"\\\\n\\\\nThere is immense joy in just watching - watching all the little creatures in nature. I'll go over the colors one more\\\\ntime that we use: Titanium white, Thalo green, Prussian blue, Van Dyke brown, Alizarin crimson, Sap green, Cad yellow,\\\\nand Permanent red. If you don't like it - change it. It's your world. Be brave. Sometimes you learn more from your\\\\nmistakes than you do from your masterpieces.\\\\n\\\\nTrees grow in all kinds of ways. They're not all perfectly straight. Not every limb is perfect. Now let's put some happy\\\\nlittle clouds in here. We have no limits to our world. We're only limited by our imagination. The first step to doing\\\\nanything is to believe you can do it. See it finished in your mind before you ever start. Even trees need a friend. We\\\\nall need friends. And that's when it becomes fun - you don't have to spend your time thinking about what's happening -\\\\nyou just let it happen.\\\\n\\\\nरिती संपादक बेंगलूर अन्तरराष्ट्रीयकरन शीघ्र भाषा चिदंश उद्योग विस्तरणक्षमता चिदंश एकएस तरहथा। प्रोत्साहित उपेक्ष बिन्दुओ\\\\nध्येय देने गुजरना ऎसाजीस निर्माण नवंबर लिए। एसेएवं उपलब्धता मुश्किले डाले। बहतर सहायता माध्यम भाषाओ समूह\\\\n\\\\n井待品亡写回横提和指生志考結。重特天県偏切運録広詳三人転者数代歳。秀天戦機広八型希金生作事国第。年米教止証車断級弘報安楽\\\\n銀必約現獲料切。点額講問課覧傷邸出送跡出懲。編米人験由社迷入解公著片法記択昇必崎掲清。摩出元自越食多県実間旅売主注理併間\\\\n話策。小政退時年福米越給新家入解美露方堀港朝。俊間髪物縦該高報見甲購形州日事。\\\\n\\\\n🌸🍂🌃🐧🍘🏧🍮 🌶👢🔗🐥🔼🎮 🐤🍲📆👧🎼🐒 💑🍖📴🐠🍼 🎱🔮🍦💳👹 💫🏮📅🍑📭🎎 🏭💿🏫🔢👚💩 👇🌄🌗🔵💦 🔺🔡🌍🐗🏀📫\\\\n📻🍵🐰🔜🕧 🌴🌞🕙🎨🎾🔊🏰 🎑🌆🔁🌂 🕐📣📉🌴🕠📢 🎀📖🎋🔱📒💰 🍅🐻🌃🌖. 🎁🕔👎🎷📀📞 🍁🔫🍀🌃📹 💈📂💶👕 🍡📰👛🐻\\\\n🍖🐽💫📼 🍆🎀💛👫🔹 🎷🕙🌱👸🕁🔝 🍸🔅👿🐡. 🐟🔐🏡🔅👾 🐱💱👺🍶 🎠🔆🎤🏥🌻🗾 👽🎯💈🏣🔊📴💆🏫 🔉🌉🍃🌻 🎅🔌🔻💣 🌸🍎🐀🌇\\\\n🗻👔📤💤🔶. 🍆👣🕕👦📦👑 🐍🐉🔶🕕 🍲👩🍍🌕📻👒📵 🔣🌋🌟👼 🔏📀🐆🍖🍮 🐁🌘🐻🏥🐡🔶🔘🏭 👡🔫🔗📊📻 🍂💧🌿📥🔚 📹💻🔌💠🌚\\\\n🐦💴🌎🌞🏤.\\\\n\\\\nThere is immense joy in just watching - watching all the little creatures in nature. I'll go over the colors one more\\\\ntime that we use: Titanium white, Thalo green, Prussian blue, Van Dyke brown, Alizarin crimson, Sap green, Cad yellow,\\\\nand Permanent red. If you don't like it - change it. It's your world. Be brave. Sometimes you learn more from your\\\\nmistakes than you do from your masterpieces. That's why I paint - because I can create the kind of world I want - and I\\\\ncan make this world as happy as I want it. I was blessed with a very steady hand; and it comes in very handy when you're\\\\ndoing these little delicate things. We'll paint one happy little tree right here. These things happen automatically. All\\\\nyou have to do is just let them happen.\\\\n\\\\n🐻🍘💀🐪 🕧🎂🕃🍵🏠 💎🌄🐐📘🐄 🍂🏤👊🍖 👆🍂📫👪🐈🕢👓 👯🕞🏉🍚🎆🔠🌵 🎭🎎💵📮📭 🔪💨📢📕 🐔📬👪🏄🐙🗽📤.\\\\n💛👴💧🎁👗💟👡💎 🎷🕡👮🗾🍷 🎪🍇🍩💰 📫🐗🎄🍍🎃 🎯🌴🐍🔉📰 👼👧🐢🕔🔷📞🍩 🔘👑🌆🌒🔣 🔆👺📴👾 🔝💑💸💒🏡🔸 🔟👞📷🔱👠\\\\n📵🏠📕🕝🐂👪 💐🎾🕁🗾👊📪. 🍉🏁👰🏡🕔💒🐯 🐟🍡📴🌿👱👢 📵💄🌊🌵🐫🍏 🎎🕠🍍💭💀👖 🎵💘🔗🍖 📧🌘🍅🕚📘🔮 👤🌾👿🐍🎽🌹\\\\n🎲🎎💅📪🐐🍢📈 🏣🐑👇👼🐄🍔 🍠📧🌊🕁🔛🐩. 🌺📊🍼🐁💼 🔈💬🌱🎑🔊🐙💲👩 🍇👞📎👻🌔 💑🕁🎲💤 🎮📃🕖📖 📻💬🔢💔🐇👬 🔨🌃📈🔞\\\\n🌒🎈👙🔥🐊 📭👍📢👊📟.\\\\n\\\\n出死問民同歴術荘面族上自。窃指写氷名続球投込光試事樹増。作合副者扶実権守安展感意環待質出。告供体企紙勢構込君奪属仕子業戦\\\\n浮私。長論攻士踊再連公雪地約政近第公。界地島命党浮国沼出問気混心未独院。朝原妙画岡性制領子金次問無浦妥混口時研。道記険健\\\\n集立根聖間前設集族山要本覧。変注再悩式付療場図験問県家界月止収文。\\\\n\\\\nलेकिन उसके संपादक उपलब्ध दिनांक प्रति सम्पर्क प्राधिकरन नाकर मुक्त कलइस वेबजाल वर्तमान समस्याओ देखने भोगोलिक केन्द्रिय\\\\nकिया खयालात विज्ञान ध्येय गटको साधन चिदंश पासपाई व्याख्या मार्गदर्शन संदेश जिवन प्रतिबध वार्तालाप किके विश्व खरिदने\\\\nहुआआदी तकनीकी संदेश सारांश असरकारक वार्तालाप चाहे पहोच। अतित पुर्णता केन्द्रिय\\\\n\\\\n👅💾🐂🔙 🐂🎠👶🐮🐛 👛💗💶🌿💒 🐐🌱🐶🌴🏤🐒 🔪🍡🎸🐛🍖 📗🎓🏊🕀🎿 🔅📋📥👳🔝 🐗👝🏄🐲 📂🎷🐎🏯💎🐹 📲🍍🏥🔂🕚🐉🎤\\\\n🌕🐴📐🎪💋. 💔👂🐗📷🎐 🌹📔💒📝👎📭 🔖🍶💺🕘 🔡💘🎪🔚🔯👉 💯🎉👠🎁🐌💵 👌🔉🎹🕒💕🍁 🏡🍢🔹🔷👀💦🏉👀 👑🐺🐁🏤\\\\n🎺🍁🐙🐮🌃🕢🐟 🍶🎃🕕🔦 🐧🔝💔💚🔫👍 🌉🔁🌄📺 👓🎳📧🌆💖🍋🕔. 🍥🔘🗼📟 🍹🔸🔰🕣🌍 🏡💽🍬👗👧 📩👬🌻🐐🌞🌎🐵🔛 🏆🌹🍰🔬📕\\\\n👋🎩🍓🌏👙 🎁🏃🎌🍳🔋👎📔 🐈🌽🔘💮 🏬🐷💿🕕. 📕👖📦📡 🎅🎺🏭🍗💜💷🐦 💻💚🐪🕠🔀 💰🍹💶🍶🎥📄 🌛👕🐲🐣🍷🎬 🐥🎯🔵🎹\\\\n🌿👌🐚🍛🏪 🌵📞💃📗👱👩 📟🐸🌺🐅👮 💚🐦💉💞🌛 🔼🔤👓🏡💩.\\\\n\\\\n\\\\nयधपि बाजार तकरीबन आंतरजाल प्राधिकरन लगती संदेश एसलिये बिन्दुओ प्रोत्साहित जानकारी ढांचामात्रुभाषा बाजार बदले प्रमान\\\\nअनुवाद विकेन्द्रित पसंद ढांचा हमारि जोवे उद्योग संस्थान और्४५० विकसित उदेश लेकिन सकती वार्तालाप लाभान्वित संदेश उदेश\\\\nपहोच। लचकनहि अनुवाद सुविधा एकत्रित कीने सक्षम भीयह अत्यंत लचकनहि निरपेक्ष कराना हमारि प्राप्त पुर्णता प्रतिबध्दता होगा\\\\nउन्हे जाएन खयालात पहोचाना\\\\n\\\\n散待望会窮縮囲前賀理格顔欧製暮景初子加。首稿覧析回未帯則号医間本取退埋帯品。右歳約幻病護指極講賞京応。野受移供頑特公却報\\\\n法利務水提士政駐物際。角媛分地昧況面日残金真福方雨入顔作化。最刊情感売校見強移本説注辞。経必好以小球生音明優去験見政感治\\\\n報付。講刊切記勝帯載豪著転読金止。金子森午模移言兆埠関価亡出目載。\\\\n\\\\nWork on one thing at a time. Don't get carried away - we have plenty of time. Everything is happy if you choose to make\\\\nit that way. Happy painting, God bless. You can create anything that makes you happy. Just make a decision and let it\\\\ngo. Nice little clouds playing around in the sky.You can do anything here - the only pre-requisite is that it makes you\\\\nhappy. I'm going to mix up a little color. We’ll use Van Dyke Brown, Permanent Red, and a little bit of Prussian Blue.\\\\nLet's make some happy little clouds in our world.\\\\n\\\\nपहेला गएआप स्वतंत्र प्राधिकरन सेऔर अनुकूल ब्रौशर बिन्दुओमे सदस्य गुजरना तकनिकल वैश्विक सकते बनाति चिदंश चाहे कुशलता\\\\nवर्तमान प्रोत्साहित देने विवरन पहोचाना विकेन्द्रियकरण अनुकूल विभाजनक्षमता औषधिक अन्य खरिदे दिये आवश्यक समस्याए कम्प्युटर\\\\nविनिमय अविरोधता लाभान्वित लाभो ढांचा\\\\n\\\\n抄聞調時得直決移警撃覧進聞滑公政央。日探劇票選伊追短青功書更将奈府成多。味治理育月漬安意散護良読京。芳豚大度面傾府山応著\\\\n器地捜志。止高棋戻管明証経処流自勝動続。装載聞視属王減通橋説主費事業情芸。追若得本臭稿事馬予治川劇覧記今竹犯破育食。参兆\\\\n徹括単写東家素講舞校食医咋存務代連子。球設国事検問周東集題聞供奈。\\\\n\\\\n🍊🌆📛🍛🌊🍡🍒 🔦🐟🐵🍚🌐🍛🐏 🔆💍📟🎧 🔐📤💺🐒 🔥🔬🐣💹🌻👚 🎰👯🎡🗻💯🐉🌗 🍐👣🐯🔖📚 💡📟👨🍮🍼💛📞 🕕🐁🌾🏧💻📷\\\\n💗🐢🏥🎵🐰🍉 🏥🔎💛💘🔧🍛🎿 🍟🌰🐴🏫🎀 🎷🌿🌴🏤🍢📳🍺 🐗👷🌳👦📩🌁 🐂🔜🔙📕. 🌎🍠📓📠🕡 🎽🔺🔱🌔📗🎤 🎫🍃👚🍤🐽🌰\\\\n🕠🌉📪🍒🐃💲 🎢🔯👶🔙🔚🕝 🍮📒🏉🏨🐝🌿 👔💫🏁🎺 🐸💞🌈🐸 📣🔯📅🐍🐴 🌑🌍🌛👀 🕂👟🐕📃🎇🔞 🍮🔏🍥👨 🐪📲🐐🎁 🍥🔁📑💮🌘.\\\\n🌏🎎🍛👯 🔈🎸💨🏧📚 🏪💼🎣🔚 🐤💳💁👓 👃🍆🕘🐋👬🐣 🕚🏃🌄🔷🌈🔖 💥💧🔴🌛🍁👦 💣🐐🕓🎠🕚🕞🏭 💨👓🏢🌓🔄. 📪🔜💹👤👂🐭\\\\n🕚🔎🐂🏂👍📻 👾💠🌕📻🎍 🐟🔬🏢💍 👓👠👤🎐💸👝 🔟💕🕛💊 🍩🌙👬🐘 🍪🔙📉💔🐝🕝 📭🕡🎼💈📇🔡 👓🍁🎾👯👨 🏇🍱🐢🌛\\\\n🎇🐩📴🎋🕁📎🎈 🐌👱📎🍹👆 👐🍐📗👽🐹💜 📭🌔🌅🍯👀.\\\\n\\\\n🔜🐰🏊🍃🐮 🔪🔐📇🐩 🐬👔🍙🍩💉 🏉👩👔🍞🍟🌂 🍺🕔🌖🔪🔩🍥 🎓🍒🌅🐘💛 🐔🐊📶🐊 👂📌👂🍺 💗🐳🎠📧🏭💧 🐝📅🍆🔞🏆\\\\n👇🔂🐺🔬🎯🔳🎐🎍 💖💅🐲🔭📔🏊🔋 🐨📫🕢🎁. 🐯💁🔘📰🐪 💥👭🍘🎴📣💂💄 🐏🔊🐚👔🎿🐙 🔕🐞💹📁 🔊👴👬👪 👠📱👃📍 🏢🐃🍯🍹🗻\\\\n🐩💮👲👠 🍏🎽📄🐋 🔣💉🔉📒💸🎭👎 💁🗾🔵🐪🍣 🍃🔝💥🔒👴. 📦🔟🔶💷🍥 🍚🕤👦🍻🔥🍹 👄🌜🐑🌀🐃🔪🕦 🌟🐶🍞🕥🌛 👮🐄🏬🎴👂💼📵\\\\n🌋📐🐲👥 🔒🏭🔭💿🎫🎄 💓🐓🎐🎁👔📟 💌🍇🎶👷🎬 🌌💀🎸💡 📔🐢💁🔊👘🐳🌞 🎩📝💟🍼💦🔄 🕒🍼🏧🎄🔃💐. 🎆🌜👗👿 🐁🌑💮👙🎌👞\\\\n🏫📙🌌🕙🐥 👓🌑💎💸📹📒 👋🐎🍡🎾👸🗽 📢📓🌍🏮📳🔈 👶🐷🐭🎿🔴🗾🏬 🌆🔈🍡💞💭🎨. \\";export{n as allTheIpsum}; -//# sourceMappingURL=pretty.esm.js.map +//# sourceMappingURL=pretty.esm.mjs.map " `; @@ -2505,7 +2716,7 @@ publish-config foo.ts -Build \\"publishConfig\\" to dist: +Build \\"publish-config\\" to dist: 55 B: bar.js.gz 33 B: bar.js.br" `; @@ -2530,8 +2741,8 @@ Directory tree: pure dist - pure.esm.js - pure.esm.js.map + pure.esm.mjs + pure.esm.mjs.map pure.js pure.js.map pure.umd.js @@ -2544,8 +2755,8 @@ pure Build \\"pure\\" to dist: 65 B: pure.js.gz 44 B: pure.js.br -71 B: pure.esm.js.gz -49 B: pure.esm.js.br +71 B: pure.esm.mjs.gz +49 B: pure.esm.mjs.br 167 B: pure.umd.js.gz 125 B: pure.umd.js.br" `; @@ -2554,7 +2765,7 @@ exports[`fixtures build pure with microbundle 2`] = `6`; exports[`fixtures build pure with microbundle 3`] = ` "function o(){return\\"hello world\\"}export{o as foo}; -//# sourceMappingURL=pure.esm.js.map +//# sourceMappingURL=pure.esm.mjs.map " `; @@ -2577,8 +2788,8 @@ Directory tree: raw dist - raw.esm.js - raw.esm.js.map + raw.esm.mjs + raw.esm.mjs.map raw.js raw.js.map raw.umd.js @@ -2591,8 +2802,8 @@ raw Build \\"raw\\" to dist: 1389 B: raw.js.gz 1160 B: raw.js.br -1398 B: raw.esm.js.gz -1169 B: raw.esm.js.br +1398 B: raw.esm.mjs.gz +1169 B: raw.esm.mjs.br 1500 B: raw.umd.js.gz 1248 B: raw.umd.js.br" `; @@ -2601,7 +2812,7 @@ exports[`fixtures build raw with microbundle 2`] = `6`; exports[`fixtures build raw with microbundle 3`] = ` "var e=\\"\\\\n\\\\tWe might as well make some Almighty mountains today as well, what the heck.\\\\n\\\\tIn your imagination you can go anywhere you want. Nice little fluffy clouds\\\\n\\\\tlaying around in the sky being lazy. You have to make those little noises or\\\\n\\\\tit won't work. Clouds are free they come and go as they please.\\\\n\\\\n\\\\tTrees grow in all kinds of ways. They're not all perfectly straight. Not\\\\n\\\\tevery limb is perfect. Now let's put some happy little clouds in here. We\\\\n\\\\thave no limits to our world. We're only limited by our imagination. The\\\\n\\\\tfirst step to doing anything is to believe you can do it. See it finished\\\\n\\\\tin your mind before you ever start. Even trees need a friend. We all need\\\\n\\\\tfriends. And that's when it becomes fun - you don't have to spend your\\\\n\\\\ttime thinking about what's happening - you just let it happen.\\\\n\\\\n\\\\tI thought today we would do a happy little picture. We don't have to be\\\\n\\\\tconcerned about it. We just have to let it fall where it will. I'm gonna\\\\n\\\\tstart with a little Alizarin crimson and a touch of Prussian blue Be so\\\\n\\\\tvery light. Be a gentle whisper. The only prerequisite is that it makes\\\\n\\\\tyou happy. If it makes you happy then it's good. This is truly an almighty\\\\n\\\\tmountain.\\\\n\\\\n\\\\tThat's why I paint - because I can create the kind of world I want - and I\\\\n\\\\tcan make this world as happy as I want it. I was blessed with a very steady\\\\n\\\\thand; and it comes in very handy when you're doing these little delicate\\\\n\\\\tthings. We'll paint one happy little tree right here. These things happen\\\\n\\\\tautomatically. All you have to do is just let them happen.\\\\n\\\\n\\\\tYou can do anything here - the only pre-requisite is that it makes you\\\\n\\\\thappy. I'm going to mix up a little color. We’ll use Van Dyke Brown,\\\\n\\\\tPermanent Red, and a little bit of Prussian Blue. Let's make some happy\\\\n\\\\tlittle clouds in our world.\\\\n\\\\n\\\\tWork on one thing at a time. Don't get carried away - we have plenty of\\\\n\\\\ttime. Everything is happy if you choose to make it that way. Happy\\\\n\\\\tpainting, God bless. You can create anything that makes you happy. Just\\\\n\\\\tmake a decision and let it go. Nice little clouds playing around in the\\\\n\\\\tsky.\\\\n\\\\n\\\\tAnytime you learn something your time and energy are not wasted. Van Dyke\\\\n\\\\tBrown is a very nice brown, it's almost like a chocolate brown. It's\\\\n\\\\timportant to me that you're happy. In nature, dead trees are just as normal\\\\n\\\\tas live trees. Painting should do one thing. It should put happiness in\\\\n\\\\tyour heart.\\\\n\\\\n\\\\tThere is immense joy in just watching - watching all the little creatures\\\\n\\\\tin nature. I'll go over the colors one more time that we use: Titanium\\\\n\\\\twhite, Thalo green, Prussian blue, Van Dyke brown, Alizarin crimson, Sap\\\\n\\\\tgreen, Cad yellow, and Permanent red. If you don't like it - change it.\\\\n\\\\tIt's your world. Be brave. Sometimes you learn more from your mistakes than\\\\n\\\\tyou do from your masterpieces.\\";export{e as OneKilobyteOfBobRoss}; -//# sourceMappingURL=raw.esm.js.map +//# sourceMappingURL=raw.esm.mjs.map " `; @@ -2624,8 +2835,8 @@ Directory tree: shebang dist - shebang.esm.js - shebang.esm.js.map + shebang.esm.mjs + shebang.esm.mjs.map shebang.js shebang.js.map shebang.umd.js @@ -2638,8 +2849,8 @@ shebang Build \\"shebang\\" to dist: 85 B: shebang.js.gz 62 B: shebang.js.br -89 B: shebang.esm.js.gz -70 B: shebang.esm.js.br +89 B: shebang.esm.mjs.gz +70 B: shebang.esm.mjs.br 183 B: shebang.umd.js.gz 145 B: shebang.umd.js.br" `; @@ -2649,7 +2860,7 @@ exports[`fixtures build shebang with microbundle 2`] = `6`; exports[`fixtures build shebang with microbundle 3`] = ` "#!/usr/bin/env node function o(){return\\"hello world\\"}export{o as foo}; -//# sourceMappingURL=shebang.esm.js.map +//# sourceMappingURL=shebang.esm.mjs.map " `; @@ -2674,8 +2885,8 @@ Directory tree: terser-annotations dist - terser-annotations.esm.js - terser-annotations.esm.js.map + terser-annotations.esm.mjs + terser-annotations.esm.mjs.map terser-annotations.js terser-annotations.js.map terser-annotations.umd.js @@ -2686,31 +2897,31 @@ terser-annotations index.js -Build \\"terserAnnotations\\" to dist: -112 B: terser-annotations.js.gz -86 B: terser-annotations.js.br -117 B: terser-annotations.esm.js.gz -88 B: terser-annotations.esm.js.br -200 B: terser-annotations.umd.js.gz -159 B: terser-annotations.umd.js.br" +Build \\"terser-annotations\\" to dist: +133 B: terser-annotations.js.gz +104 B: terser-annotations.js.br +138 B: terser-annotations.esm.mjs.gz +97 B: terser-annotations.esm.mjs.br +224 B: terser-annotations.umd.js.gz +169 B: terser-annotations.umd.js.br" `; exports[`fixtures build terser-annotations with microbundle 2`] = `6`; exports[`fixtures build terser-annotations with microbundle 3`] = ` -"function shouldBePreserved(e,n){return e-n}function main(e,n){return{inlined:function(e,n){return e+n}(e,n),preserved:shouldBePreserved(e,n)}}export default main; -//# sourceMappingURL=terser-annotations.esm.js.map +"function shouldBePreserved(e,n){return e-n}function main(e,n){return{inlined:/*@__INLINE__*/function(e,n){return e+n}(e,n),preserved:/*@__NOINLINE__*/shouldBePreserved(e,n)}}export default main; +//# sourceMappingURL=terser-annotations.esm.mjs.map " `; exports[`fixtures build terser-annotations with microbundle 4`] = ` -"function shouldBePreserved(e,r){return e-r}module.exports=function(e,r){return{inlined:function(e,r){return e+r}(e,r),preserved:shouldBePreserved(e,r)}}; +"function shouldBePreserved(e,r){return e-r}module.exports=function(e,r){return{inlined:/*@__INLINE__*/function(e,r){return e+r}(e,r),preserved:/*@__NOINLINE__*/shouldBePreserved(e,r)}}; //# sourceMappingURL=terser-annotations.js.map " `; exports[`fixtures build terser-annotations with microbundle 5`] = ` -"!function(e,n){\\"object\\"==typeof exports&&\\"undefined\\"!=typeof module?module.exports=n():\\"function\\"==typeof define&&define.amd?define(n):(e||self).terserAnnotations=n()}(this,function(){function shouldBePreserved(e,n){return e-n}return function(e,n){return{inlined:function(e,n){return e+n}(e,n),preserved:shouldBePreserved(e,n)}}}); +"!function(e,n){\\"object\\"==typeof exports&&\\"undefined\\"!=typeof module?module.exports=n():\\"function\\"==typeof define&&define.amd?define(n):(e||self).terserAnnotations=n()}(this,function(){function shouldBePreserved(e,n){return e-n}return function(e,n){return{inlined:/*@__INLINE__*/function(e,n){return e+n}(e,n),preserved:/*@__NOINLINE__*/shouldBePreserved(e,n)}}}); //# sourceMappingURL=terser-annotations.umd.js.map " `; @@ -2722,25 +2933,26 @@ Directory tree: ts-custom-declaration dist - index.esm.js - index.esm.js.map + index.esm.mjs + index.esm.mjs.map index.js index.js.map index.umd.js index.umd.js.map + node_modules package.json src - index.js + index.ts tsconfig.json types index.d.ts -Build \\"tsCustomDeclarations\\" to dist: +Build \\"ts-custom-declarations\\" to dist: 55 B: index.js.gz 33 B: index.js.br -61 B: index.esm.js.gz -45 B: index.esm.js.br +61 B: index.esm.mjs.gz +45 B: index.esm.mjs.br 175 B: index.umd.js.gz 125 B: index.umd.js.br" `; @@ -2749,7 +2961,7 @@ exports[`fixtures build ts-custom-declaration with microbundle 2`] = `6`; exports[`fixtures build ts-custom-declaration with microbundle 3`] = ` "function n(){return 42}export{n as foo}; -//# sourceMappingURL=index.esm.js.map +//# sourceMappingURL=index.esm.mjs.map " `; @@ -2779,8 +2991,8 @@ Directory tree: ts-declaration dist - index.esm.js - index.esm.js.map + index.esm.mjs + index.esm.mjs.map index.js index.js.map index.umd.js @@ -2794,11 +3006,11 @@ ts-declaration index.d.ts -Build \\"tsDeclarations\\" to dist: +Build \\"ts-declarations\\" to dist: 55 B: index.js.gz 33 B: index.js.br -61 B: index.esm.js.gz -45 B: index.esm.js.br +61 B: index.esm.mjs.gz +45 B: index.esm.mjs.br 171 B: index.umd.js.gz 124 B: index.umd.js.br" `; @@ -2807,7 +3019,7 @@ exports[`fixtures build ts-declaration with microbundle 2`] = `6`; exports[`fixtures build ts-declaration with microbundle 3`] = ` "function n(){return 42}export{n as foo}; -//# sourceMappingURL=index.esm.js.map +//# sourceMappingURL=index.esm.mjs.map " `; @@ -2838,8 +3050,8 @@ Directory tree: ts-jsx dist index.d.ts - ts-jsx.esm.js - ts-jsx.esm.js.map + ts-jsx.esm.mjs + ts-jsx.esm.mjs.map ts-jsx.js ts-jsx.js.map ts-jsx.umd.js @@ -2851,11 +3063,11 @@ ts-jsx tsconfig.json -Build \\"tsJsx\\" to dist: +Build \\"ts-jsx\\" to dist: 130 B: ts-jsx.js.gz 94 B: ts-jsx.js.br -131 B: ts-jsx.esm.js.gz -111 B: ts-jsx.esm.js.br +131 B: ts-jsx.esm.mjs.gz +111 B: ts-jsx.esm.mjs.br 219 B: ts-jsx.umd.js.gz 176 B: ts-jsx.umd.js.br" `; @@ -2869,7 +3081,7 @@ exports[`fixtures build ts-jsx with microbundle 3`] = ` exports[`fixtures build ts-jsx with microbundle 4`] = ` "var n=function(n,r){return{tag:n,props:r,children:[].slice.call(arguments,2)}}(function(n){return n.children},null,\\"foo\\");export{n as foo}; -//# sourceMappingURL=ts-jsx.esm.js.map +//# sourceMappingURL=ts-jsx.esm.mjs.map " `; @@ -2894,8 +3106,8 @@ ts-mixed-exports dist car.d.ts index.d.ts - ts-mixed-exports.esm.js - ts-mixed-exports.esm.js.map + ts-mixed-exports.esm.mjs + ts-mixed-exports.esm.mjs.map ts-mixed-exports.js ts-mixed-exports.js.map ts-mixed-exports.umd.js @@ -2908,13 +3120,13 @@ ts-mixed-exports tsconfig.json -Build \\"tsMixedExports\\" to dist: -112 B: ts-mixed-exports.js.gz -89 B: ts-mixed-exports.js.br -115 B: ts-mixed-exports.esm.js.gz -100 B: ts-mixed-exports.esm.js.br -212 B: ts-mixed-exports.umd.js.gz -170 B: ts-mixed-exports.umd.js.br" +Build \\"ts-mixed-exports\\" to dist: +130 B: ts-mixed-exports.js.gz +104 B: ts-mixed-exports.js.br +134 B: ts-mixed-exports.esm.mjs.gz +118 B: ts-mixed-exports.esm.mjs.br +228 B: ts-mixed-exports.umd.js.gz +185 B: ts-mixed-exports.umd.js.br" `; exports[`fixtures build ts-mixed-exports with microbundle 2`] = `8`; @@ -2938,19 +3150,19 @@ export default Ferrari; `; exports[`fixtures build ts-mixed-exports with microbundle 5`] = ` -"var t=function(){function t(){}return t.prototype.drive=function(t){return!0},t}(),n=new t;export default n;export{t as Car}; -//# sourceMappingURL=ts-mixed-exports.esm.js.map +"var t=/*#__PURE__*/function(){function t(){}return t.prototype.drive=function(t){return!0},t}(),n=new t;export default n;export{t as Car}; +//# sourceMappingURL=ts-mixed-exports.esm.mjs.map " `; exports[`fixtures build ts-mixed-exports with microbundle 6`] = ` -"var r=function(){function r(){}return r.prototype.drive=function(r){return!0},r}(),t=new r;exports.Car=r,exports.default=t; +"var r=/*#__PURE__*/function(){function r(){}return r.prototype.drive=function(r){return!0},r}(),t=new r;exports.Car=r,exports.default=t; //# sourceMappingURL=ts-mixed-exports.js.map " `; exports[`fixtures build ts-mixed-exports with microbundle 7`] = ` -"!function(e,n){\\"object\\"==typeof exports&&\\"undefined\\"!=typeof module?n(exports):\\"function\\"==typeof define&&define.amd?define([\\"exports\\"],n):n((e||self).tsMixedExports={})}(this,function(e){var n=function(){function e(){}return e.prototype.drive=function(e){return!0},e}(),t=new n;e.Car=n,e.default=t}); +"!function(e,n){\\"object\\"==typeof exports&&\\"undefined\\"!=typeof module?n(exports):\\"function\\"==typeof define&&define.amd?define([\\"exports\\"],n):n((e||self).tsMixedExports={})}(this,function(e){var n=/*#__PURE__*/function(){function e(){}return e.prototype.drive=function(e){return!0},e}(),t=new n;e.Car=n,e.default=t}); //# sourceMappingURL=ts-mixed-exports.umd.js.map " `; @@ -2964,8 +3176,8 @@ ts-module dist foo.d.ts index.d.ts - ts-module.esm.js - ts-module.esm.js.map + ts-module.esm.mjs + ts-module.esm.mjs.map ts-module.js ts-module.js.map ts-module.umd.js @@ -2978,11 +3190,11 @@ ts-module tsconfig.json -Build \\"tsModule\\" to dist: +Build \\"ts-module\\" to dist: 59 B: ts-module.js.gz 42 B: ts-module.js.br -65 B: ts-module.esm.js.gz -49 B: ts-module.esm.js.br +65 B: ts-module.esm.mjs.gz +49 B: ts-module.esm.mjs.br 167 B: ts-module.umd.js.gz 127 B: ts-module.umd.js.br" `; @@ -3001,7 +3213,7 @@ exports[`fixtures build ts-module with microbundle 4`] = ` exports[`fixtures build ts-module with microbundle 5`] = ` "function o(){return\\"foobar\\"}export{o as foobar}; -//# sourceMappingURL=ts-module.esm.js.map +//# sourceMappingURL=ts-module.esm.mjs.map " `; @@ -3016,3 +3228,112 @@ exports[`fixtures build ts-module with microbundle 7`] = ` //# sourceMappingURL=ts-module.umd.js.map " `; + +exports[`fixtures build visualizer with microbundle 1`] = ` +"Used script: microbundle --visualize + +Directory tree: + +visualizer + dist + visualizer.esm.mjs + visualizer.esm.mjs.map + visualizer.js + visualizer.js.map + visualizer.umd.js + visualizer.umd.js.map + package.json + src + index.js + stats.html + + +Build \\"visualizer\\" to dist: +148 B: visualizer.js.gz +107 B: visualizer.js.br +79 B: visualizer.esm.mjs.gz +64 B: visualizer.esm.mjs.br +231 B: visualizer.umd.js.gz +195 B: visualizer.umd.js.br" +`; + +exports[`fixtures build visualizer with microbundle 2`] = `6`; + +exports[`fixtures build visualizer with microbundle 3`] = ` +"import a from\\"camelcase\\";var o=a(\\"foo-bar\\");export default o; +//# sourceMappingURL=visualizer.esm.mjs.map +" +`; + +exports[`fixtures build visualizer with microbundle 4`] = ` +"function e(e){return e&&\\"object\\"==typeof e&&\\"default\\"in e?e:{default:e}}var t=/*#__PURE__*/e(require(\\"camelcase\\")).default(\\"foo-bar\\");module.exports=t; +//# sourceMappingURL=visualizer.js.map +" +`; + +exports[`fixtures build visualizer with microbundle 5`] = ` +"!function(e,f){\\"object\\"==typeof exports&&\\"undefined\\"!=typeof module?module.exports=f(require(\\"camelcase\\")):\\"function\\"==typeof define&&define.amd?define([\\"camelcase\\"],f):(e||self).visualizer=f(e.camelcase)}(this,function(e){function f(e){return e&&\\"object\\"==typeof e&&\\"default\\"in e?e:{default:e}}/*#__PURE__*/ +return f(e).default(\\"foo-bar\\")}); +//# sourceMappingURL=visualizer.umd.js.map +" +`; + +exports[`fixtures build worker-loader with microbundle 1`] = ` +"Used script: microbundle -f modern,es --workers + +Directory tree: + +worker-loader + dist + worker-35b22e56.js + worker-35b22e56.js.map + worker-7e1b9921.js + worker-7e1b9921.js.map + worker-loader.esm.mjs + worker-loader.esm.mjs.map + worker-loader.modern.mjs + worker-loader.modern.mjs.map + package-lock.json + package.json + src + bar.js + index.js + worker.js + + +Build \\"worker-loader\\" to dist: +140 B: worker-loader.modern.mjs.gz +112 B: worker-loader.modern.mjs.br +63 B: worker-7e1b9921.js.gz +54 B: worker-7e1b9921.js.br +150 B: worker-loader.esm.mjs.gz +123 B: worker-loader.esm.mjs.br +81 B: worker-35b22e56.js.gz +66 B: worker-35b22e56.js.br" +`; + +exports[`fixtures build worker-loader with microbundle 2`] = `8`; + +exports[`fixtures build worker-loader with microbundle 3`] = ` +"self.onmessage=function(e){return self.postMessage(e.data+\\"bar\\")}; +//# sourceMappingURL=worker-35b22e56.js.map +" +`; + +exports[`fixtures build worker-loader with microbundle 4`] = ` +"self.onmessage=s=>self.postMessage(s.data+\\"bar\\"); +//# sourceMappingURL=worker-7e1b9921.js.map +" +`; + +exports[`fixtures build worker-loader with microbundle 5`] = ` +"var e=new Worker(new URL(\\"worker-35b22e56.js\\",import.meta.url),{type:\\"module\\"});e.onmessage=function(e){return\\"foobar\\"===e.data},e.postMessage(\\"foo\\"); +//# sourceMappingURL=worker-loader.esm.mjs.map +" +`; + +exports[`fixtures build worker-loader with microbundle 6`] = ` +"const e=new Worker(new URL(\\"worker-7e1b9921.js\\",import.meta.url),{type:\\"module\\"});e.onmessage=e=>\\"foobar\\"===e.data,e.postMessage(\\"foo\\"); +//# sourceMappingURL=worker-loader.modern.mjs.map +" +`; diff --git a/test/fixtures/basic-compress-false/src/index.js b/test/fixtures/basic-compress-false/src/index.js index a756a0a4..c0a2efb0 100644 --- a/test/fixtures/basic-compress-false/src/index.js +++ b/test/fixtures/basic-compress-false/src/index.js @@ -1,5 +1,5 @@ import { two } from './two'; -export default async function(...args) { +export default async function (...args) { return [await two(...args), await two(...args)]; } diff --git a/test/fixtures/basic-css/src/index.js b/test/fixtures/basic-css/src/index.js index 3a807d79..69d12538 100644 --- a/test/fixtures/basic-css/src/index.js +++ b/test/fixtures/basic-css/src/index.js @@ -1,6 +1,6 @@ import './two.css'; -export default function() { +export default function () { const el = document.createElement('div'); el.className = 'testing'; return el; diff --git a/test/fixtures/basic-dashed-external/src/index.js b/test/fixtures/basic-dashed-external/src/index.js index f1fd29e2..dd7e2f97 100644 --- a/test/fixtures/basic-dashed-external/src/index.js +++ b/test/fixtures/basic-dashed-external/src/index.js @@ -3,6 +3,6 @@ console.log(tinyglob); import { two } from './two'; -export default async function(...args) { +export default async function (...args) { return [await two(...args), await two(...args)]; } diff --git a/test/fixtures/basic-json/src/index.js b/test/fixtures/basic-json/src/index.js index c00eab09..88442f08 100644 --- a/test/fixtures/basic-json/src/index.js +++ b/test/fixtures/basic-json/src/index.js @@ -1,5 +1,5 @@ import two from './two.json'; -export default async function(...args) { +export default async function (...args) { return two; } diff --git a/test/fixtures/basic-multi-source-css/a.css b/test/fixtures/basic-multi-source-css/a.css new file mode 100644 index 00000000..317852fd --- /dev/null +++ b/test/fixtures/basic-multi-source-css/a.css @@ -0,0 +1,5 @@ +.a { + display: flex; + color: green; + background: pink; +} diff --git a/test/fixtures/basic-multi-source-css/a.js b/test/fixtures/basic-multi-source-css/a.js new file mode 100644 index 00000000..44b08a5e --- /dev/null +++ b/test/fixtures/basic-multi-source-css/a.js @@ -0,0 +1,7 @@ +import './a.css'; + +export default function () { + const el = document.createElement('div'); + el.className = 'a'; + return el; +} diff --git a/test/fixtures/basic-multi-source-css/b.css b/test/fixtures/basic-multi-source-css/b.css new file mode 100644 index 00000000..36de7313 --- /dev/null +++ b/test/fixtures/basic-multi-source-css/b.css @@ -0,0 +1,5 @@ +.b { + display: flex; + color: red; + background: blue; +} diff --git a/test/fixtures/basic-multi-source-css/b.js b/test/fixtures/basic-multi-source-css/b.js new file mode 100644 index 00000000..2d21df05 --- /dev/null +++ b/test/fixtures/basic-multi-source-css/b.js @@ -0,0 +1,7 @@ +import './b.css'; + +export default function () { + const el = document.createElement('div'); + el.className = 'b'; + return el; +} diff --git a/test/fixtures/basic-multi-source-css/package.json b/test/fixtures/basic-multi-source-css/package.json new file mode 100644 index 00000000..c0344448 --- /dev/null +++ b/test/fixtures/basic-multi-source-css/package.json @@ -0,0 +1,7 @@ +{ + "name": "basic-multi-source-css", + "source":[ + "./a.js", + "./b.js" + ] +} diff --git a/test/fixtures/basic-no-compress/src/index.js b/test/fixtures/basic-no-compress/src/index.js index a756a0a4..c0a2efb0 100644 --- a/test/fixtures/basic-no-compress/src/index.js +++ b/test/fixtures/basic-no-compress/src/index.js @@ -1,5 +1,5 @@ import { two } from './two'; -export default async function(...args) { +export default async function (...args) { return [await two(...args), await two(...args)]; } diff --git a/test/fixtures/basic-no-pkg-main/src/index.js b/test/fixtures/basic-no-pkg-main/src/index.js index a756a0a4..c0a2efb0 100644 --- a/test/fixtures/basic-no-pkg-main/src/index.js +++ b/test/fixtures/basic-no-pkg-main/src/index.js @@ -1,5 +1,5 @@ import { two } from './two'; -export default async function(...args) { +export default async function (...args) { return [await two(...args), await two(...args)]; } diff --git a/test/fixtures/basic-with-cwd/basic/src/index.js b/test/fixtures/basic-with-cwd/basic/src/index.js index a756a0a4..c0a2efb0 100644 --- a/test/fixtures/basic-with-cwd/basic/src/index.js +++ b/test/fixtures/basic-with-cwd/basic/src/index.js @@ -1,5 +1,5 @@ import { two } from './two'; -export default async function(...args) { +export default async function (...args) { return [await two(...args), await two(...args)]; } diff --git a/test/fixtures/basic/src/index.js b/test/fixtures/basic/src/index.js index a756a0a4..c0a2efb0 100644 --- a/test/fixtures/basic/src/index.js +++ b/test/fixtures/basic/src/index.js @@ -1,5 +1,5 @@ import { two } from './two'; -export default async function(...args) { +export default async function (...args) { return [await two(...args), await two(...args)]; } diff --git a/test/fixtures/css-modules--false/src/index.js b/test/fixtures/css-modules--false/src/index.js index 6edf3533..430e7c19 100644 --- a/test/fixtures/css-modules--false/src/index.js +++ b/test/fixtures/css-modules--false/src/index.js @@ -1,4 +1,4 @@ import './not_scoped.css'; import './not_scoped.module.css'; -export default function() {} +export default function () {} diff --git a/test/fixtures/css-modules--null/src/index.js b/test/fixtures/css-modules--null/src/index.js index e2bfa463..74b754fb 100644 --- a/test/fixtures/css-modules--null/src/index.js +++ b/test/fixtures/css-modules--null/src/index.js @@ -1,7 +1,7 @@ import './not_scoped.css'; import scoped from './scoped.module.css'; -export default function() { +export default function () { const el = document.createElement('div'); el.className = scoped.scoped_class; return el; diff --git a/test/fixtures/css-modules--string/src/index.js b/test/fixtures/css-modules--string/src/index.js index 7fac50a4..ef4849de 100644 --- a/test/fixtures/css-modules--string/src/index.js +++ b/test/fixtures/css-modules--string/src/index.js @@ -1,7 +1,7 @@ import global from './scoped.css'; import scoped from './scoped.module.css'; -export default function() { +export default function () { const el = document.createElement('div'); el.className = scoped.scoped_class + ' ' + global.test_class_that_should_be_scoped; diff --git a/test/fixtures/css-modules--true/src/index.js b/test/fixtures/css-modules--true/src/index.js index 7fac50a4..ef4849de 100644 --- a/test/fixtures/css-modules--true/src/index.js +++ b/test/fixtures/css-modules--true/src/index.js @@ -1,7 +1,7 @@ import global from './scoped.css'; import scoped from './scoped.module.css'; -export default function() { +export default function () { const el = document.createElement('div'); el.className = scoped.scoped_class + ' ' + global.test_class_that_should_be_scoped; diff --git a/test/fixtures/custom-outputs-alt/package.json b/test/fixtures/custom-outputs-alt/package.json new file mode 100644 index 00000000..6c5acc49 --- /dev/null +++ b/test/fixtures/custom-outputs-alt/package.json @@ -0,0 +1,10 @@ +{ + "name": "custom-outputs-alt", + "cjs:main": "dist/custom-outputs-alt.cjsmain.js", + "unpkg": "dist/custom-outputs-alt.unpkg.js", + "jsnext:main": "dist/custom-outputs-alt.jsnextmain.mjs", + "esmodule": "dist/custom-outputs-alt.esmodule.mjs", + "scripts": { + "build": "microbundle -f modern,es,umd,cjs" + } +} diff --git a/test/fixtures/custom-outputs-alt/src/index.js b/test/fixtures/custom-outputs-alt/src/index.js new file mode 100644 index 00000000..c0a2efb0 --- /dev/null +++ b/test/fixtures/custom-outputs-alt/src/index.js @@ -0,0 +1,5 @@ +import { two } from './two'; + +export default async function (...args) { + return [await two(...args), await two(...args)]; +} diff --git a/test/fixtures/custom-outputs-alt/src/two.js b/test/fixtures/custom-outputs-alt/src/two.js new file mode 100644 index 00000000..9f1f741b --- /dev/null +++ b/test/fixtures/custom-outputs-alt/src/two.js @@ -0,0 +1,3 @@ +export async function two(...args) { + return args.reduce((total, value) => total + value, 0); +} diff --git a/test/fixtures/custom-outputs/package.json b/test/fixtures/custom-outputs/package.json new file mode 100644 index 00000000..4338d399 --- /dev/null +++ b/test/fixtures/custom-outputs/package.json @@ -0,0 +1,10 @@ +{ + "name": "custom-outputs", + "main": "dist/custom-outputs.js", + "umd:main": "dist/custom-outputs.umdx.js", + "module": "dist/custom-outputs.modulex.mjs", + "exports": "./dist/custom-outputs.exportsx.mjs", + "scripts": { + "build": "microbundle -f modern,es,umd,cjs" + } +} diff --git a/test/fixtures/custom-outputs/src/index.js b/test/fixtures/custom-outputs/src/index.js new file mode 100644 index 00000000..c0a2efb0 --- /dev/null +++ b/test/fixtures/custom-outputs/src/index.js @@ -0,0 +1,5 @@ +import { two } from './two'; + +export default async function (...args) { + return [await two(...args), await two(...args)]; +} diff --git a/test/fixtures/custom-outputs/src/two.js b/test/fixtures/custom-outputs/src/two.js new file mode 100644 index 00000000..9f1f741b --- /dev/null +++ b/test/fixtures/custom-outputs/src/two.js @@ -0,0 +1,3 @@ +export async function two(...args) { + return args.reduce((total, value) => total + value, 0); +} diff --git a/test/fixtures/custom-source-with-cwd/custom-source/src/custom-source.js b/test/fixtures/custom-source-with-cwd/custom-source/src/custom-source.js index a756a0a4..c0a2efb0 100644 --- a/test/fixtures/custom-source-with-cwd/custom-source/src/custom-source.js +++ b/test/fixtures/custom-source-with-cwd/custom-source/src/custom-source.js @@ -1,5 +1,5 @@ import { two } from './two'; -export default async function(...args) { +export default async function (...args) { return [await two(...args), await two(...args)]; } diff --git a/test/fixtures/custom-source/src/custom-source.js b/test/fixtures/custom-source/src/custom-source.js index a756a0a4..c0a2efb0 100644 --- a/test/fixtures/custom-source/src/custom-source.js +++ b/test/fixtures/custom-source/src/custom-source.js @@ -1,5 +1,5 @@ import { two } from './two'; -export default async function(...args) { +export default async function (...args) { return [await two(...args), await two(...args)]; } diff --git a/test/fixtures/inline-source-map/src/index.js b/test/fixtures/inline-source-map/src/index.js index a756a0a4..c0a2efb0 100644 --- a/test/fixtures/inline-source-map/src/index.js +++ b/test/fixtures/inline-source-map/src/index.js @@ -1,5 +1,5 @@ import { two } from './two'; -export default async function(...args) { +export default async function (...args) { return [await two(...args), await two(...args)]; } diff --git a/test/fixtures/mangle-json-file/src/index.js b/test/fixtures/mangle-json-file/src/index.js index 8d0f5527..cca8c9ac 100644 --- a/test/fixtures/mangle-json-file/src/index.js +++ b/test/fixtures/mangle-json-file/src/index.js @@ -1,6 +1,6 @@ import { two } from './two'; -export default function() { +export default function () { console.log(two.prop1); console.log(two._prop2); return two; diff --git a/test/fixtures/minify-config/src/index.js b/test/fixtures/minify-config/src/index.js index 8d0f5527..cca8c9ac 100644 --- a/test/fixtures/minify-config/src/index.js +++ b/test/fixtures/minify-config/src/index.js @@ -1,6 +1,6 @@ import { two } from './two'; -export default function() { +export default function () { console.log(two.prop1); console.log(two._prop2); return two; diff --git a/test/fixtures/minify-path-config/src/index.js b/test/fixtures/minify-path-config/src/index.js index 8d0f5527..cca8c9ac 100644 --- a/test/fixtures/minify-path-config/src/index.js +++ b/test/fixtures/minify-path-config/src/index.js @@ -1,6 +1,6 @@ import { two } from './two'; -export default function() { +export default function () { console.log(two.prop1); console.log(two._prop2); return two; diff --git a/test/fixtures/minify-path-parent-dir-with-cwd/minify-path-parent-dir/index.js b/test/fixtures/minify-path-parent-dir-with-cwd/minify-path-parent-dir/index.js index 8d0f5527..cca8c9ac 100644 --- a/test/fixtures/minify-path-parent-dir-with-cwd/minify-path-parent-dir/index.js +++ b/test/fixtures/minify-path-parent-dir-with-cwd/minify-path-parent-dir/index.js @@ -1,6 +1,6 @@ import { two } from './two'; -export default function() { +export default function () { console.log(two.prop1); console.log(two._prop2); return two; diff --git a/test/fixtures/modern-generators/src/index.js b/test/fixtures/modern-generators/src/index.js index a9d95a89..551eefcf 100644 --- a/test/fixtures/modern-generators/src/index.js +++ b/test/fixtures/modern-generators/src/index.js @@ -1,6 +1,6 @@ import { idMaker } from './two'; -export default async function() { +export default async function () { const gen = idMaker(); return [gen.next().value, gen.next().value]; } diff --git a/test/fixtures/modern/src/index.js b/test/fixtures/modern/src/index.js index a756a0a4..c0a2efb0 100644 --- a/test/fixtures/modern/src/index.js +++ b/test/fixtures/modern/src/index.js @@ -1,5 +1,5 @@ import { two } from './two'; -export default async function(...args) { +export default async function (...args) { return [await two(...args), await two(...args)]; } diff --git a/test/fixtures/name-custom-amd/src/index.js b/test/fixtures/name-custom-amd/src/index.js index a756a0a4..c0a2efb0 100644 --- a/test/fixtures/name-custom-amd/src/index.js +++ b/test/fixtures/name-custom-amd/src/index.js @@ -1,5 +1,5 @@ import { two } from './two'; -export default async function(...args) { +export default async function (...args) { return [await two(...args), await two(...args)]; } diff --git a/test/fixtures/name-custom-cli/src/index.js b/test/fixtures/name-custom-cli/src/index.js index a756a0a4..c0a2efb0 100644 --- a/test/fixtures/name-custom-cli/src/index.js +++ b/test/fixtures/name-custom-cli/src/index.js @@ -1,5 +1,5 @@ import { two } from './two'; -export default async function(...args) { +export default async function (...args) { return [await two(...args), await two(...args)]; } diff --git a/test/fixtures/no-pkg-name/src/index.js b/test/fixtures/no-pkg-name/src/index.js index a756a0a4..c0a2efb0 100644 --- a/test/fixtures/no-pkg-name/src/index.js +++ b/test/fixtures/no-pkg-name/src/index.js @@ -1,5 +1,5 @@ import { two } from './two'; -export default async function(...args) { +export default async function (...args) { return [await two(...args), await two(...args)]; } diff --git a/test/fixtures/no-pkg/src/index.js b/test/fixtures/no-pkg/src/index.js index a756a0a4..c0a2efb0 100644 --- a/test/fixtures/no-pkg/src/index.js +++ b/test/fixtures/no-pkg/src/index.js @@ -1,5 +1,5 @@ import { two } from './two'; -export default async function(...args) { +export default async function (...args) { return [await two(...args), await two(...args)]; } diff --git a/test/fixtures/ts-custom-declaration/package.json b/test/fixtures/ts-custom-declaration/package.json index 2fd7573b..00a923ee 100644 --- a/test/fixtures/ts-custom-declaration/package.json +++ b/test/fixtures/ts-custom-declaration/package.json @@ -2,7 +2,7 @@ "name": "ts-custom-declarations", "main": "dist/index.js", "types": "types/index.d.ts", - "source": "src/index.js", + "source": "src/index.ts", "scripts": { "build": "microbundle --generateTypes false" } diff --git a/test/fixtures/ts-custom-declaration/src/index.js b/test/fixtures/ts-custom-declaration/src/index.ts similarity index 100% rename from test/fixtures/ts-custom-declaration/src/index.js rename to test/fixtures/ts-custom-declaration/src/index.ts diff --git a/test/fixtures/visualizer/package.json b/test/fixtures/visualizer/package.json new file mode 100644 index 00000000..0f2b26f6 --- /dev/null +++ b/test/fixtures/visualizer/package.json @@ -0,0 +1,10 @@ +{ + "name": "visualizer", + "scripts": { + "prebuild": "rimraf ./stats.html", + "build": "microbundle --visualize" + }, + "peerDependencies": { + "camelcase": "*" + } +} diff --git a/test/fixtures/visualizer/src/index.js b/test/fixtures/visualizer/src/index.js new file mode 100644 index 00000000..287e3532 --- /dev/null +++ b/test/fixtures/visualizer/src/index.js @@ -0,0 +1,3 @@ +import camelcase from 'camelcase'; + +export default camelcase('foo-bar'); diff --git a/test/fixtures/worker-loader/package-lock.json b/test/fixtures/worker-loader/package-lock.json new file mode 100644 index 00000000..aa8f2ea9 --- /dev/null +++ b/test/fixtures/worker-loader/package-lock.json @@ -0,0 +1,118 @@ +{ + "name": "worker-loader", + "lockfileVersion": 2, + "requires": true, + "packages": { + "": { + "dependencies": { + "@surma/rollup-plugin-off-main-thread": "2.1.0" + } + }, + "node_modules/@surma/rollup-plugin-off-main-thread": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/@surma/rollup-plugin-off-main-thread/-/rollup-plugin-off-main-thread-2.1.0.tgz", + "integrity": "sha512-xQnXQc2N/P/fS1qxSwf/gN7I4xjZ3LGpoTXpFpqj7hhpqFsmYKPj792HFSkTfQWhxNLnQN7m/0XIraZ5htlDYg==", + "dependencies": { + "ejs": "^2.6.1", + "json5": "^2.2.0", + "magic-string": "^0.25.0", + "tippex": "^3.0.0" + } + }, + "node_modules/ejs": { + "version": "2.7.4", + "resolved": "https://registry.npmjs.org/ejs/-/ejs-2.7.4.tgz", + "integrity": "sha512-7vmuyh5+kuUyJKePhQfRQBhXV5Ce+RnaeeQArKu1EAMpL3WbgMt5WG6uQZpEVvYSSsxMXRKOewtDk9RaTKXRlA==", + "hasInstallScript": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/json5": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.0.tgz", + "integrity": "sha512-f+8cldu7X/y7RAJurMEJmdoKXGB/X550w2Nr3tTbezL6RwEE/iMcm+tZnXeoZtKuOq6ft8+CqzEkrIgx1fPoQA==", + "dependencies": { + "minimist": "^1.2.5" + }, + "bin": { + "json5": "lib/cli.js" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/magic-string": { + "version": "0.25.7", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.25.7.tgz", + "integrity": "sha512-4CrMT5DOHTDk4HYDlzmwu4FVCcIYI8gauveasrdCu2IKIFOJ3f0v/8MDGJCDL9oD2ppz/Av1b0Nj345H9M+XIA==", + "dependencies": { + "sourcemap-codec": "^1.4.4" + } + }, + "node_modules/minimist": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", + "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==" + }, + "node_modules/sourcemap-codec": { + "version": "1.4.8", + "resolved": "https://registry.npmjs.org/sourcemap-codec/-/sourcemap-codec-1.4.8.tgz", + "integrity": "sha512-9NykojV5Uih4lgo5So5dtw+f0JgJX30KCNI8gwhz2J9A15wD0Ml6tjHKwf6fTSa6fAdVBdZeNOs9eJ71qCk8vA==" + }, + "node_modules/tippex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/tippex/-/tippex-3.0.0.tgz", + "integrity": "sha1-sXYJonzq/+B5ezhzk/2Zh45Nfqk=" + } + }, + "dependencies": { + "@surma/rollup-plugin-off-main-thread": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/@surma/rollup-plugin-off-main-thread/-/rollup-plugin-off-main-thread-2.1.0.tgz", + "integrity": "sha512-xQnXQc2N/P/fS1qxSwf/gN7I4xjZ3LGpoTXpFpqj7hhpqFsmYKPj792HFSkTfQWhxNLnQN7m/0XIraZ5htlDYg==", + "requires": { + "ejs": "^2.6.1", + "json5": "^2.2.0", + "magic-string": "^0.25.0", + "tippex": "^3.0.0" + } + }, + "ejs": { + "version": "2.7.4", + "resolved": "https://registry.npmjs.org/ejs/-/ejs-2.7.4.tgz", + "integrity": "sha512-7vmuyh5+kuUyJKePhQfRQBhXV5Ce+RnaeeQArKu1EAMpL3WbgMt5WG6uQZpEVvYSSsxMXRKOewtDk9RaTKXRlA==" + }, + "json5": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.0.tgz", + "integrity": "sha512-f+8cldu7X/y7RAJurMEJmdoKXGB/X550w2Nr3tTbezL6RwEE/iMcm+tZnXeoZtKuOq6ft8+CqzEkrIgx1fPoQA==", + "requires": { + "minimist": "^1.2.5" + } + }, + "magic-string": { + "version": "0.25.7", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.25.7.tgz", + "integrity": "sha512-4CrMT5DOHTDk4HYDlzmwu4FVCcIYI8gauveasrdCu2IKIFOJ3f0v/8MDGJCDL9oD2ppz/Av1b0Nj345H9M+XIA==", + "requires": { + "sourcemap-codec": "^1.4.4" + } + }, + "minimist": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", + "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==" + }, + "sourcemap-codec": { + "version": "1.4.8", + "resolved": "https://registry.npmjs.org/sourcemap-codec/-/sourcemap-codec-1.4.8.tgz", + "integrity": "sha512-9NykojV5Uih4lgo5So5dtw+f0JgJX30KCNI8gwhz2J9A15wD0Ml6tjHKwf6fTSa6fAdVBdZeNOs9eJ71qCk8vA==" + }, + "tippex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/tippex/-/tippex-3.0.0.tgz", + "integrity": "sha1-sXYJonzq/+B5ezhzk/2Zh45Nfqk=" + } + } +} diff --git a/test/fixtures/worker-loader/package.json b/test/fixtures/worker-loader/package.json new file mode 100644 index 00000000..24dc45b7 --- /dev/null +++ b/test/fixtures/worker-loader/package.json @@ -0,0 +1,6 @@ +{ + "name": "worker-loader", + "scripts": { + "build": "microbundle -f modern,es --workers" + } +} diff --git a/test/fixtures/worker-loader/src/bar.js b/test/fixtures/worker-loader/src/bar.js new file mode 100644 index 00000000..808dbfe1 --- /dev/null +++ b/test/fixtures/worker-loader/src/bar.js @@ -0,0 +1,3 @@ +export function bar() { + return 'bar'; +} diff --git a/test/fixtures/worker-loader/src/index.js b/test/fixtures/worker-loader/src/index.js new file mode 100644 index 00000000..8e267c42 --- /dev/null +++ b/test/fixtures/worker-loader/src/index.js @@ -0,0 +1,4 @@ +const webWorker = new Worker('./worker.js', { type: 'module' }); + +webWorker.onmessage = message => message.data === 'foobar'; +webWorker.postMessage('foo'); diff --git a/test/fixtures/worker-loader/src/worker.js b/test/fixtures/worker-loader/src/worker.js new file mode 100644 index 00000000..45d741a0 --- /dev/null +++ b/test/fixtures/worker-loader/src/worker.js @@ -0,0 +1,3 @@ +import { bar } from './bar'; + +self.onmessage = message => self.postMessage(message.data + bar());