@react-native-windows/package-utils
Advanced tools
Comparing version 0.67.0 to 0.68.0-preview.1
@@ -14,3 +14,3 @@ "use strict"; | ||
const lodash_1 = __importDefault(require("lodash")); | ||
const fs_1 = __importDefault(require("fs")); | ||
const fs_1 = __importDefault(require("@react-native-windows/fs")); | ||
const path_1 = __importDefault(require("path")); | ||
@@ -51,4 +51,3 @@ const find_repo_root_1 = __importDefault(require("@react-native-windows/find-repo-root")); | ||
try { | ||
const jsonBuffer = await fs_1.default.promises.readFile(jsonPath); | ||
return new WritableNpmPackage(pkgPath, JSON.parse(jsonBuffer.toString())); | ||
return new WritableNpmPackage(pkgPath, await fs_1.default.readJsonFile(jsonPath)); | ||
} | ||
@@ -85,3 +84,3 @@ catch (ex) { | ||
this.pkgJson = jsonObj; | ||
await fs_1.default.promises.writeFile(path_1.default.join(this.path, 'package.json'), JSON.stringify(this.json, null /*replacer*/, 2 /*space*/) + '\n'); | ||
await fs_1.default.writeFile(path_1.default.join(this.path, 'package.json'), JSON.stringify(this.json, null /*replacer*/, 2 /*space*/) + '\n'); | ||
} | ||
@@ -98,3 +97,3 @@ } | ||
const repoRoot = await (0, find_repo_root_1.default)(); | ||
const allPackges = getMonorepoPackages(repoRoot).map(pkg => new WritableNpmPackage(pkg.location, pkg.package)); | ||
const allPackges = getMonorepoPackages(repoRoot).map((pkg) => new WritableNpmPackage(pkg.location, pkg.package)); | ||
const filteredPackages = []; | ||
@@ -128,3 +127,3 @@ for (const pkg of allPackges) { | ||
} | ||
return new NpmPackage(path_1.default.dirname(pkgJsonPath), JSON.parse((await fs_1.default.promises.readFile(pkgJsonPath)).toString())); | ||
return new NpmPackage(path_1.default.dirname(pkgJsonPath), await fs_1.default.readJsonFile(pkgJsonPath)); | ||
} | ||
@@ -131,0 +130,0 @@ exports.findPackage = findPackage; |
{ | ||
"name": "@react-native-windows/package-utils", | ||
"version": "0.67.0", | ||
"version": "0.68.0-preview.1", | ||
"license": "MIT", | ||
@@ -13,4 +13,10 @@ "scripts": { | ||
"main": "lib-commonjs/packageUtils.js", | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/microsoft/react-native-windows.git", | ||
"directory": "packages/@react-native-windows/package-utils" | ||
}, | ||
"dependencies": { | ||
"@react-native-windows/find-repo-root": "0.67.0", | ||
"@react-native-windows/find-repo-root": "0.68.0-preview.1", | ||
"@react-native-windows/fs": "0.68.0-preview.1", | ||
"get-monorepo-packages": "^1.2.0", | ||
@@ -20,18 +26,18 @@ "lodash": "^4.17.15" | ||
"devDependencies": { | ||
"@rnw-scripts/eslint-config": "1.1.8", | ||
"@rnw-scripts/just-task": "2.2.1", | ||
"@rnw-scripts/eslint-config": "1.1.10", | ||
"@rnw-scripts/just-task": "2.2.2", | ||
"@rnw-scripts/ts-config": "2.0.1", | ||
"@types/lodash": "^4.14.168", | ||
"@types/node": "^14.14.22", | ||
"eslint": "7.12.0", | ||
"eslint": "^7.32.0", | ||
"just-scripts": "^1.3.3", | ||
"prettier": "1.19.1", | ||
"prettier": "^2.4.1", | ||
"typescript": "^4.4.4" | ||
}, | ||
"beachball": { | ||
"defaultNpmTag": "latest", | ||
"defaultNpmTag": "preview", | ||
"disallowedChangeTypes": [ | ||
"major", | ||
"minor", | ||
"prerelease" | ||
"patch" | ||
] | ||
@@ -38,0 +44,0 @@ }, |
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
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
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
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
1
15262
4
4
202
1
+ Added@react-native-windows/find-repo-root@0.68.0-preview.1(transitive)
+ Added@react-native-windows/fs@0.68.0-preview.1(transitive)
- Removed@react-native-windows/find-repo-root@0.67.0(transitive)
Updated@react-native-windows/find-repo-root@0.68.0-preview.1