nx-ignore
Advanced tools
Comparing version 16.4.0 to 16.7.0-beta.1
{ | ||
"name": "nx-ignore", | ||
"version": "16.4.0", | ||
"version": "16.7.0-beta.1", | ||
"type": "commonjs", | ||
@@ -25,8 +25,3 @@ "repository": { | ||
}, | ||
"main": "./src/index.js", | ||
"exports": { | ||
".": { | ||
"require": "./src/index.js" | ||
} | ||
} | ||
"main": "./src/index.js" | ||
} |
#!/usr/bin/env node | ||
declare const execSync: any; | ||
declare const tmpdir: any; | ||
declare const rmSync: any, readFileSync: any, writeFileSync: any, mkdirSync: any, moveSync: any; | ||
declare const existsSync: any, rmSync: any, readFileSync: any, writeFileSync: any, mkdirSync: any, moveSync: any; | ||
declare const join: any; | ||
@@ -6,0 +6,0 @@ declare const args: string[]; |
@@ -6,3 +6,3 @@ #!/usr/bin/env node | ||
const { tmpdir } = require('os'); | ||
const { rmSync , readFileSync , writeFileSync , mkdirSync , moveSync } = require('fs-extra'); | ||
const { existsSync , rmSync , readFileSync , writeFileSync , mkdirSync , moveSync } = require('fs-extra'); | ||
const { join } = require('path'); | ||
@@ -106,5 +106,6 @@ const args = process.argv.slice(2); | ||
// create temp package.json to avoid install other packages | ||
const json = JSON.parse(readFileSync(join(root, 'package.json'))); | ||
delete json['scripts']; | ||
delete json.devDependencies; | ||
const originalPackageJson = JSON.parse(readFileSync(join(root, 'package.json'))); | ||
const json = { | ||
name: originalPackageJson.name | ||
}; | ||
json.dependencies = { | ||
@@ -128,5 +129,15 @@ nx: deps['nx'], | ||
writeFileSync(join(tmpPath, 'package.json'), JSON.stringify(json)); | ||
execSync(`npm install --force`, { | ||
cwd: tmpPath | ||
}); | ||
if (existsSync(join(root, 'yarn.lock'))) { | ||
execSync(`yarn install`, { | ||
cwd: tmpPath | ||
}); | ||
} else if (existsSync(join(root, 'pnpm-lock.yaml'))) { | ||
execSync(`pnpm install --force`, { | ||
cwd: tmpPath | ||
}); | ||
} else { | ||
execSync(`npm install --force`, { | ||
cwd: tmpPath | ||
}); | ||
} | ||
moveSync(join(tmpPath, 'node_modules'), join(root, 'node_modules')); | ||
@@ -133,0 +144,0 @@ return deps['nx']; |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
22893
193
1