Skip to content

Commit

Permalink
feat: use official node-pre-gyp
Browse files Browse the repository at this point in the history
  • Loading branch information
hyj1991 committed May 7, 2024
1 parent a66e353 commit 802643a
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .autod.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ module.exports = {
dep: [
'moment',
'nan',
'@xprofiler/node-pre-gyp',
'@mapbox/node-pre-gyp',
'uuid',
'yargs',
],
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ npm i xprofiler --save --xprofiler_binary_host_mirror=https://npmmirror.com/mirr
npm i xprofiler --save --xprofiler_binary_host_mirror=http://devtoolx.com/xprofiler
```

> 这里使用了 `@xprofiler/node-pre-gyp` 帮助开发者无需进行本地编译即可使用此插件,默认插件位于 [Github Release](https://github.com/X-Profiler/xprofiler/releases) 页面,国内访问可能较慢,你也可以自行镜像到其它位置加速安装。
> 这里使用了 `@mapbox/node-pre-gyp` 帮助开发者无需进行本地编译即可使用此插件,默认插件位于 [Github Release](https://github.com/X-Profiler/xprofiler/releases) 页面,国内访问可能较慢,你也可以自行镜像到其它位置加速安装。
### 嵌入项目

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
},
"homepage": "https://github.com/X-Profiler/xprofiler#readme",
"dependencies": {
"@xprofiler/node-pre-gyp": "^1.0.11",
"@mapbox/node-pre-gyp": "^1.0.11",
"moment": "^2.30.1",
"nan": "^2.18.0",
"uuid": "^9.0.1",
Expand Down
2 changes: 1 addition & 1 deletion scripts/copy.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const { promisify } = require('util');
const exists = promisify(fs.exists);
const mkdir = promisify(fs.mkdir);
const copyFile = promisify(fs.copyFile);
const versioning = require('@xprofiler/node-pre-gyp/lib/util/versioning.js');
const versioning = require('@mapbox/node-pre-gyp/lib/util/versioning.js');
const { staged_tarball: packagePath } = versioning.evaluate(require('../package.json'));

async function copy() {
Expand Down
2 changes: 1 addition & 1 deletion xprofiler.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const pkg = require('./package.json');
const workerThreads = require('./lib/worker_threads');

// xprofiler.node
const binary = require('@xprofiler/node-pre-gyp');
const binary = require('@mapbox/node-pre-gyp');
const bindingPath = binary.find(path.resolve(path.join(__dirname, './package.json')));
const xprofiler = require(bindingPath);
xprofiler.setup({
Expand Down

0 comments on commit 802643a

Please sign in to comment.