This repository has been archived by the owner on May 24, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 52
Use pirates for interoperability with other require hooks #62
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
anandthakker
pushed a commit
to mapbox/mapbox-gl-js
that referenced
this pull request
Feb 27, 2018
anandthakker
pushed a commit
to mapbox/mapbox-gl-js
that referenced
this pull request
Feb 27, 2018
anandthakker
pushed a commit
to mapbox/mapbox-gl-js
that referenced
this pull request
Feb 28, 2018
anandthakker
pushed a commit
to mapbox/mapbox-gl-js
that referenced
this pull request
Mar 1, 2018
anandthakker
pushed a commit
to mapbox/mapbox-gl-js
that referenced
this pull request
Mar 6, 2018
anandthakker
pushed a commit
to mapbox/mapbox-gl-js
that referenced
this pull request
Mar 7, 2018
anandthakker
pushed a commit
to mapbox/mapbox-gl-js
that referenced
this pull request
Mar 7, 2018
anandthakker
pushed a commit
to mapbox/mapbox-gl-js
that referenced
this pull request
Mar 9, 2018
anandthakker
pushed a commit
to mapbox/mapbox-gl-js
that referenced
this pull request
Mar 11, 2018
anandthakker
pushed a commit
to mapbox/mapbox-gl-js
that referenced
this pull request
Mar 12, 2018
anandthakker
added a commit
to mapbox/mapbox-gl-js
that referenced
this pull request
Mar 12, 2018
* [codemod] convert src/ from commonjs to es6 modules Using 5to6-codemod/transforms/{cjs,exports,named-export-generation}.js * [codemod] convert bench/ to use import instead of require() 5to6-codemod/transforms/cjs.js * [codemod] Convert util.* to use named imports https://gist.github.com/anandthakker/b636ad8cb7782c47998c4de9c0c5419d * Setup rollup * Manual es6 module fixes * Fix(ish) codegen * Apply fixed codegen * Add flow-remove-types require hook using pirates Upstream: facebookarchive/flow-remove-types#62 * Update docs site to use es module import * Upgrade batfish * Update benchmarks build * Update style-spec build * [codemod] Convert test/unit to use import instead of require 5to6 cjs transform * Workaround for standard-things/esm#301 * Add scripts to run node/tap with require hooks * [codemod] test/unit no-strict * Avoid @std/esm 'temporal dead zone' warning * Fixup unit tests * Add comments explaining bundling strategy * Update integration test suite implementation * Update yarn.lock Specifically for zaach/jsonlint#103 (comment) * Polish build - Remove browserify - Update build tests * [lint] Use sourceType: script for test/integration/ * [lint] Add eslint-plugin-import, fix lint in src/ * [lint] Fix lint in test/ * [lint] Fix lint in bench/ * [lint] Fix lint for docs/ * Fix rollup config warning * Move rollup plugins to devDependencies * Use @mapbox-scoped rollup while awaiting upstream merge * Move comment in benchmarks.js * Restore comments stripped by codemods * Fix Style#queryRenderedFeature unit tests
Ah, looks like pirates uses some es2015 features that aren't supported in node 0.10/0.12 🤷♂️ |
Node 0.10 and 0.12 are no longer supported by Node and haven't been since 2016. |
We should definitely have this. Seems like it would be pretty safe to drop Node 0.10 and 0.12 support as part of the v2 release I'm planning. Thanks @anandthakker! Apologies for how long it's taken us to look at this PR. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Per standard-things/esm#119, this PR uses pirates to register the require hook instead of patching it in directly.
Advantage: better interoperability with other require hooks
Disadvantage: adds a (small) dependency