Skip to content
Merged
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
2 changes: 2 additions & 0 deletions .changeset/nasty-cats-sort.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
---
---
4 changes: 2 additions & 2 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
- .yarnrc
- package.json
- scripts/**/*
'feature: align-deps':
- packages/align-deps/**/*
'feature: cli':
- packages/cli/**/*
- packages/config/**/*
'feature: dep-check':
- packages/dep-check/**/*
'feature: eslint':
- packages/eslint-*/**/*
'feature: jest':
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
git diff --exit-code
- name: Report dependency problems
run: |
yarn rnx-dep-check --write
yarn rnx-align-deps --write
git diff --exit-code
- name: Report @rnx-kit/build workflow inconsistencies
run: |
Expand Down
2 changes: 1 addition & 1 deletion incubator/build-plugin-firebase/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ yarn add @rnx-kit/build @rnx-kit/build-plugin-firebase --dev
or if you're using npm

```sh
npm add --save-dev @rnx-kit/dep-check @rnx-kit/build-plugin-firebase
npm add --save-dev @rnx-kit/build @rnx-kit/build-plugin-firebase
```

## Usage
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,15 @@
"lint": "nx run-many --target lint --all",
"new-package": "node scripts/new-package.js",
"publish:changesets": "changeset publish",
"rnx-dep-check": "yarn build-scope dep-check && scripts/rnx-dep-check.js",
"rnx-align-deps": "yarn build-scope align-deps && scripts/rnx-align-deps.js",
"test": "nx run-many --target test --output-style stream --all",
"update-readme": "nx run-many --target update-readme --all",
"version:changesets": "changeset version"
},
"devDependencies": {
"@babel/core": "^7.0.0",
"@changesets/cli": "^2.22.0",
"@rnx-kit/dep-check": "*",
"@rnx-kit/align-deps": "*",
"nx": "^15.0.1",
"prettier": "^2.3.0"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/align-deps/test/initialize.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ describe("initializeConfig()", () => {
test("adds config with custom profiles", () => {
const presets = [
...defaultConfig.presets,
"@rnx-kit/scripts/rnx-dep-check.js",
"@rnx-kit/scripts/rnx-align-deps.js",
];
const result = initializeConfig(
{
Expand Down
4 changes: 2 additions & 2 deletions packages/dep-check/test/initialize.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ describe("initializeConfig()", () => {

initializeConfig("package.json", {
kitType: "library",
customProfilesPath: "@rnx-kit/scripts/rnx-dep-check.js",
customProfilesPath: "@rnx-kit/scripts/rnx-align-deps.js",
});

const kitConfig = content["rnx-kit"];
Expand All @@ -163,7 +163,7 @@ describe("initializeConfig()", () => {
}

expect(kitConfig["customProfiles"]).toEqual(
"@rnx-kit/scripts/rnx-dep-check.js"
"@rnx-kit/scripts/rnx-align-deps.js"
);
});
});
7 changes: 6 additions & 1 deletion packages/jest-preset/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,11 @@
"preset": "@rnx-kit/scripts"
},
"rnx-kit": {
"customProfiles": "@rnx-kit/scripts/rnx-dep-check.js"
"alignDeps": {
"presets": [
"microsoft/react-native",
"@rnx-kit/scripts/rnx-align-deps.js"
]
}
}
}
7 changes: 6 additions & 1 deletion packages/metro-config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,11 @@
"preset": "@rnx-kit/scripts"
},
"rnx-kit": {
"customProfiles": "@rnx-kit/scripts/rnx-dep-check.js"
"alignDeps": {
"presets": [
"microsoft/react-native",
"@rnx-kit/scripts/rnx-align-deps.js"
]
}
}
}
23 changes: 17 additions & 6 deletions packages/react-native-auth/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,22 @@
"extends": "@rnx-kit/eslint-config"
},
"rnx-kit": {
"reactNativeVersion": ">=0.62 <1.0",
"reactNativeDevVersion": "^0.68",
"capabilities": [
"core-android",
"core-ios"
]
"alignDeps": {
"presets": [
"microsoft/react-native"
],
"requirements": {
"development": [
"react-native@0.68"
],
"production": [
"react-native@>=0.62 <1.0"
]
},
"capabilities": [
"core-android",
"core-ios"
]
}
}
}
29 changes: 18 additions & 11 deletions packages/test-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"build": "rnx-kit-scripts build",
"build:ios": "rnx-kit-scripts build-ios -w SampleCrossApp -s ReactTestApp",
"build:android": "rnx-kit-scripts build-android clean build",
"depcheck": "react-native rnx-dep-check && rnx-kit-scripts depcheck",
"depcheck": "react-native rnx-align-deps && rnx-kit-scripts depcheck",
"format": "rnx-kit-scripts format",
"lint": "rnx-kit-scripts lint",
"test": "react-native rnx-test --platform ios",
Expand Down Expand Up @@ -61,7 +61,6 @@
"preset": "@rnx-kit/scripts"
},
"rnx-kit": {
"reactNativeVersion": "^0.68",
"kitType": "app",
"build": {
"distribution": [
Expand Down Expand Up @@ -150,14 +149,22 @@
]
}
},
"capabilities": [
"core-android",
"core-ios",
"core-macos",
"core-windows",
"babel-preset-react-native",
"react",
"test-app"
]
"alignDeps": {
"presets": [
"microsoft/react-native"
],
"requirements": [
"react-native@0.68"
],
"capabilities": [
"core-android",
"core-ios",
"core-macos",
"core-windows",
"babel-preset-react-native",
"react",
"test-app"
]
}
}
}
2 changes: 1 addition & 1 deletion scripts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
},
"depcheck": {
"ignoreMatches": [
"@rnx-kit/dep-check",
"@rnx-kit/align-deps",
"@rnx-kit/jest-preset",
"jest",
"midgard-yarn",
Expand Down
18 changes: 13 additions & 5 deletions scripts/rnx-dep-check.js → scripts/rnx-align-deps.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
#!/usr/bin/env node

"use strict";

module.exports = {
const { cli, presets } = require("@rnx-kit/align-deps");

const profile = {
"@types/jest": {
name: "@types/jest",
version: "^27.0.0",
Expand Down Expand Up @@ -66,11 +67,18 @@ module.exports = {
},
};

const profileNames = Object.keys(presets["microsoft/react-native"]);

module.exports = profileNames.reduce((preset, key) => {
preset[key] = profile;
return preset;
}, {});

if (require.main === module) {
require("@rnx-kit/dep-check").cli({
"custom-profiles": __filename,
cli({
presets: ["microsoft/react-native", __filename],
"exclude-packages": "@rnx-kit/expo-app",
vigilant: "0.68",
requirements: ["react-native@0.68"],
write: process.argv.includes("--write"),
});
}