@gengjiawen/node-dev
Advanced tools
Comparing version
@@ -5,3 +5,3 @@ #!/usr/bin/env node | ||
const { addCompileDB, syncLldbScritpt, setupVSCodeConfig } = require('../build') | ||
const { addCompileDB, syncLldbScritpt, setupVSCodeConfig, patchV8 } = require('../build') | ||
@@ -32,2 +32,11 @@ program | ||
program | ||
.command('patch-v8') | ||
.description( | ||
'patch v8 in CMakeLists.txt' | ||
) | ||
.action(() => { | ||
patchV8() | ||
}) | ||
program.parse(process.argv) |
export declare function addCompileDB(): void; | ||
export declare function syncLldbScritpt(): void; | ||
export declare function setupVSCodeConfig(): void; | ||
export declare function patchV8(): void; |
@@ -34,2 +34,10 @@ "use strict"; | ||
exports.setupVSCodeConfig = setupVSCodeConfig; | ||
function patchV8() { | ||
const regex = /set\(TARGET "v8"\)(.*?)unset\(TARGET\)/gms; | ||
const cmake_path = path.join(process.cwd(), 'CMakeLists.txt'); | ||
const node_cmake = fs.readFileSync(cmake_path).toString(); | ||
const result = node_cmake.replace(regex, ``); | ||
fs.writeFileSync(cmake_path, result); | ||
} | ||
exports.patchV8 = patchV8; | ||
//# sourceMappingURL=index.js.map |
@@ -37,1 +37,12 @@ import * as fs from 'fs-extra' | ||
} | ||
export function patchV8() { | ||
// https://regex101.com/r/42r0wp/1 | ||
const regex = /set\(TARGET "v8"\)(.*?)unset\(TARGET\)/gms | ||
const cmake_path = path.join(process.cwd(), 'CMakeLists.txt') | ||
const node_cmake = fs.readFileSync(cmake_path).toString() | ||
// The substituted value will be contained in the result variable | ||
const result = node_cmake.replace(regex, ``) | ||
fs.writeFileSync(cmake_path, result) | ||
} |
{ | ||
"name": "@gengjiawen/node-dev", | ||
"version": "0.0.2", | ||
"version": "0.0.3", | ||
"description": "yahaha", | ||
@@ -23,4 +23,4 @@ "repository": { | ||
"dependencies": { | ||
"commander": "5.0.0", | ||
"fs-extra": "9.0.0" | ||
"commander": "6.1.0", | ||
"fs-extra": "9.0.1" | ||
}, | ||
@@ -31,13 +31,12 @@ "publishConfig": { | ||
"devDependencies": { | ||
"@types/fs-extra": "^8.1.0", | ||
"@types/jest": "25.1.4", | ||
"@types/node": "13.9.2", | ||
"husky": "^4.0.1", | ||
"jest": "25.1.0", | ||
"lint-staged": "^10.0.8", | ||
"prettier": "1.19.1", | ||
"rimraf": "3.0.0", | ||
"ts-jest": "25.2.1", | ||
"ts-node-dev": "1.0.0-pre.44", | ||
"typescript": "3.8.3" | ||
"@types/fs-extra": "^9.0.1", | ||
"@types/jest": "26.0.13", | ||
"@types/node": "14.10.1", | ||
"husky": "^4.3.0", | ||
"jest": "26.4.2", | ||
"lint-staged": "^10.3.0", | ||
"prettier": "2.1.1", | ||
"rimraf": "3.0.2", | ||
"ts-jest": "26.3.0", | ||
"typescript": "4.0.2" | ||
}, | ||
@@ -44,0 +43,0 @@ "husky": { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
10
-9.09%282
7.22%0
-100%22878
-89.83%+ Added
+ Added
- Removed
- Removed
Updated
Updated