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

Bump @babel/preset-env to 7.8.3 (Optional Chaining!) #19831

Merged
merged 6 commits into from
Jan 24, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2,146 changes: 1,031 additions & 1,115 deletions package-lock.json

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,10 @@
"devDependencies": {
"@actions/core": "1.0.0",
"@actions/github": "1.0.0",
"@babel/core": "7.4.5",
"@babel/plugin-syntax-jsx": "7.2.0",
"@babel/runtime-corejs3": "7.4.5",
"@babel/traverse": "7.4.5",
"@babel/core": "7.8.3",
"@babel/plugin-syntax-jsx": "7.8.3",
"@babel/runtime-corejs3": "7.8.3",
"@babel/traverse": "7.8.3",
"@octokit/rest": "16.26.0",
"@storybook/addon-a11y": "5.3.2",
"@storybook/addon-docs": "5.3.2",
Expand Down Expand Up @@ -106,7 +106,7 @@
"@wordpress/postcss-themes": "file:packages/postcss-themes",
"@wordpress/scripts": "file:packages/scripts",
"babel-loader": "8.0.6",
"babel-plugin-emotion": "10.0.23",
"babel-plugin-emotion": "10.0.27",
"babel-plugin-inline-json-import": "0.3.2",
"babel-plugin-react-native-classname-to-style": "1.2.2",
"babel-plugin-react-native-platform-specific-extensions": "1.1.1",
Expand Down
2 changes: 1 addition & 1 deletion packages/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ When creating a new package, you need to provide at least the following:
"module": "build-module/index.js",
"react-native": "src/index",
"dependencies": {
"@babel/runtime": "^7.4.4"
"@babel/runtime": "^7.8.3"
},
"publishConfig": {
"access": "public"
Expand Down
2 changes: 1 addition & 1 deletion packages/a11y/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"module": "build-module/index.js",
"react-native": "src/index",
"dependencies": {
"@babel/runtime": "^7.4.4",
"@babel/runtime": "^7.8.3",
"@wordpress/dom-ready": "file:../dom-ready"
},
"publishConfig": {
Expand Down
2 changes: 1 addition & 1 deletion packages/annotations/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"module": "build-module/index.js",
"react-native": "src/index",
"dependencies": {
"@babel/runtime": "^7.4.4",
"@babel/runtime": "^7.8.3",
"@wordpress/data": "file:../data",
"@wordpress/hooks": "file:../hooks",
"@wordpress/i18n": "file:../i18n",
Expand Down
2 changes: 1 addition & 1 deletion packages/api-fetch/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"module": "build-module/index.js",
"react-native": "src/index",
"dependencies": {
"@babel/runtime": "^7.4.4",
"@babel/runtime": "^7.8.3",
"@wordpress/i18n": "file:../i18n",
"@wordpress/url": "file:../url"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/autop/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"react-native": "src/index",
"sideEffects": false,
"dependencies": {
"@babel/runtime": "^7.4.4"
"@babel/runtime": "^7.8.3"
},
"publishConfig": {
"access": "public"
Expand Down
2 changes: 1 addition & 1 deletion packages/babel-plugin-makepot/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"main": "build/index.js",
"module": "build-module/index.js",
"dependencies": {
"@babel/runtime": "^7.4.4",
"@babel/runtime": "^7.8.3",
"gettext-parser": "^1.3.1",
"lodash": "^4.17.15"
},
Expand Down
6 changes: 6 additions & 0 deletions packages/babel-preset-default/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## Master

### New Feature

- The bundled `@babel/core` dependency has been updated from requiring `^7.4.4` to requiring `^7.8.3`. All other Babel plugins were updated to the latest version. `@babel/preset-env` has now ESMAScript 2020 support enabled by default (see [Highlights](https://babeljs.io/blog/2020/01/11/7.8.0#highlights)).

## 4.5.0 (2019-08-29)

### Bug Fixes
Expand Down
14 changes: 7 additions & 7 deletions packages/babel-preset-default/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,13 @@
],
"main": "index.js",
"dependencies": {
"@babel/core": "^7.4.5",
"@babel/plugin-proposal-async-generator-functions": "^7.2.0",
"@babel/plugin-proposal-object-rest-spread": "^7.4.4",
"@babel/plugin-transform-react-jsx": "^7.3.0",
"@babel/plugin-transform-runtime": "^7.4.4",
"@babel/preset-env": "^7.4.5",
"@babel/runtime": "^7.4.5",
"@babel/core": "^7.8.3",
"@babel/plugin-proposal-async-generator-functions": "^7.8.3",
"@babel/plugin-proposal-object-rest-spread": "^7.8.3",
"@babel/plugin-transform-react-jsx": "^7.8.3",
"@babel/plugin-transform-runtime": "^7.8.3",
"@babel/preset-env": "^7.8.3",
"@babel/runtime": "^7.8.3",
"@wordpress/babel-plugin-import-jsx-pragma": "file:../babel-plugin-import-jsx-pragma",
"@wordpress/browserslist-config": "file:../browserslist-config",
"@wordpress/element": "file:../element",
Expand Down
11 changes: 11 additions & 0 deletions packages/babel-preset-default/test/__snapshots__/index.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -65,5 +65,16 @@ describe('Babel preset default', function () {
}
}, _callee2);
})));
test('support for optional chaining', function () {
var _obj$foo, _obj$foo2;

var obj = {
foo: {
bar: 42
}
};
expect(obj === null || obj === void 0 ? void 0 : (_obj$foo = obj.foo) === null || _obj$foo === void 0 ? void 0 : _obj$foo.bar).toEqual(42);
expect(obj === null || obj === void 0 ? void 0 : (_obj$foo2 = obj.foo) === null || _obj$foo2 === void 0 ? void 0 : _obj$foo2.baz).toEqual(undefined);
});
});"
`;
11 changes: 11 additions & 0 deletions packages/babel-preset-default/test/fixtures/input.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,15 @@ describe( 'Babel preset default', () => {
value: 2,
} );
} );

test( 'support for optional chaining', () => {
const obj = {
foo: {
bar: 42,
},
};

expect( obj?.foo?.bar ).toEqual( 42 );
expect( obj?.foo?.baz ).toEqual( undefined );
} );
} );
2 changes: 1 addition & 1 deletion packages/blob/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"react-native": "src/index",
"sideEffects": false,
"dependencies": {
"@babel/runtime": "^7.4.4"
"@babel/runtime": "^7.8.3"
},
"publishConfig": {
"access": "public"
Expand Down
2 changes: 1 addition & 1 deletion packages/block-editor/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"module": "build-module/index.js",
"react-native": "src/index",
"dependencies": {
"@babel/runtime": "^7.4.4",
"@babel/runtime": "^7.8.3",
"@wordpress/a11y": "file:../a11y",
"@wordpress/blob": "file:../blob",
"@wordpress/blocks": "file:../blocks",
Expand Down
2 changes: 1 addition & 1 deletion packages/block-library/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"build-style/**"
],
"dependencies": {
"@babel/runtime": "^7.4.4",
"@babel/runtime": "^7.8.3",
"@wordpress/a11y": "file:../a11y",
"@wordpress/api-fetch": "file:../api-fetch",
"@wordpress/autop": "file:../autop",
Expand Down
94 changes: 47 additions & 47 deletions packages/block-library/src/gallery/gallery-image.native.js
Original file line number Diff line number Diff line change
Expand Up @@ -196,57 +196,57 @@ class GalleryImage extends Component {
) }
<View style={ overlayStyle }>
{ ! isUploadInProgress && (
<>
{ isSelected && (
<View style={ style.toolbar }>
<View style={ style.moverButtonContainer } >
<>
{ isSelected && (
<View style={ style.toolbar }>
<View style={ style.moverButtonContainer } >
<Button
style={ buttonStyle }
icon="arrow-left-alt"
iconSize={ ICON_SIZE_ARROW }
onClick={ isFirstItem ? undefined : onMoveBackward }
accessibilityLabel={ __( 'Move Image Backward' ) }
aria-disabled={ isFirstItem }
disabled={ ! isSelected }
/>
<View style={ separatorStyle }></View>
<Button
style={ buttonStyle }
icon="arrow-right-alt"
iconSize={ ICON_SIZE_ARROW }
onClick={ isLastItem ? undefined : onMoveForward }
accessibilityLabel={ __( 'Move Image Forward' ) }
aria-disabled={ isLastItem }
disabled={ ! isSelected }
/>
</View>
<Button
style={ buttonStyle }
icon="arrow-left-alt"
iconSize={ ICON_SIZE_ARROW }
onClick={ isFirstItem ? undefined : onMoveBackward }
accessibilityLabel={ __( 'Move Image Backward' ) }
aria-disabled={ isFirstItem }
disabled={ ! isSelected }
/>
<View style={ separatorStyle }></View>
<Button
style={ buttonStyle }
icon="arrow-right-alt"
iconSize={ ICON_SIZE_ARROW }
onClick={ isLastItem ? undefined : onMoveForward }
accessibilityLabel={ __( 'Move Image Forward' ) }
aria-disabled={ isLastItem }
style={ removeButtonStyle }
icon="no-alt"
iconSize={ ICON_SIZE_REMOVE }
onClick={ onRemove }
accessibilityLabel={ __( 'Remove Image' ) }
disabled={ ! isSelected }
/>
</View>
<Button
style={ removeButtonStyle }
icon="no-alt"
iconSize={ ICON_SIZE_REMOVE }
onClick={ onRemove }
accessibilityLabel={ __( 'Remove Image' ) }
disabled={ ! isSelected }
/>
</View>
) }
{ ( shouldShowCaptionEditable || shouldShowCaptionExpanded ) && (
<View style={ captionContainerStyle }>
<ScrollView nestedScrollEnabled keyboardShouldPersistTaps="handled">
<Caption
inlineToolbar
isSelected={ captionSelected }
onChange={ this.onCaptionChange }
onFocus={ this.onSelectCaption }
placeholder={ isSelected ? __( 'Write caption…' ) : null }
placeholderTextColor={ captionPlaceholderStyle.color }
style={ captionStyle }
value={ caption }
/>
</ScrollView>
</View>
) }
</>
) }
{ ( shouldShowCaptionEditable || shouldShowCaptionExpanded ) && (
<View style={ captionContainerStyle }>
<ScrollView nestedScrollEnabled keyboardShouldPersistTaps="handled">
<Caption
inlineToolbar
isSelected={ captionSelected }
onChange={ this.onCaptionChange }
onFocus={ this.onSelectCaption }
placeholder={ isSelected ? __( 'Write caption…' ) : null }
placeholderTextColor={ captionPlaceholderStyle.color }
style={ captionStyle }
value={ caption }
/>
</ScrollView>
</View>
) }
</>
) }
</View>
</>
Expand Down
2 changes: 1 addition & 1 deletion packages/block-serialization-default-parser/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"react-native": "src/index",
"sideEffects": false,
"dependencies": {
"@babel/runtime": "^7.4.4"
"@babel/runtime": "^7.8.3"
},
"publishConfig": {
"access": "public"
Expand Down
2 changes: 1 addition & 1 deletion packages/blocks/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"module": "build-module/index.js",
"react-native": "src/index",
"dependencies": {
"@babel/runtime": "^7.4.4",
"@babel/runtime": "^7.8.3",
"@wordpress/autop": "file:../autop",
"@wordpress/blob": "file:../blob",
"@wordpress/block-serialization-default-parser": "file:../block-serialization-default-parser",
Expand Down
2 changes: 1 addition & 1 deletion packages/components/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"build-style/**"
],
"dependencies": {
"@babel/runtime": "^7.4.4",
"@babel/runtime": "^7.8.3",
"@emotion/core": "^10.0.22",
"@emotion/css": "^10.0.22",
"@emotion/native": "^10.0.22",
Expand Down
2 changes: 1 addition & 1 deletion packages/compose/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"react-native": "src/index",
"sideEffects": false,
"dependencies": {
"@babel/runtime": "^7.4.4",
"@babel/runtime": "^7.8.3",
"@wordpress/element": "file:../element",
"@wordpress/is-shallow-equal": "file:../is-shallow-equal",
"lodash": "^4.17.15",
Expand Down
2 changes: 1 addition & 1 deletion packages/core-data/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"module": "build-module/index.js",
"react-native": "src/index",
"dependencies": {
"@babel/runtime": "^7.4.4",
"@babel/runtime": "^7.8.3",
"@wordpress/api-fetch": "file:../api-fetch",
"@wordpress/blocks": "file:../blocks",
"@wordpress/data": "file:../data",
Expand Down
2 changes: 1 addition & 1 deletion packages/data/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"module": "build-module/index.js",
"react-native": "src/index",
"dependencies": {
"@babel/runtime": "^7.4.4",
"@babel/runtime": "^7.8.3",
"@wordpress/compose": "file:../compose",
"@wordpress/deprecated": "file:../deprecated",
"@wordpress/element": "file:../element",
Expand Down
2 changes: 1 addition & 1 deletion packages/date/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"module": "build-module/index.js",
"react-native": "src/index",
"dependencies": {
"@babel/runtime": "^7.4.4",
"@babel/runtime": "^7.8.3",
"moment": "^2.22.1",
"moment-timezone": "^0.5.16"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/deprecated/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"react-native": "src/index",
"sideEffects": false,
"dependencies": {
"@babel/runtime": "^7.4.4",
"@babel/runtime": "^7.8.3",
"@wordpress/hooks": "file:../hooks"
},
"publishConfig": {
Expand Down
2 changes: 1 addition & 1 deletion packages/dom-ready/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"react-native": "src/index",
"sideEffects": false,
"dependencies": {
"@babel/runtime": "^7.4.4"
"@babel/runtime": "^7.8.3"
},
"publishConfig": {
"access": "public"
Expand Down
2 changes: 1 addition & 1 deletion packages/dom/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"react-native": "src/index",
"sideEffects": false,
"dependencies": {
"@babel/runtime": "^7.4.4",
"@babel/runtime": "^7.8.3",
"lodash": "^4.17.15"
},
"publishConfig": {
Expand Down
2 changes: 1 addition & 1 deletion packages/e2e-test-utils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"main": "build/index.js",
"module": "build-module/index.js",
"dependencies": {
"@babel/runtime": "^7.4.4",
"@babel/runtime": "^7.8.3",
"@wordpress/keycodes": "file:../keycodes",
"@wordpress/url": "file:../url",
"lodash": "^4.17.15",
Expand Down
2 changes: 1 addition & 1 deletion packages/edit-post/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"module": "build-module/index.js",
"react-native": "src/index",
"dependencies": {
"@babel/runtime": "^7.4.4",
"@babel/runtime": "^7.8.3",
"@wordpress/a11y": "file:../a11y",
"@wordpress/api-fetch": "file:../api-fetch",
"@wordpress/block-editor": "file:../block-editor",
Expand Down
2 changes: 1 addition & 1 deletion packages/edit-site/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"module": "build-module/index.js",
"react-native": "src/index",
"dependencies": {
"@babel/runtime": "^7.4.4",
"@babel/runtime": "^7.8.3",
"@wordpress/block-editor": "file:../block-editor",
"@wordpress/block-library": "file:../block-library",
"@wordpress/blocks": "file:../blocks",
Expand Down
2 changes: 1 addition & 1 deletion packages/edit-widgets/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"module": "build-module/index.js",
"react-native": "src/index",
"dependencies": {
"@babel/runtime": "^7.4.4",
"@babel/runtime": "^7.8.3",
"@wordpress/block-editor": "file:../block-editor",
"@wordpress/block-library": "file:../block-library",
"@wordpress/blocks": "file:../blocks",
Expand Down
Loading