Skip to content

Commit

Permalink
feat(breaking): update dependencies (#688)
Browse files Browse the repository at this point in the history
Co-authored-by: Noemi Rozpara <[email protected]>
  • Loading branch information
zamotany and Noemi Rozpara authored Jan 21, 2020
1 parent a9d84cd commit d64efa4
Show file tree
Hide file tree
Showing 40 changed files with 2,830 additions and 2,359 deletions.
3 changes: 1 addition & 2 deletions .nycrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@
"sourceMap": false,
"instrument": false,
"all": true,
"extension": [".js", ".ts"],
"include": [
"packages/**"
"**/*"
],
"tempDir": ".coverage_output",
"branches": 60,
Expand Down
4 changes: 4 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
singleQuote: true,
trailingComma: "es5"
}
2 changes: 2 additions & 0 deletions babel.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ module.exports = {
'@babel/preset-typescript',
],
plugins: [
'@babel/plugin-proposal-optional-chaining',
'@babel/plugin-proposal-nullish-coalescing-operator',
'@babel/plugin-proposal-class-properties',
'@babel/plugin-transform-flow-strip-types',
'@babel/plugin-transform-react-jsx',
Expand Down
5 changes: 3 additions & 2 deletions e2e/react_native_windows_current/__tests__/size.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ createSizeTestSuite('react_native_windows_current', 'windows', {
min: 600,
// RNW current has chakra: true flag in babel.config.js, meaning additional (required) transforms
// are included, hence the bigger bundle size compared to iOS/Android.
maxIndexBundle: 950,
maxBaseBundle: 1145,
// TODO: invstigate why generated bundles are bigger
maxIndexBundle: 960, //950,
maxBaseBundle: 1155, //1145,
});
3 changes: 1 addition & 2 deletions fixtures/react_native_windows_e2e_app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
"version": "0.0.1",
"private": true,
"scripts": {
"postinstall": "patch-package",
"start": "../../packages/haul-cli/bin/haul start",
"test": "jest",
"build:bundle": "node ../../packages/haul-cli/bin/haul.js bundle --platform windows --dev true --bundle-output windows/RNWTestApp/Bundle/index.windows.bundle --assets-dest windows/RNWTestApp/Bundle",
Expand All @@ -20,7 +19,7 @@
"react": "16.10.1",
"react-apollo": "^3.1.1",
"react-native": "^0.60.0",
"react-native-windows": "0.60.0-vnext.16",
"react-native-windows": "0.60.0-vnext.115",
"rnpm-plugin-windows": "^0.3.5"
},
"devDependencies": {
Expand Down
14 changes: 10 additions & 4 deletions fixtures/react_native_windows_e2e_app/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3780,6 +3780,11 @@ envinfo@^7.1.0:
resolved "https://registry.yarnpkg.com/envinfo/-/envinfo-7.4.0.tgz#bef4ece9e717423aaf0c3584651430b735ad6630"
integrity sha512-FdDfnWnCVjxTTpWE3d6Jgh5JDIA3Cw7LCgpM/pI7kK1ORkjaqI2r6NqQ+ln2j0dfpgxY00AWieSvtkiZQKIItA==

envinfo@^7.5.0:
version "7.5.0"
resolved "https://registry.yarnpkg.com/envinfo/-/envinfo-7.5.0.tgz#91410bb6db262fb4f1409bd506e9ff57e91023f4"
integrity sha512-jDgnJaF/Btomk+m3PZDTTCb5XIIIX3zYItnCRfF73zVgvinLoRomuhi75Y4su0PtQxWz4v66XnLLckyvyJTOIQ==

error-ex@^1.2.0, error-ex@^1.3.1:
version "1.3.2"
resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.2.tgz#b4ac40648107fdcdcfae242f428bea8a14d4f1bf"
Expand Down Expand Up @@ -7651,15 +7656,16 @@ react-is@^16.7.0, react-is@^16.8.1, react-is@^16.8.4:
resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.10.1.tgz#0612786bf19df406502d935494f0450b40b8294f"
integrity sha512-BXUMf9sIOPXXZWqr7+c5SeOKJykyVr2u0UDzEf4LNGc6taGkQe1A9DFD07umCIXz45RLr9oAAwZbAJ0Pkknfaw==

[email protected].16:
version "0.60.0-vnext.16"
resolved "https://registry.yarnpkg.com/react-native-windows/-/react-native-windows-0.60.0-vnext.16.tgz#51bc97ae5d332ed95ba3611ede4c8533bcea6321"
integrity sha512-Mn0er2zbjoDDOGN9mylEPC7U/H4fDqDH0MeXwZwp2Rrh2ibH5DYr8rtvGls1FgYshfXIqn6KpiGyg2O8zkm88A==
[email protected].115:
version "0.60.0-vnext.115"
resolved "https://registry.yarnpkg.com/react-native-windows/-/react-native-windows-0.60.0-vnext.115.tgz#7e21b4f5e8a2f1467042867e3c01eeb0be6eaaa7"
integrity sha512-M/TmmUYdXJX2Qkw7x6lY14L/EOy+2lZolvoRbbgclzTZ2jv2lot+AgpbzqVreu2iFabPzEslVmZgbkX58covTA==
dependencies:
"@babel/runtime" "^7.4.0"
"@react-native-community/cli" "^2.6.0"
cli-spinners "^2.2.0"
create-react-class "^15.6.3"
envinfo "^7.5.0"
fbjs "^1.0.0"
glob "^7.1.1"
ora "^3.4.0"
Expand Down
102 changes: 51 additions & 51 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,82 +18,82 @@
"release": "NODE_ENV=production yarn prepare && lerna publish --ignore-prepublish --ignore-scripts --sign-git-commit"
},
"dependencies": {
"chalk": "^2.4.2",
"concurrently": "^5.0.0",
"chalk": "^3.0.0",
"concurrently": "^5.0.2",
"escape-string-regexp": "^2.0.0",
"execa": "^3.2.0",
"glob": "^7.1.5",
"lerna": "^3.16.4",
"execa": "^4.0.0",
"glob": "^7.1.6",
"lerna": "^3.20.2",
"mkdirp": "^0.5.1",
"node-fetch": "^2.6.0",
"nyc": "^14.1.1",
"rimraf": "^2.6.3",
"strip-ansi": "^5.2.0",
"nyc": "^15.0.0",
"rimraf": "^3.0.0",
"strip-ansi": "^6.0.0",
"traverse": "^0.6.6"
},
"devDependencies": {
"@babel/cli": "^7.4.3",
"@babel/core": "^7.4.3",
"@babel/plugin-proposal-class-properties": "^7.4.0",
"@babel/plugin-transform-flow-strip-types": "^7.4.0",
"@babel/plugin-transform-react-jsx": "^7.3.0",
"@babel/preset-env": "^7.4.3",
"@babel/preset-typescript": "^7.3.3",
"@callstack/eslint-config": "^7.0.0",
"@haul-bundler/babel-preset-react-native": "^0.14.0",
"@haul-bundler/cli": "^0.14.0",
"@haul-bundler/core": "^0.14.0",
"@types/babel__core": "^7.1.2",
"@types/case-sensitive-paths-webpack-plugin": "^2.1.3",
"@types/cpx": "^1.5.0",
"@babel/cli": "^7.7.7",
"@babel/core": "^7.7.7",
"@babel/plugin-proposal-class-properties": "^7.7.4",
"@babel/plugin-proposal-nullish-coalescing-operator": "^7.7.4",
"@babel/plugin-proposal-optional-chaining": "^7.7.5",
"@babel/plugin-transform-flow-strip-types": "^7.7.4",
"@babel/plugin-transform-react-jsx": "^7.7.7",
"@babel/preset-env": "^7.7.7",
"@babel/preset-typescript": "^7.7.7",
"@callstack/eslint-config": "^9.1.0",
"@haul-bundler/babel-preset-react-native": "^0.15.0",
"@haul-bundler/cli": "^0.15.0",
"@haul-bundler/core": "^0.15.0",
"@types/babel__core": "^7.1.3",
"@types/case-sensitive-paths-webpack-plugin": "^2.1.4",
"@types/cpx": "^1.5.1",
"@types/dedent": "^0.7.0",
"@types/del": "^4.0.0",
"@types/hapi__boom": "^7.4.0",
"@types/hapi__hapi": "^18.2.5",
"@types/hapi__boom": "^7.4.1",
"@types/hapi__hapi": "^18.2.6",
"@types/hapi__inert": "^5.2.0",
"@types/hapi__joi": "^15.0.3",
"@types/image-size": "^0.7.0",
"@types/hapi__joi": "^16.0.6",
"@types/inquirer": "^6.5.0",
"@types/is-ci": "^2.0.0",
"@types/jest": "^24.0.17",
"@types/jest": "^24.0.25",
"@types/loader-utils": "^1.1.3",
"@types/lodash.get": "^4.4.6",
"@types/lodash.merge": "^4.6.6",
"@types/lodash.throttle": "^4.1.6",
"@types/mkdirp": "^0.5.2",
"@types/node": "^10.14.15",
"@types/node-fetch": "^2.5.0",
"@types/node": "^10.17.13",
"@types/node-fetch": "^2.5.4",
"@types/npm-registry-fetch": "^4.0.1",
"@types/resolve": "^0.0.8",
"@types/rimraf": "^2.0.2",
"@types/semver": "^6.0.1",
"@types/resolve": "^1.14.0",
"@types/rimraf": "^2.0.3",
"@types/semver": "^6.2.0",
"@types/strip-ansi": "^5.2.1",
"@types/terminal-kit": "^1.28.0",
"@types/terser-webpack-plugin": "^1.2.1",
"@types/webpack": "^4.32.1",
"@types/terser-webpack-plugin": "^2.2.0",
"@types/webpack": "^4.41.2",
"@types/webpack-sources": "^0.1.5",
"@types/which": "^1.3.1",
"@types/which": "^1.3.2",
"@types/wrap-ansi": "^3.0.0",
"@types/ws": "^6.0.2",
"@types/yargs": "^13.0.2",
"@typescript-eslint/eslint-plugin": "^1.13.0",
"@typescript-eslint/parser": "^1.13.0",
"babel-eslint": "^10.0.2",
"babel-jest": "^24.8.0",
"babel-loader": "^8.0.5",
"babel-plugin-istanbul": "^5.2.0",
"codecov": "^3.5.0",
"@types/ws": "^6.0.4",
"@types/yargs": "^15.0.0",
"@typescript-eslint/eslint-plugin": "^2.15.0",
"@typescript-eslint/parser": "^2.15.0",
"babel-eslint": "^10.0.3",
"babel-jest": "^24.9.0",
"babel-loader": "^8.0.6",
"babel-plugin-istanbul": "^6.0.0",
"dedent": "^0.7.0",
"del": "^5.1.0",
"eslint": "^6.1.0",
"jest": "^24.8.0",
"metro": "^0.56.0",
"eslint": "^6.8.0",
"jest": "^24.9.0",
"metro": "^0.56.4",
"react-native": "0.60.0",
"snapshot-diff": "^0.5.2",
"snapshot-diff": "^0.6.1",
"source-map": "^0.7.3",
"terser": "^4.1.3",
"typescript": "^3.5.3",
"webpack": "^4.39.1",
"terser": "^4.6.2",
"typescript": "^3.7.4",
"webpack": "^4.41.5",
"webpack-sources": "^1.4.3"
}
}
50 changes: 25 additions & 25 deletions packages/haul-babel-preset-react-native/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,31 +18,31 @@
"@babel/core": "^7.4.5"
},
"dependencies": {
"@babel/plugin-proposal-class-properties": "^7.4.4",
"@babel/plugin-proposal-export-default-from": "^7.2.0",
"@babel/plugin-proposal-nullish-coalescing-operator": "^7.4.4",
"@babel/plugin-proposal-object-rest-spread": "^7.6.2",
"@babel/plugin-proposal-optional-catch-binding": "^7.2.0",
"@babel/plugin-proposal-optional-chaining": "^7.2.0",
"@babel/plugin-syntax-dynamic-import": "^7.2.0",
"@babel/plugin-syntax-export-default-from": "^7.2.0",
"@babel/plugin-transform-async-to-generator": "^7.4.4",
"@babel/plugin-transform-classes": "^7.0.0",
"@babel/plugin-transform-exponentiation-operator": "^7.2.0",
"@babel/plugin-transform-flow-strip-types": "^7.4.4",
"@babel/plugin-transform-literals": "^7.2.0",
"@babel/plugin-transform-modules-commonjs": "^7.4.4",
"@babel/plugin-transform-react-display-name": "^7.2.0",
"@babel/plugin-transform-react-jsx": "^7.3.0",
"@babel/plugin-transform-react-jsx-source": "^7.2.0",
"@babel/plugin-transform-shorthand-properties": "^7.0.0",
"@babel/plugin-transform-spread": "^7.6.2",
"@babel/plugin-transform-sticky-regex": "^7.2.0",
"@babel/plugin-transform-template-literals": "^7.0.0",
"@babel/plugin-transform-typescript": "^7.4.4",
"@babel/plugin-transform-unicode-regex": "^7.4.4",
"@babel/template": "^7.4.4",
"metro-react-native-babel-preset": "^0.54.0"
"@babel/plugin-proposal-class-properties": "^7.7.4",
"@babel/plugin-proposal-export-default-from": "^7.7.4",
"@babel/plugin-proposal-nullish-coalescing-operator": "^7.7.4",
"@babel/plugin-proposal-object-rest-spread": "^7.7.7",
"@babel/plugin-proposal-optional-catch-binding": "^7.7.4",
"@babel/plugin-proposal-optional-chaining": "^7.7.5",
"@babel/plugin-syntax-dynamic-import": "^7.7.4",
"@babel/plugin-syntax-export-default-from": "^7.7.4",
"@babel/plugin-transform-async-to-generator": "^7.7.4",
"@babel/plugin-transform-classes": "^7.7.4",
"@babel/plugin-transform-exponentiation-operator": "^7.7.4",
"@babel/plugin-transform-flow-strip-types": "^7.7.4",
"@babel/plugin-transform-literals": "^7.7.4",
"@babel/plugin-transform-modules-commonjs": "^7.7.5",
"@babel/plugin-transform-react-display-name": "^7.7.4",
"@babel/plugin-transform-react-jsx": "^7.7.7",
"@babel/plugin-transform-react-jsx-source": "^7.7.4",
"@babel/plugin-transform-shorthand-properties": "^7.7.4",
"@babel/plugin-transform-spread": "^7.7.4",
"@babel/plugin-transform-sticky-regex": "^7.7.4",
"@babel/plugin-transform-template-literals": "^7.7.4",
"@babel/plugin-transform-typescript": "^7.7.4",
"@babel/plugin-transform-unicode-regex": "^7.7.4",
"@babel/template": "^7.7.4",
"metro-react-native-babel-preset": "0.56.4"
},
"gitHead": "c41becc82dfeafb07b642ebed8f082775647ec3f"
}
Original file line number Diff line number Diff line change
Expand Up @@ -51,17 +51,18 @@ export default function superMemberArrowFunction() {
) as babel.NodePath<babel.types.Class>;

if (
parentClass &&
parentClass.node.superClass &&
parentClass?.node.superClass &&
babel.types.isIdentifier(parentClass.node.superClass)
) {
path.parentPath.parentPath.replaceWith(template({
SUPER: parentClass.node.superClass,
METHOD: (path.parent as babel.types.MemberExpression)
.property,
ARGS: (path.parentPath.parent as babel.types.CallExpression)
.arguments,
}) as any);
path.parentPath.parentPath.replaceWith(
template({
SUPER: parentClass.node.superClass,
METHOD: (path.parent as babel.types.MemberExpression)
.property,
ARGS: (path.parentPath.parent as babel.types.CallExpression)
.arguments,
}) as any
);
}
}
},
Expand Down
16 changes: 8 additions & 8 deletions packages/haul-cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,16 @@
"ansi-fragments": "^0.2.1",
"cpx": "^1.5.0",
"dedent": "^0.7.0",
"execa": "^2.0.3",
"inquirer": "^6.5.0",
"execa": "^4.0.0",
"inquirer": "^7.0.3",
"mkdirp": "^0.5.1",
"npm-registry-fetch": "^5.0.0",
"ora": "^3.4.0",
"npm-registry-fetch": "^6.0.0",
"ora": "^4.0.3",
"simple-progress-webpack-plugin": "^1.1.2",
"which": "1.3.1",
"ws": "^6.2.1",
"yargs": "^13.3.0",
"yargs-parser": "^13.1.1"
"which": "2.0.2",
"ws": "^7.2.1",
"yargs": "^15.1.0",
"yargs-parser": "^16.1.0"
},
"gitHead": "c41becc82dfeafb07b642ebed8f082775647ec3f"
}
2 changes: 1 addition & 1 deletion packages/haul-cli/src/commands/bundle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ export default function ramBundleCommand(runtime: Runtime) {
stats,
platform,
assetsPath: webpackConfig.output!.path,
bundlePath: webpackConfig.output!.filename,
bundlePath: webpackConfig.output!.filename as string,
});
runtime.complete();
} catch (error) {
Expand Down
8 changes: 5 additions & 3 deletions packages/haul-cli/src/commands/multiBundle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -212,9 +212,11 @@ export default function multiBundleCommand(runtime: Runtime) {

// Attach progress plugin
if (progress !== 'none') {
webpackConfig.plugins!.push(new SimpleProgressWebpackPlugin({
format: progress,
}) as webpack.Plugin);
webpackConfig.plugins!.push(
new SimpleProgressWebpackPlugin({
format: progress,
}) as webpack.Plugin
);
}

messages.initialBundleInformation(runtime, {
Expand Down
2 changes: 1 addition & 1 deletion packages/haul-cli/src/commands/ramBundle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ export default function ramBundleCommand(runtime: Runtime) {
stats,
platform,
assetsPath: webpackConfig.output!.path,
bundlePath: webpackConfig.output!.filename,
bundlePath: webpackConfig.output!.filename as string,
});
runtime.complete();
} catch (error) {
Expand Down
8 changes: 5 additions & 3 deletions packages/haul-cli/src/commands/shared/prepareWebpackConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,11 @@ export default function prepareWebpackConfig(

// Attach progress plugin
if (options.progress !== 'none') {
webpackConfig.plugins!.push(new SimpleProgressWebpackPlugin({
format: options.progress,
}) as webpack.Plugin);
webpackConfig.plugins!.push(
new SimpleProgressWebpackPlugin({
format: options.progress,
}) as webpack.Plugin
);
}

return webpackConfig;
Expand Down
2 changes: 1 addition & 1 deletion packages/haul-cli/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ export default async function main() {
const results = commandModule.handler(...args) as
| undefined
| Promise<unknown>;
if (results && results.catch) {
if (results?.catch) {
results.catch(error => {
runtime.unhandledError(error);
runtime.complete(1);
Expand Down
2 changes: 1 addition & 1 deletion packages/haul-cli/src/messages/bundleMessages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export function initialInformation(
runtime.logger.info(
`Bundle output (resolved): ${runtime.logger.enhanceWithColor(
'gray',
path.resolve(config.output!.filename!)
path.resolve(config.output!.filename! as string)
)}`
);
}
Expand Down
Loading

0 comments on commit d64efa4

Please sign in to comment.