Skip to content

Commit 3828f24

Browse files
authored
test(test-repos): Add a test monorepo under /test-repos/yarn-pnpm (#3507)
* add a test repository with some example packages ported from FURN * continue with test repo configuration * align versions with align deps in test-repo * add lage config * fix text and button builds * add yarn external workspace plugin to project * add initial yarn plugin files * update yarn lock file * trim yarn plugin code and fix button code for TS 5.x * more button build fixes * change test repo linker mode * create a root test-repos to prepare for multiple test-repos in the future * add test apps and shared test package to test repo * fix builds in test-repo * consume fake button in mobile test app * update test-app-desktop as well * add ability to run rnx-cli in scripts * remove unnecessary bin entry * remove unnecessary files * remove eslint-config package, instead referencing the main repo * change casing on Button directory * fix linting and building in test repo * rename button to temp to change case * rename back to button to change case
1 parent b195e69 commit 3828f24

File tree

157 files changed

+24785
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

157 files changed

+24785
-0
lines changed

test-repos/yarn-pnpm/.gitignore

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
.ccache/*
2+
!.ccache/ccache.conf
3+
.gradle/
4+
.idea/
5+
.xcode.env*
6+
.yarn/*
7+
!.yarn/patches/
8+
!.yarn/plugins/
9+
!.yarn/releases/
10+
/packages/*/*.LICENSE.txt
11+
/packages/*/*/rnx-build/
12+
/packages/*/dist/
13+
/packages/*/ios/DerivedData/
14+
/packages/*/ios/build/
15+
/packages/*/lib/
16+
/packages/*/macos/DerivedData/
17+
/packages/*/macos/build/
18+
/packages/template/CHANGELOG.md
19+
/scripts/bin/
20+
/scripts/lib/

test-repos/yarn-pnpm/.yarnrc.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
compressionLevel: 0
2+
3+
enableGlobalCache: false
4+
5+
enableScripts: false
6+
7+
enableTelemetry: false
8+
9+
globalFolder: .yarn/berry
10+
11+
logFilters:
12+
- code: YN0007
13+
level: discard
14+
- code: YN0008
15+
level: discard
16+
- code: YN0013
17+
level: discard
18+
- code: YN0069
19+
level: error
20+
21+
nodeLinker: pnpm
22+
23+
npmRegistryServer: "https://registry.npmjs.org"
24+
25+
packageExtensions:
26+
"@fluentui/utilities@*":
27+
peerDependenciesMeta:
28+
"@types/react":
29+
optional: true
30+
babel-plugin-transform-flow-enums@*:
31+
peerDependencies:
32+
"@babel/core": ^7.20.0
33+
metro-config@*:
34+
dependencies:
35+
metro-transform-worker: ^0.81.0
36+
react-native@*:
37+
dependencies:
38+
"@react-native-community/cli": ^15.0.0
39+
"@react-native-community/cli-platform-android": ^15.0.0
40+
"@react-native-community/cli-platform-ios": ^15.0.0
41+
42+
tsEnableAutoTypes: false
43+
44+
yarnPath: ../../.yarn/releases/yarn-4.6.0.cjs
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
module.exports = {
2+
npmClient: "yarn",
3+
pipeline: {
4+
lint: [],
5+
build: ["^build", "lint"],
6+
test: ["lint", "build"],
7+
},
8+
};

test-repos/yarn-pnpm/package.json

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
{
2+
"private": true,
3+
"name": "rnx-kit-test-repo",
4+
"version": "0.0.0",
5+
"license": "MIT",
6+
"author": {
7+
"name": "Microsoft Open Source",
8+
"email": "microsoftopensource@users.noreply.github.com"
9+
},
10+
"main": "index.js",
11+
"repository": {
12+
"type": "git",
13+
"url": "https://github.com/microsoft/rnx-kit"
14+
},
15+
"scripts": {
16+
"build": "lage build",
17+
"lint": "lage lint",
18+
"test": "lage test"
19+
},
20+
"devDependencies": {
21+
"@changesets/cli": "^2.22.0",
22+
"@rnx-kit/align-deps": "^3.0.3",
23+
"@types/jest": "^29.2.1",
24+
"@types/node": "^20.0.0",
25+
"eslint": "^9.0.0",
26+
"knip": "^5.30.2",
27+
"lage": "^2.12.10",
28+
"metro": "^0.81.0",
29+
"prettier": "^3.0.0",
30+
"prettier-plugin-organize-imports": "^4.0.0",
31+
"tsx": "^4.15.0",
32+
"typescript": "^5.0.0"
33+
},
34+
"engines": {
35+
"node": ">=16.17"
36+
},
37+
"packageManager": "yarn@4.6.0",
38+
"resolutions": {
39+
"@microsoft/eslint-plugin-sdl/eslint-plugin-react": "^7.35.2",
40+
"@microsoft/eslint-plugin-sdl/eslint-plugin-security": "^1.4.0",
41+
"@react-native-community/cli": "^15.0.0",
42+
"@react-native-community/cli-platform-android": "^15.0.0",
43+
"@react-native-community/cli-platform-apple": "^15.0.0",
44+
"@react-native-community/cli-platform-ios": "^15.0.0",
45+
"@react-native-community/cli-server-api": "^15.0.0",
46+
"@react-native-community/cli-tools": "^15.0.0",
47+
"@react-native-community/cli-types": "^15.0.0",
48+
"@rnx-kit/eslint-config": "link:../../packages/eslint-config",
49+
"@rnx-kit/react-native-host": "^0.5.3",
50+
"@vue/compiler-sfc": "link:./incubator/ignore",
51+
"react-native-macos/@react-native/assets-registry": "^0.76.0",
52+
"react-native-macos/@react-native/codegen": "^0.76.0",
53+
"react-native-macos/@react-native/community-cli-plugin": "^0.76.0",
54+
"react-native-macos/@react-native/gradle-plugin": "^0.76.0",
55+
"react-native-macos/@react-native/js-polyfills": "^0.76.0",
56+
"react-native-macos/@react-native/normalize-colors": "^0.76.0",
57+
"react-native-windows/@react-native/assets-registry": "^0.76.0",
58+
"react-native-windows/@react-native/codegen": "^0.76.0",
59+
"react-native-windows/@react-native/community-cli-plugin": "^0.76.0",
60+
"react-native-windows/@react-native/gradle-plugin": "^0.76.0",
61+
"react-native-windows/@react-native/js-polyfills": "^0.76.0",
62+
"react-native-windows/@react-native/normalize-colors": "^0.76.0",
63+
"react-native-windows/@react-native/virtualized-lists": "^0.76.0"
64+
},
65+
"workspaces": {
66+
"packages": [
67+
"packages/*",
68+
"scripts"
69+
]
70+
},
71+
"prettier": "../.github/prettierrc.json"
72+
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
module.exports = require('@fluentui-react-native/scripts/babel.config');
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
import eslintConfig from "@rnx-kit/eslint-config";
2+
// eslint-disable-next-line no-restricted-exports
3+
export default eslintConfig;
4+
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
const { configureReactNativeJest } = require('@fluentui-react-native/scripts');
2+
module.exports = configureReactNativeJest('ios');
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
const { preset } = require('@fluentui-react-native/scripts');
2+
3+
preset();
Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
{
2+
"name": "@rnx-repo-yarn-pnpm/button",
3+
"version": "0.39.2",
4+
"private": true,
5+
"description": "A copy of the fluentui-react-native button for testing",
6+
"module": "lib/index.js",
7+
"typings": "lib/index.d.ts",
8+
"exports": {
9+
".": {
10+
"types": "./lib/index.d.ts",
11+
"import": "./lib/index.js"
12+
},
13+
"./package.json": "./package.json"
14+
},
15+
"scripts": {
16+
"build": "rnx-test-scripts build",
17+
"clean": "rnx-test-scripts clean",
18+
"lint": "rnx-test-scripts lint",
19+
"test": "rnx-test-scripts jest"
20+
},
21+
"dependencies": {
22+
"@fluentui-react-native/adapters": "0.13.0",
23+
"@fluentui-react-native/experimental-activity-indicator": "0.10.1",
24+
"@fluentui-react-native/experimental-shadow": "0.6.2",
25+
"@fluentui-react-native/framework": "0.14.0",
26+
"@fluentui-react-native/icon": "0.21.6",
27+
"@fluentui-react-native/interactive-hooks": "0.27.2",
28+
"@fluentui-react-native/pressable": "0.12.2",
29+
"@fluentui-react-native/styling-utils": "0.7.0",
30+
"@fluentui-react-native/theme-tokens": "0.27.0",
31+
"@fluentui-react-native/theme-types": "0.39.0",
32+
"@fluentui-react-native/theming-utils": "0.26.0",
33+
"@fluentui-react-native/tokens": "0.23.0",
34+
"@fluentui-react-native/use-styling": "0.13.0",
35+
"@rnx-repo-yarn-pnpm/text": "workspace:*",
36+
"@uifabricshared/foundation-composable": "0.13.0",
37+
"@uifabricshared/foundation-compose": "1.15.0",
38+
"@uifabricshared/foundation-settings": "0.15.0",
39+
"tslib": "^2.3.1"
40+
},
41+
"devDependencies": {
42+
"@react-native-community/cli": "^15.0.0",
43+
"@react-native-community/cli-platform-android": "^15.0.0",
44+
"@react-native-community/cli-platform-ios": "^15.0.0",
45+
"@react-native/babel-preset": "^0.76.0",
46+
"@react-native/metro-config": "^0.76.0",
47+
"@rnx-kit/eslint-config": "*",
48+
"@rnx-kit/eslint-plugin": "*",
49+
"@rnx-repo-yarn-pnpm/scripts": "workspace:*",
50+
"@types/node": "^20.0.0",
51+
"@types/react": "^18.0.0",
52+
"eslint": "^9.0.0",
53+
"prettier": "^3.0.0",
54+
"react": "18.3.1",
55+
"react-native": "^0.76.0",
56+
"react-native-macos": "^0.76.0",
57+
"react-native-svg": "^15.8.0",
58+
"react-native-windows": "^0.76.0",
59+
"typescript": "^5.0.0"
60+
},
61+
"peerDependencies": {
62+
"react": "18.3.1",
63+
"react-native": "^0.76.0",
64+
"react-native-macos": "^0.76.0",
65+
"react-native-svg": "^15.8.0",
66+
"react-native-windows": "^0.76.0"
67+
},
68+
"author": "",
69+
"license": "MIT",
70+
"sideEffects": false,
71+
"rnx-kit": {
72+
"kitType": "library",
73+
"alignDeps": {
74+
"presets": [
75+
"microsoft/react-native"
76+
],
77+
"requirements": [
78+
"react-native@0.76"
79+
],
80+
"capabilities": [
81+
"babel-preset-react-native",
82+
"core",
83+
"core-android",
84+
"core-ios",
85+
"core-macos",
86+
"core-windows",
87+
"react",
88+
"svg"
89+
]
90+
}
91+
},
92+
"peerDependenciesMeta": {
93+
"react-native-macos": {
94+
"optional": true
95+
},
96+
"react-native-windows": {
97+
"optional": true
98+
}
99+
}
100+
}

0 commit comments

Comments
 (0)