Skip to content

chore: update dependencies #625

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

Merged
merged 5 commits into from
Aug 9, 2019
Merged
Show file tree
Hide file tree
Changes from 3 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
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ function assertBundles(
} else {
expect(bundles.app1).toMatch('function asyncEval');
expect(bundles.app1).toMatch(
/return asyncEval\("" \+ chunkId \+ "\.app1\.(ios|android)\.bundle"\);/g
/return asyncEval\(__webpack_require__\.p \+ "" \+ chunkId \+ "\.app1\.(ios|android)\.bundle"\);/g
);

expect(bundles.app1Chunk).toMatch('this["webpackChunkapp1"]');
Expand Down
26 changes: 13 additions & 13 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
"dependencies": {
"chalk": "^2.4.2",
"escape-string-regexp": "^2.0.0",
"lerna": "^3.15.0",
"lerna": "^3.16.4",
"mkdirp": "^0.5.1",
"node-fetch": "^2.3.0",
"node-fetch": "^2.6.0",
"rimraf": "^2.6.3",
"strip-ansi": "^5.2.0",
"traverse": "^0.6.6"
Expand All @@ -31,18 +31,18 @@
"@babel/plugin-transform-react-jsx": "^7.3.0",
"@babel/preset-env": "^7.4.3",
"@babel/preset-typescript": "^7.3.3",
"@callstack/eslint-config": "^4.2.0",
"@types/jest": "^24.0.11",
"@types/webpack": "^4.4.29",
"@callstack/eslint-config": "^7.0.0",
"@types/jest": "^24.0.17",
"@types/mkdirp": "^0.5.2",
"@types/node": "^11.13.4",
"@types/node": "^12.7.0",
"@types/rimraf": "^2.0.2",
"@typescript-eslint/eslint-plugin": "^1.6.0",
"@typescript-eslint/parser": "^1.6.0",
"babel-eslint": "^10.0.1",
"babel-jest": "^24.7.1",
"eslint": "^5.16.0",
"jest": "^24.7.1",
"typescript": "^3.4.3"
"@types/webpack": "^4.32.1",
"@typescript-eslint/eslint-plugin": "^1.13.0",
"@typescript-eslint/parser": "^1.13.0",
"babel-eslint": "^10.0.2",
"babel-jest": "^24.8.0",
"eslint": "^6.1.0",
"jest": "^24.8.0",
"typescript": "^3.5.3"
}
}
8 changes: 4 additions & 4 deletions packages/haul-basic-bundle-webpack-plugin/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@
"license": "MIT",
"bugs": "https://github.com/callstack/haul/issues",
"peerDependencies": {
"webpack": "^4.30.0",
"webpack-sources": "^1.3.0"
"webpack": "4.x",
"webpack-sources": "1.x"
},
"dependencies": {
"concat-with-sourcemaps": "^1.1.0"
},
"devDependencies": {
"@types/webpack-sources": "^0.1.5",
"webpack": "^4.30.0",
"webpack-sources": "^1.3.0"
"webpack": "^4.39.1",
"webpack-sources": "^1.4.3"
}
}
18 changes: 9 additions & 9 deletions packages/haul-cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
"license": "MIT",
"bugs": "https://github.com/callstack/haul/issues",
"peerDependencies": {
"react-native": "^0.59.0",
"webpack": "^4.30.0"
"react-native": ">=0.59.0",
"webpack": "4.x"
},
"dependencies": {
"@haul-bundler/core": "^0.10.0",
Expand All @@ -28,20 +28,20 @@
"ansi-fragments": "^0.2.1",
"dedent": "^0.7.0",
"execa": "^2.0.3",
"inquirer": "^6.3.1",
"inquirer": "^6.5.0",
"ora": "^3.4.0",
"simple-progress-webpack-plugin": "^1.1.2",
"which": "1.3.1",
"ws": "^6.2.1",
"yargs": "^13.2.2",
"yargs-parser": "^13.1.0"
"yargs": "^13.3.0",
"yargs-parser": "^13.1.1"
},
"devDependencies": {
"@types/dedent": "^0.7.0",
"@types/inquirer": "^6.0.1",
"@types/inquirer": "^6.5.0",
"@types/which": "^1.3.1",
"@types/ws": "^6.0.1",
"@types/yargs": "^13.0.0",
"webpack": "^4.30.0"
"@types/ws": "^6.0.2",
"@types/yargs": "^13.0.2",
"webpack": "^4.39.1"
}
}
4 changes: 3 additions & 1 deletion packages/haul-cli/src/commands/multiBundle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,9 @@ function build(webpackConfig: webpack.Configuration) {
compiler.run((err, info) => {
if (err || info.hasErrors()) {
reject(
new Error(err ? err : info.toJson({ errorDetails: true }).errors)
err
? err
: new Error(info.toJson({ errorDetails: true }).errors.join('\n'))
);
} else {
resolve(info);
Expand Down
12 changes: 3 additions & 9 deletions packages/haul-cli/src/commands/start.ts
Original file line number Diff line number Diff line change
Expand Up @@ -109,13 +109,9 @@ export default function startCommand(runtime: Runtime) {
const { userChoice } = await inquirer.prompt({
type: 'list',
name: 'userChoice',
message: `Port ${
projectConfig.server.port
} is already in use. What should we do?`,
message: `Port ${projectConfig.server.port} is already in use. What should we do?`,
choices: [
`Kill process using port ${
projectConfig.server.port
} and start Haul`,
`Kill process using port ${projectConfig.server.port} and start Haul`,
'Quit',
],
});
Expand All @@ -133,9 +129,7 @@ export default function startCommand(runtime: Runtime) {
runtime.logger.info(`Successfully killed processes.`);
} else {
runtime.logger.error(
`Could not spawn process! Reason: Port ${
projectConfig.server.port
} already in use.`
`Could not spawn process! Reason: Port ${projectConfig.server.port} already in use.`
);
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 @@ -53,7 +53,7 @@ function getBuildTime(stats: webpack.Stats) {
const jsonStats = stats.toJson({ timings: true });
return jsonStats.time
? jsonStats.time
: Math.max(...jsonStats.children.map(({ time }: any) => time));
: Math.max(...jsonStats.children!.map(({ time }: any) => time));
}

export function bundleBuilt(
Expand Down
2 changes: 1 addition & 1 deletion packages/haul-cli/src/messages/multiBundleMessages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ function getBuildTime(stats: webpack.Stats) {
const jsonStats = stats.toJson({ timings: true });
return jsonStats.time
? jsonStats.time
: Math.max(...jsonStats.children.map(({ time }: any) => time));
: Math.max(...jsonStats.children!.map(({ time }: any) => time));
}

export function bundleBuilt(
Expand Down
5 changes: 2 additions & 3 deletions packages/haul-core-legacy/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,10 @@
"dependencies": {
"mime-types": "^2.1.24",
"mkdirp": "^0.5.1",
"ws": "^2.2.2",
"ws": "^6.2.1",
"xpipe": "^1.0.5"
},
"devDependencies": {
"jest": "^24.7.1",
"snapshot-diff": "^0.3.0"
"snapshot-diff": "^0.5.2"
}
}
4 changes: 2 additions & 2 deletions packages/haul-core-legacy/src/compiler/Fork.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ module.exports = class Fork extends EventEmitter {
transportServer = createWebSocketServer();

// WebSocket connection is established after the Fork is created.
transportServer.on('connection', socket => {
const platformMatch = socket.upgradeReq.url.match(/platform=([^&]*)/);
transportServer.on('connection', (socket, req) => {
const platformMatch = req.url.match(/platform=([^&]*)/);

if (!platformMatch) {
throw new Error('Incorrect platform');
Expand Down
1 change: 1 addition & 0 deletions packages/haul-core/jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,5 @@ module.exports = {
moduleNameMapper: {
'^jest/(.*)': path.join(__dirname, '../../jest/$1'),
},
testEnvironment: 'node',
};
40 changes: 20 additions & 20 deletions packages/haul-core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,18 @@
"license": "MIT",
"bugs": "https://github.com/callstack/haul/issues",
"peerDependencies": {
"react-native": "^0.59.0"
"react-native": ">=0.59.0"
},
"dependencies": {
"@babel/core": "^7.5.5",
"@babel/plugin-proposal-class-properties": "^7.5.5",
"@babel/plugin-transform-flow-strip-types": "^7.4.4",
"@babel/preset-env": "^7.5.5",
"@babel/preset-typescript": "^7.3.3",
"@babel/core": "7.4.3",
"@babel/plugin-proposal-class-properties": "7.4.0",
"@babel/plugin-transform-flow-strip-types": "7.4.0",
"@babel/preset-env": "7.4.3",
"@babel/preset-typescript": "7.3.3",
"@hapi/boom": "^7.4.2",
"@hapi/hapi": "^18.3.1",
"@hapi/inert": "^5.2.0",
"@hapi/joi": "^15.0.3",
"@hapi/inert": "^5.2.1",
"@hapi/joi": "^15.1.0",
"@haul-bundler/basic-bundle-webpack-plugin": "^0.10.0",
"@haul-bundler/core-legacy": "^0.10.0",
"@haul-bundler/inspector-events": "^0.10.0",
Expand All @@ -38,37 +38,37 @@
"image-size": "^0.7.4",
"loader-utils": "^1.2.3",
"lodash.get": "^4.4.2",
"lodash.merge": "^4.6.1",
"lodash.merge": "^4.6.2",
"lodash.throttle": "^4.1.1",
"node-fetch": "^2.6.0",
"open": "^6.0.0",
"open": "^6.4.0",
"open-in-editor": "^2.2.0",
"platform-select": "^1.1.2",
"resolve": "^1.10.1",
"semver": "^6.0.0",
"resolve": "^1.12.0",
"semver": "^6.3.0",
"source-map": "^0.7.3",
"terminal-kit": "^1.28.1",
"terser": "^3.17.0",
"terminal-kit": "^1.30.0",
"terser": "^4.1.3",
"utility-types": "^3.7.0",
"webpack": "^4.30.0",
"webpack": "^4.39.1",
"ws": "^6.2.1"
},
"devDependencies": {
"@types/babel__core": "^7.1.2",
"@types/dedent": "^0.7.0",
"@types/hapi__boom": "^7.4.0",
"@types/hapi__hapi": "^18.0.2",
"@types/hapi__hapi": "^18.2.5",
"@types/hapi__inert": "^5.2.0",
"@types/hapi__joi": "^15.0.1",
"@types/hapi__joi": "^15.0.3",
"@types/image-size": "^0.7.0",
"@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/node-fetch": "^2.3.6",
"@types/node-fetch": "^2.5.0",
"@types/resolve": "^0.0.8",
"@types/semver": "^6.0.0",
"@types/semver": "^6.0.1",
"@types/terminal-kit": "^1.28.0",
"@types/ws": "^6.0.1"
"@types/ws": "^6.0.2"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,7 @@ const makeConfig = makeConfigFactory(
target: 'webworker',
output: {
path: env.assetsDest || env.root,
publicPath: `http://${projectConfig.server.host}:${
projectConfig.server.port
}/`,
publicPath: `http://${projectConfig.server.host}:${projectConfig.server.port}/`,
globalObject: 'this',
},
plugins: [
Expand Down
4 changes: 1 addition & 3 deletions packages/haul-core/src/server/launchBrowser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,7 @@ export default function launchBrowser(runtime: Runtime, url: string) {
}
).catch((error: Error) => {
runtime.logger.warn(
`Cannot start browser for debugging. Navigate manually to "${url}": ${
error.message
}`
`Cannot start browser for debugging. Navigate manually to "${url}": ${error.message}`
);
});
}
6 changes: 2 additions & 4 deletions packages/haul-core/src/server/setupCompilerRoutes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,7 @@ export default function setupCompilerRoutes(
type: bundleType,
} = getBundleDataFromURL(request.url.href);
if (!platform) {
const message = `Cannot detect platform parameter in URL: ${
request.path
}`;
const message = `Cannot detect platform parameter in URL: ${request.path}`;
runtime.logger.error(message);
return Boom.badImplementation(message);
}
Expand All @@ -78,8 +76,8 @@ export default function setupCompilerRoutes(
);

if (!hasRunAdbReverse && platform === 'android') {
await runAdbReverse(runtime, port);
hasRunAdbReverse = true;
await runAdbReverse(runtime, port);
}

if (bundleType === 'delta' && !hasWarnedDelta) {
Expand Down
5 changes: 2 additions & 3 deletions packages/haul-core/src/server/setupSymbolication.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ async function getSourceMapConsumers(
baseUrl: string
): Promise<SourceMapConsumers> {
if (!sourceMapConsumers[platform]) {
// eslint-disable-next-line require-atomic-updates
sourceMapConsumers[platform] = (await Promise.all(
bundleNames.map(bundleName =>
createSourceMapConsumer(
Expand Down Expand Up @@ -136,9 +137,7 @@ export default function setupSymbolication(
const { platform } = getBundleDataFromURL(unconvertedFrames[0].file);
if (!platform) {
runtime.logger.warn(
`Cannot detect platform from initial frame: ${
unconvertedFrames[0].file
}`
`Cannot detect platform from initial frame: ${unconvertedFrames[0].file}`
);
return h.response().code(400);
}
Expand Down
4 changes: 1 addition & 3 deletions packages/haul-core/src/utils/importModule.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,7 @@ function loadModule(
moduleBody = fs.readFileSync(moduleFilename, 'utf8');
} catch (error) {
throw new Error(
`Module '${filename}' resolved to '${moduleFilename}' not found: ${
error.code
}`
`Module '${filename}' resolved to '${moduleFilename}' not found: ${error.code}`
);
}

Expand Down
4 changes: 1 addition & 3 deletions packages/haul-core/src/webpack/loaders/assetLoader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,7 @@ async function assetLoader(this: any) {
const url = path.relative(config.root, dirname);
const type = path.extname(filePath).replace(/^\./, '');
const assets = path.join('assets', config.bundle ? '' : config.platform);
const suffix = `(@\\d+(\\.\\d+)?x)?(\\.(${
config.platform
}|native))?\\.${type}$`;
const suffix = `(@\\d+(\\.\\d+)?x)?(\\.(${config.platform}|native))?\\.${type}$`;
const filename = path.basename(filePath).replace(new RegExp(suffix), '');
const normalizedUrl = url.replace(new RegExp(`^[\\.\\${path.sep}]+`), '');
const normalizedName =
Expand Down
4 changes: 1 addition & 3 deletions packages/haul-core/src/webpack/resolvers/HasteResolver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,7 @@ export default class HasteResolver {
return resolver.doResolve(
resolver.hooks.resolve,
obj,
`Aliased ${innerRequest} with haste mapping: ${
hasteMap[innerRequest]
}`,
`Aliased ${innerRequest} with haste mapping: ${hasteMap[innerRequest]}`,
context,
callback
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const runWebpack = (
}
const assetPaths = stats
.toJson()
.modules.map((module: any) => module.identifier);
.modules!.map((module: any) => module.identifier);

try {
assertion(assetPaths);
Expand Down
6 changes: 3 additions & 3 deletions packages/haul-inspector/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@
"@haul-bundler/inspector-events": "^0.10.0",
"ansi-fragments": "^0.2.1",
"ws": "^6.2.1",
"yargs": "^13.2.2"
"yargs": "^13.3.0"
},
"devDependencies": {
"@types/ws": "^6.0.1",
"@types/yargs": "^13.0.0"
"@types/ws": "^6.0.2",
"@types/yargs": "^13.0.2"
}
}
Loading