Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Re-export of previously exported class fails to compile #301

Closed
anandthakker opened this issue Feb 27, 2018 · 1 comment
Closed

Re-export of previously exported class fails to compile #301

anandthakker opened this issue Feb 27, 2018 · 1 comment
Labels

Comments

@anandthakker
Copy link

Running node -r @std/esm on the following,

export class MyClass {}
export {MyClass as MyClassAlias}

results in an error:

export {MyClass as MyClassAlias}
        ^^^^^^^

SyntaxError: Export 'MyClass' is not defined in module

If class MyClass{} is not exported (or exported after it's declared), the error does not occur.

@jdalton
Copy link
Member

jdalton commented Feb 27, 2018

Ah nice! This is a parse error that slipped in. I'll fix it by this evening.

Update:

v0.23.3 is released 🎉

anandthakker pushed a commit to mapbox/mapbox-gl-js that referenced this issue Feb 28, 2018
@jdalton jdalton added the bug label Feb 28, 2018
anandthakker pushed a commit to mapbox/mapbox-gl-js that referenced this issue Mar 1, 2018
anandthakker pushed a commit to mapbox/mapbox-gl-js that referenced this issue Mar 6, 2018
anandthakker pushed a commit to mapbox/mapbox-gl-js that referenced this issue Mar 7, 2018
anandthakker pushed a commit to mapbox/mapbox-gl-js that referenced this issue Mar 7, 2018
anandthakker pushed a commit to mapbox/mapbox-gl-js that referenced this issue Mar 7, 2018
anandthakker pushed a commit to mapbox/mapbox-gl-js that referenced this issue Mar 7, 2018
anandthakker pushed a commit to mapbox/mapbox-gl-js that referenced this issue Mar 9, 2018
anandthakker pushed a commit to mapbox/mapbox-gl-js that referenced this issue Mar 11, 2018
anandthakker pushed a commit to mapbox/mapbox-gl-js that referenced this issue Mar 12, 2018
anandthakker added a commit to mapbox/mapbox-gl-js that referenced this issue 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

2 participants