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

Allow array spread and rest params #34282

Closed
wants to merge 10 commits into from

Conversation

rcebulko
Copy link
Contributor

@rcebulko rcebulko commented May 7, 2021

No description provided.

@rcebulko rcebulko requested a review from jridgewell May 7, 2021 18:16
@amp-owners-bot
Copy link

amp-owners-bot bot commented May 7, 2021

Hey @erwinmombay! These files were changed:

build-system/babel-plugins/babel-plugin-transform-simple-array-destructure/index.js
build-system/babel-plugins/babel-plugin-transform-simple-array-destructure/test/fixtures/transform/deep-array/input.js
build-system/babel-plugins/babel-plugin-transform-simple-array-destructure/test/fixtures/transform/deep-array/options.json
build-system/babel-plugins/babel-plugin-transform-simple-array-destructure/test/fixtures/transform/deep/input.js
build-system/babel-plugins/babel-plugin-transform-simple-array-destructure/test/fixtures/transform/deep/options.json
build-system/babel-plugins/babel-plugin-transform-simple-array-destructure/test/fixtures/transform/param/input.js
build-system/babel-plugins/babel-plugin-transform-simple-array-destructure/test/fixtures/transform/param/options.json
build-system/babel-plugins/babel-plugin-transform-simple-array-destructure/test/fixtures/transform/skip-element/input.js
build-system/babel-plugins/babel-plugin-transform-simple-array-destructure/test/fixtures/transform/skip-element/options.json
build-system/babel-plugins/babel-plugin-transform-simple-array-destructure/test/fixtures/transform/skip-element/output.js
build-system/babel-plugins/babel-plugin-transform-simple-array-destructure/test/fixtures/transform/variable-declarations/input.js
build-system/babel-plugins/babel-plugin-transform-simple-array-destructure/test/fixtures/transform/variable-declarations/options.json
+5 more

Hey @jridgewell! These files were changed:

build-system/babel-plugins/babel-plugin-transform-simple-array-destructure/index.js
build-system/babel-plugins/babel-plugin-transform-simple-array-destructure/test/fixtures/transform/deep-array/input.js
build-system/babel-plugins/babel-plugin-transform-simple-array-destructure/test/fixtures/transform/deep-array/options.json
build-system/babel-plugins/babel-plugin-transform-simple-array-destructure/test/fixtures/transform/deep/input.js
build-system/babel-plugins/babel-plugin-transform-simple-array-destructure/test/fixtures/transform/deep/options.json
build-system/babel-plugins/babel-plugin-transform-simple-array-destructure/test/fixtures/transform/param/input.js
build-system/babel-plugins/babel-plugin-transform-simple-array-destructure/test/fixtures/transform/param/options.json
build-system/babel-plugins/babel-plugin-transform-simple-array-destructure/test/fixtures/transform/skip-element/input.js
build-system/babel-plugins/babel-plugin-transform-simple-array-destructure/test/fixtures/transform/skip-element/options.json
build-system/babel-plugins/babel-plugin-transform-simple-array-destructure/test/fixtures/transform/skip-element/output.js
build-system/babel-plugins/babel-plugin-transform-simple-array-destructure/test/fixtures/transform/variable-declarations/input.js
build-system/babel-plugins/babel-plugin-transform-simple-array-destructure/test/fixtures/transform/variable-declarations/options.json
+8 more

@rcebulko
Copy link
Contributor Author

@jridgewell bumping this in your GH queue

Copy link
Contributor

@jridgewell jridgewell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needs updates to handle ArrayPattern:

  • build-system/babel-plugins/babel-plugin-transform-default-assignment/index.js
  • build-system/eslint-rules/no-deep-destructuring.js
  • build-system/eslint-rules/prefer-destructuring.js
  • build-system/eslint-rules/unused-private-field.js

Can be removed:

  • build-system/babel-plugins/babel-plugin-transform-simple-array-destructure/index.js

src/core/assert/base.js Outdated Show resolved Hide resolved
src/core/assert/base.js Outdated Show resolved Hide resolved
src/core/error.js Outdated Show resolved Hide resolved
src/core/error.js Outdated Show resolved Hide resolved
@@ -36,7 +36,7 @@ export function once(fn) {
let callback = fn;
return (...args) => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ugh, this shouldn't have been here to start with.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah I'd been wondering about this, and if it caused the iterator polyfill to be included regardless. Should I rewrite to use arguments?

src/core/types/function.js Outdated Show resolved Hide resolved
@rcebulko
Copy link
Contributor Author

Needs updates to handle ArrayPattern:

  • build-system/babel-plugins/babel-plugin-transform-default-assignment/index.js
  • build-system/eslint-rules/no-deep-destructuring.js
  • build-system/eslint-rules/prefer-destructuring.js
  • build-system/eslint-rules/unused-private-field.js

Can be removed:

  • build-system/babel-plugins/babel-plugin-transform-simple-array-destructure/index.js

I can't make heads or tails of a lot of this code. @samouri do you have insights here? Would be happy to pair-program but absolutely lost at first glance

@jridgewell
Copy link
Contributor

I can help later this week. Changes LGTM.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants