Skip to content

Commit

Permalink
[v2.0.0] Bundle acorn, allow node ESM import fo Rollup, update depend…
Browse files Browse the repository at this point in the history
…encies (#3391)

* Support Node ESM

* Bundle acorn again, adjust directory structure and support Node ESM

* Update dependencies

* Collect licenses from all artifacts

* Switch to colorette instead of turbocolor

* Support Node ESM through conditional exports

* Fix test
  • Loading branch information
lukastaegert committed Mar 6, 2020
1 parent 4132844 commit 01cc4f7
Show file tree
Hide file tree
Showing 69 changed files with 1,310 additions and 1,763 deletions.
4 changes: 0 additions & 4 deletions .eslintignore

This file was deleted.

9 changes: 7 additions & 2 deletions .eslintrc.json
@@ -1,6 +1,11 @@
{
"root": true,
"rules": {
"ignorePatterns": [
"test/*/samples/**/*.js",
"!test/*/samples/**/_config.js",
"test/leak/index.js",
"**/*.ts"
],
"rules": {
"indent": [ 2, "tab", { "SwitchCase": 1 } ],
"semi": [ 2, "always" ],
"keyword-spacing": [ 2, { "before": true, "after": true } ],
Expand Down
9 changes: 3 additions & 6 deletions .lintstagedrc
@@ -1,17 +1,14 @@
{
"{src,bin,browser,typings}/**/*.ts": [
"prettier --write",
"tslint --project . --fix",
"git add"
"tslint --project . --fix"
],
"test/**/*.ts": [
"prettier --write",
"tslint --project test/typescript --fix",
"git add"
"tslint --project test/typescript --fix"
],
"{test/test,test/*/index,test/utils,test/**/_config}.js": [
"prettier --write",
"eslint --fix",
"git add"
"eslint --fix"
]
}
127 changes: 71 additions & 56 deletions LICENSE.md
Expand Up @@ -28,10 +28,37 @@ The published Rollup artifact additionally contains code with the following lice
MIT, ISC

# Bundled dependencies:
## acorn
License: MIT
By: Marijn Haverbeke, Ingvar Stepanyan, Adrian Heine
Repository: git+https://github.com/acornjs/acorn.git

> Copyright (C) 2012-2018 by various contributors (see AUTHORS)
>
> Permission is hereby granted, free of charge, to any person obtaining a copy
> of this software and associated documentation files (the "Software"), to deal
> in the Software without restriction, including without limitation the rights
> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
> copies of the Software, and to permit persons to whom the Software is
> furnished to do so, subject to the following conditions:
>
> The above copyright notice and this permission notice shall be included in
> all copies or substantial portions of the Software.
>
> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
> THE SOFTWARE.
---------------------------------------

## acorn-export-ns-from
License: MIT
By: Adrian Heine
Repository: https://github.com/acornjs/acorn-export-ns-from
Repository: git+https://github.com/acornjs/acorn-export-ns-from.git

> Copyright (C) 2017-2018 by Adrian Heine
>
Expand All @@ -58,7 +85,7 @@ Repository: https://github.com/acornjs/acorn-export-ns-from
## acorn-import-meta
License: MIT
By: Adrian Heine
Repository: https://github.com/adrianheine/acorn-import-meta
Repository: git+https://github.com/adrianheine/acorn-import-meta.git

> Copyright (C) 2017-2018 by Adrian Heine
>
Expand All @@ -85,7 +112,7 @@ Repository: https://github.com/adrianheine/acorn-import-meta
## acorn-walk
License: MIT
By: Marijn Haverbeke, Ingvar Stepanyan, Adrian Heine
Repository: https://github.com/acornjs/acorn.git
Repository: git+https://github.com/acornjs/acorn.git

> Copyright (C) 2012-2018 by various contributors (see AUTHORS)
>
Expand All @@ -112,7 +139,7 @@ Repository: https://github.com/acornjs/acorn.git
## anymatch
License: ISC
By: Elan Shanker
Repository: https://github.com/micromatch/anymatch
Repository: git+https://github.com/micromatch/anymatch.git

> The ISC License
>
Expand All @@ -135,14 +162,14 @@ Repository: https://github.com/micromatch/anymatch
## binary-extensions
License: MIT
By: Sindre Sorhus
Repository: sindresorhus/binary-extensions
Repository: git+https://github.com/sindresorhus/binary-extensions.git

---------------------------------------

## braces
License: MIT
By: Jon Schlinkert, Brian Woodward, Elan Shanker, Eugene Sharygin, hemanth.hm
Repository: micromatch/braces
Repository: git+https://github.com/micromatch/braces.git

> The MIT License (MIT)
>
Expand Down Expand Up @@ -197,17 +224,32 @@ Repository: git+https://github.com/paulmillr/chokidar.git
---------------------------------------

## colorette
License: MIT
By: Jorge Bucaran
Repository: git+https://github.com/jorgebucaran/colorette.git

> Copyright © Jorge Bucaran <<https://jorgebucaran.com>>
>
> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
>
> The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
>
> THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
---------------------------------------

## date-time
License: MIT
By: Sindre Sorhus
Repository: sindresorhus/date-time
Repository: git+https://github.com/sindresorhus/date-time.git

---------------------------------------

## fill-range
License: MIT
By: Jon Schlinkert, Edo Rivai, Paul Miller, Rouven Weßling
Repository: jonschlinkert/fill-range
Repository: git+https://github.com/jonschlinkert/fill-range.git

> The MIT License (MIT)
>
Expand Down Expand Up @@ -236,7 +278,7 @@ Repository: jonschlinkert/fill-range
## glob-parent
License: ISC
By: Gulp Team, Elan Shanker, Blaine Bublitz
Repository: gulpjs/glob-parent
Repository: git+https://github.com/gulpjs/glob-parent.git

> The ISC License
>
Expand All @@ -259,13 +301,13 @@ Repository: gulpjs/glob-parent
## hash.js
License: MIT
By: Fedor Indutny
Repository: git@github.com:indutny/hash.js
Repository: git+ssh://git@github.com/indutny/hash.js.git

---------------------------------------

## inherits
License: ISC
Repository: git://github.com/isaacs/inherits
Repository: git://github.com/isaacs/inherits.git

> The ISC License
>
Expand All @@ -288,14 +330,14 @@ Repository: git://github.com/isaacs/inherits
## is-binary-path
License: MIT
By: Sindre Sorhus
Repository: sindresorhus/is-binary-path
Repository: git+https://github.com/sindresorhus/is-binary-path.git

---------------------------------------

## is-extglob
License: MIT
By: Jon Schlinkert
Repository: jonschlinkert/is-extglob
Repository: git+https://github.com/jonschlinkert/is-extglob.git

> The MIT License (MIT)
>
Expand Down Expand Up @@ -324,7 +366,7 @@ Repository: jonschlinkert/is-extglob
## is-glob
License: MIT
By: Jon Schlinkert, Brian Woodward, Daniel Perez
Repository: micromatch/is-glob
Repository: git+https://github.com/micromatch/is-glob.git

> The MIT License (MIT)
>
Expand Down Expand Up @@ -353,7 +395,7 @@ Repository: micromatch/is-glob
## is-number
License: MIT
By: Jon Schlinkert, Olsten Larck, Rouven Weßling
Repository: jonschlinkert/is-number
Repository: git+https://github.com/jonschlinkert/is-number.git

> The MIT License (MIT)
>
Expand Down Expand Up @@ -389,14 +431,14 @@ Repository: git+https://github.com/Rich-Harris/is-reference.git
## locate-character
License: MIT
By: Rich Harris
Repository: Rich-Harris/locate-character
Repository: git+https://github.com/Rich-Harris/locate-character.git

---------------------------------------

## magic-string
License: MIT
By: Rich Harris
Repository: https://github.com/rich-harris/magic-string
Repository: git+https://github.com/rich-harris/magic-string.git

> Copyright 2018 Rich Harris
>
Expand All @@ -411,7 +453,7 @@ Repository: https://github.com/rich-harris/magic-string
## micromatch
License: MIT
By: Jon Schlinkert, Amila Welihinda, Bogdan Chadkin, Brian Woodward, Devon Govett, Elan Shanker, Fabrício Matté, Martin Kolárik, Olsten Larck, Paul Miller, Tom Byrer, Tyler Akins, Peter Bright
Repository: micromatch/micromatch
Repository: git+https://github.com/micromatch/micromatch.git

> The MIT License (MIT)
>
Expand Down Expand Up @@ -439,7 +481,7 @@ Repository: micromatch/micromatch

## minimalistic-assert
License: ISC
Repository: https://github.com/calvinmetcalf/minimalistic-assert.git
Repository: git+https://github.com/calvinmetcalf/minimalistic-assert.git

> Copyright 2015 Calvin Metcalf
>
Expand Down Expand Up @@ -486,7 +528,7 @@ Repository: git://github.com/substack/minimist.git
## normalize-path
License: MIT
By: Jon Schlinkert, Blaine Bublitz
Repository: jonschlinkert/normalize-path
Repository: git+https://github.com/jonschlinkert/normalize-path.git

> The MIT License (MIT)
>
Expand Down Expand Up @@ -515,14 +557,14 @@ Repository: jonschlinkert/normalize-path
## parse-ms
License: MIT
By: Sindre Sorhus
Repository: sindresorhus/parse-ms
Repository: git+https://github.com/sindresorhus/parse-ms.git

---------------------------------------

## picomatch
License: MIT
By: Jon Schlinkert
Repository: micromatch/picomatch
Repository: git+https://github.com/micromatch/picomatch.git

> The MIT License (MIT)
>
Expand Down Expand Up @@ -551,14 +593,14 @@ Repository: micromatch/picomatch
## pretty-bytes
License: MIT
By: Sindre Sorhus
Repository: sindresorhus/pretty-bytes
Repository: git+https://github.com/sindresorhus/pretty-bytes.git

---------------------------------------

## pretty-ms
License: MIT
By: Sindre Sorhus
Repository: sindresorhus/pretty-ms
Repository: git+https://github.com/sindresorhus/pretty-ms.git

---------------------------------------

Expand Down Expand Up @@ -601,14 +643,14 @@ Repository: git://github.com/kamicane/require-relative.git
## rollup-pluginutils
License: MIT
By: Rich Harris
Repository: rollup/rollup-pluginutils
Repository: git+https://github.com/rollup/rollup-pluginutils.git

---------------------------------------

## signal-exit
License: ISC
By: Ben Coe
Repository: https://github.com/tapjs/signal-exit.git
Repository: git+https://github.com/tapjs/signal-exit.git

> The ISC License
>
Expand All @@ -632,7 +674,7 @@ Repository: https://github.com/tapjs/signal-exit.git
## sourcemap-codec
License: MIT
By: Rich Harris
Repository: https://github.com/Rich-Harris/sourcemap-codec
Repository: git+https://github.com/Rich-Harris/sourcemap-codec.git

> The MIT License
>
Expand Down Expand Up @@ -661,14 +703,14 @@ Repository: https://github.com/Rich-Harris/sourcemap-codec
## time-zone
License: MIT
By: Sindre Sorhus
Repository: sindresorhus/time-zone
Repository: git+https://github.com/sindresorhus/time-zone.git

---------------------------------------

## to-regex-range
License: MIT
By: Jon Schlinkert, Rouven Weßling
Repository: micromatch/to-regex-range
Repository: git+https://github.com/micromatch/to-regex-range.git

> The MIT License (MIT)
>
Expand All @@ -691,30 +733,3 @@ Repository: micromatch/to-regex-range
> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
> THE SOFTWARE.
---------------------------------------

## turbocolor
License: MIT
By: Jorge Bucaran
Repository: jorgebucaran/turbocolor

> Copyright © 2015-present [Jorge Bucaran](https://github.com/jorgebucaran)
>
> Permission is hereby granted, free of charge, to any person obtaining a copy
> of this software and associated documentation files (the "Software"), to deal
> in the Software without restriction, including without limitation the rights
> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
> copies of the Software, and to permit persons to whom the Software is
> furnished to do so, subject to the following conditions:
>
> The above copyright notice and this permission notice shall be included in all
> copies or substantial portions of the Software.
>
> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
> SOFTWARE.
8 changes: 8 additions & 0 deletions build-plugins/emit-module-package-file.js
@@ -0,0 +1,8 @@
export default function emitModulePackageFile() {
return {
name: 'emit-module-package-file',
generateBundle() {
this.emitFile({ type: 'asset', fileName: 'package.json', source: `{"type":"module"}` });
}
};
}

0 comments on commit 01cc4f7

Please sign in to comment.