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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(versioning): remove object rest spread in v59 (BREAKING CHANGE) #3592

Closed

Conversation

nolanlawson
Copy link
Contributor

Details

Fixes #3577

Removes the object rest spread Babel transformation when the API version is >=58.

Does this pull request introduce a breaking change?

  • 馃毃 Yes, it does introduce a breaking change.

In a sense, yes, it is breaking, because it is observable. See #3577

Does this pull request introduce an observable change?

  • 鈿狅笍 Yes, it does include an observable change.

GUS work item

W-13653003

@nolanlawson nolanlawson requested a review from a team as a code owner June 23, 2023 23:03
@nolanlawson
Copy link
Contributor Author

This change also technically relies on #2948 because we need to drop IE11 support.

@nolanlawson
Copy link
Contributor Author

nolanlawson commented Jun 23, 2023

Merged with #2948 just to see if the CI tests pass.

Un-merged.

@nolanlawson nolanlawson added this to the 3.0.0 milestone Jun 23, 2023
package.json Outdated
Comment on lines 33 to 35
"@babel/core": "^7.22.5",
"@babel/helper-explode-assignable-expression": "^7.18.6",
"@babel/preset-env": "^7.22.5",
Copy link
Contributor

Choose a reason for hiding this comment

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

Are these unused? Wasn't sure how it is related to this PR.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sorry, I made things confusing by merging this PR with #2948. I've removed those unrelated changes.

Copy link
Contributor

@ravijayaramappa ravijayaramappa left a comment

Choose a reason for hiding this comment

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

the object spread related changes LGTM

version: '11',
label: 'sl_edge_compat',
browserName: 'MicrosoftEdge',
version: '18',
compat: true,
Copy link
Contributor

Choose a reason for hiding this comment

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

Is compat field needed now?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

See #2948. Yes, because I'm still using "compat" to test legacy browsers in Karma. (I.e. changing the meaning of "compat" for those tests.)

@nolanlawson
Copy link
Contributor Author

OK, apparently Edge 18 does not support object rest spread.

expect(code).not.toContain('...a');
} else {
expect(code).toContain('...a');
}
Copy link
Contributor

Choose a reason for hiding this comment

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

This test looks a little clunky. Will additional versions be added to the [58, 59] array above?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No, testing 58 vs 59 will be sufficient forever.


if (process.env.API_VERSION <= 58) {
// babel polyfill format
expect(test.toString()).not.toContain('...');
Copy link
Contributor

Choose a reason for hiding this comment

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

This is a clever way to test this, without requiring access to the raw compiled asset itself.

@nolanlawson
Copy link
Contributor Author

I don't think we can do this in 246 due to the Edge issue.

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

Successfully merging this pull request may close these issues.

None yet

3 participants