Skip to content
This repository has been archived by the owner on Feb 12, 2022. It is now read-only.

Substitute v8-profiler with v8-profiler-node8 #2525

Closed
wants to merge 1 commit into from
Closed
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
109 changes: 109 additions & 0 deletions flow-typed/npm/v8-profiler-node8_vx.x.x.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
// flow-typed signature: 157088d679e8cd26f71af29e6bfa3ccc
// flow-typed version: <<STUB>>/v8-profiler-node8_v6.0.1/flow_v0.79.1

/**
* This is an autogenerated libdef stub for:
*
* 'v8-profiler-node8'
*
* Fill this stub out by replacing all the `any` types.
*
* Once filled out, we encourage you to share your work with the
* community by sending a pull request to:
* https://github.com/flowtype/flow-typed
*/

declare module 'v8-profiler-node8' {
declare module.exports: any;
}

/**
* We include stubs for each file inside this npm package in case you need to
* require those files directly. Feel free to delete any files that aren't
* needed.
*/
declare module 'v8-profiler-node8/tools/annotate-tag' {
declare module.exports: any;
}

declare module 'v8-profiler-node8/tools/commit-changes' {
declare module.exports: any;
}

declare module 'v8-profiler-node8/tools/exec' {
declare module.exports: any;
}

declare module 'v8-profiler-node8/tools/history' {
declare module.exports: any;
}

declare module 'v8-profiler-node8/tools/NODE_NEXT' {
declare module.exports: any;
}

declare module 'v8-profiler-node8/tools/prepublish-to-npm' {
declare module.exports: any;
}

declare module 'v8-profiler-node8/tools/publish-to-npm' {
declare module.exports: any;
}

declare module 'v8-profiler-node8/tools/push-to-githab' {
declare module.exports: any;
}

declare module 'v8-profiler-node8/tools/release' {
declare module.exports: any;
}

declare module 'v8-profiler-node8/tools/update-changelog' {
declare module.exports: any;
}

declare module 'v8-profiler-node8/tools/update-npm-version' {
declare module.exports: any;
}

declare module 'v8-profiler-node8/v8-profiler' {
declare module.exports: any;
}

// Filename aliases
declare module 'v8-profiler-node8/tools/annotate-tag.js' {
declare module.exports: $Exports<'v8-profiler-node8/tools/annotate-tag'>;
}
declare module 'v8-profiler-node8/tools/commit-changes.js' {
declare module.exports: $Exports<'v8-profiler-node8/tools/commit-changes'>;
}
declare module 'v8-profiler-node8/tools/exec.js' {
declare module.exports: $Exports<'v8-profiler-node8/tools/exec'>;
}
declare module 'v8-profiler-node8/tools/history.js' {
declare module.exports: $Exports<'v8-profiler-node8/tools/history'>;
}
declare module 'v8-profiler-node8/tools/NODE_NEXT.js' {
declare module.exports: $Exports<'v8-profiler-node8/tools/NODE_NEXT'>;
}
declare module 'v8-profiler-node8/tools/prepublish-to-npm.js' {
declare module.exports: $Exports<'v8-profiler-node8/tools/prepublish-to-npm'>;
}
declare module 'v8-profiler-node8/tools/publish-to-npm.js' {
declare module.exports: $Exports<'v8-profiler-node8/tools/publish-to-npm'>;
}
declare module 'v8-profiler-node8/tools/push-to-githab.js' {
declare module.exports: $Exports<'v8-profiler-node8/tools/push-to-githab'>;
}
declare module 'v8-profiler-node8/tools/release.js' {
declare module.exports: $Exports<'v8-profiler-node8/tools/release'>;
}
declare module 'v8-profiler-node8/tools/update-changelog.js' {
declare module.exports: $Exports<'v8-profiler-node8/tools/update-changelog'>;
}
declare module 'v8-profiler-node8/tools/update-npm-version.js' {
declare module.exports: $Exports<'v8-profiler-node8/tools/update-npm-version'>;
}
declare module 'v8-profiler-node8/v8-profiler.js' {
declare module.exports: $Exports<'v8-profiler-node8/v8-profiler'>;
}
109 changes: 0 additions & 109 deletions flow-typed/npm/v8-profiler_vx.x.x.js

This file was deleted.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@
"webpack-cli": "^3.0.8"
},
"optionalDependencies": {
"v8-profiler": "^5.7.0"
"v8-profiler-node8": "^6.0.1"
},
"engines": {
"node": ">=6.1.0"
Expand Down
4 changes: 2 additions & 2 deletions scripts/test-runner.js
Original file line number Diff line number Diff line change
Expand Up @@ -726,10 +726,10 @@ function prepareReplExternalSepc(procPath) {
function runWithCpuProfiler(args) {
let profiler;
try {
profiler = require("v8-profiler");
profiler = require("v8-profiler-node8");
} catch (e) {
// Profiler optional dependency failed
console.error("v8-profiler doesn't work correctly on Windows, see issue #1695");
console.error("v8-profiler-node8 doesn't work correctly on Windows, see issue #1695");
throw e;
}
profiler.setSamplingInterval(100); // default is 1000us
Expand Down
4 changes: 2 additions & 2 deletions src/prepack-cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -507,10 +507,10 @@ function run(
try {
if (cpuprofilePath !== undefined) {
try {
profiler = require("v8-profiler");
profiler = require("v8-profiler-node8");
} catch (e) {
// Profiler optional dependency failed
console.error("v8-profiler doesn't work correctly on Windows, see issue #1695");
console.error("v8-profiler-node8 doesn't work correctly on Windows, see issue #1695");
throw e;
}
profiler.setSamplingInterval(100); // default is 1000us
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -9071,12 +9071,12 @@ v8-compile-cache@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/v8-compile-cache/-/v8-compile-cache-2.0.0.tgz#526492e35fc616864284700b7043e01baee09f0a"

v8-profiler@^5.7.0:
version "5.7.0"
resolved "https://registry.yarnpkg.com/v8-profiler/-/v8-profiler-5.7.0.tgz#e8381cbebb5b5fd0ca8d2b09f6a0181a158db34d"
v8-profiler-node8@^6.0.1:
version "6.0.1"
resolved "https://registry.yarnpkg.com/v8-profiler-node8/-/v8-profiler-node8-6.0.1.tgz#2558f5dab7622f2305213e6ccb4dde1f66cc631f"
dependencies:
nan "^2.5.1"
node-pre-gyp "^0.6.34"
node-pre-gyp "^0.11.0"

v8flags@^3.1.1:
version "3.1.1"
Expand Down