Skip to content

Commit

Permalink
chore: use workspace: protocol for workspace dependencies
Browse files Browse the repository at this point in the history
Closes patternfly#10547

Signed-off-by: Jon Koops <[email protected]>
  • Loading branch information
jonkoops committed Jun 7, 2024
1 parent e9eb9aa commit 8e6295e
Show file tree
Hide file tree
Showing 12 changed files with 69 additions and 150 deletions.
4 changes: 0 additions & 4 deletions GETTING-STARTED.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,3 @@ PatternFly React has 3 linters you can run all at once using `yarn lint:all`. Th
### ESLint

ESLint is run on .js, .jsx, .ts, and .tsx files. It uses the [@typescript-eslint](https://github.com/typescript-eslint/typescript-eslint) parser with custom config added over the years. We write some of our own ESLint rules in `eslint-plugin-patternfly-react`. You can run this linter with `yarn lint:ts` or on specific files with `yarn lint <path>`.

### Version lint

The `@patternfly` version linter is run on all `package.json` files to ensure that versions of all `@patternfly/*` packages match. This is done to prevent mismatching versions of essential PatternFly packages from accidentally being published. You can run this linter with `yarn lint:versions`.
6 changes: 2 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -88,10 +88,9 @@
"clean:exports": "lerna run clean:exports --parallel --stream",
"generate": "yarn plop",
"lint": "eslint --ext js,jsx,ts,tsx --cache --cache-strategy content",
"lint:all": "yarn lint:md && yarn lint:versions && yarn lint:ts",
"lint:all": "yarn lint:md && yarn lint:ts",
"lint:md": "yarn eslint packages --ext md --no-eslintrc --config .eslintrc-md.json --cache --cache-strategy content",
"lint:ts": "yarn lint packages/*/src",
"lint:versions": "node scripts/verifyPatternflyVersions.js",
"lint:tests": "yarn lint packages/*/src/components/*/__tests__/*.test.*",
"prepare": "ts-patch install -s",
"serve:docs": "yarn workspace @patternfly/react-docs serve",
Expand All @@ -113,8 +112,7 @@
},
"lint-staged": {
"*.md": "yarn lint:md --fix",
"*.{js,jsx,ts,tsx}": "yarn lint --fix",
"*.json": "yarn lint:versions --fix"
"*.{js,jsx,ts,tsx}": "yarn lint --fix"
},
"workspaces": {
"packages": [
Expand Down
4 changes: 2 additions & 2 deletions packages/react-charts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@
},
"homepage": "https://github.com/patternfly/patternfly-react#readme",
"dependencies": {
"@patternfly/react-styles": "^5.4.0-prerelease.6",
"@patternfly/react-tokens": "^5.4.0-prerelease.5",
"@patternfly/react-styles": "workspace:^",
"@patternfly/react-tokens": "workspace:^",
"hoist-non-react-statics": "^3.3.2",
"lodash": "^4.17.21",
"tslib": "^2.6.2",
Expand Down
6 changes: 3 additions & 3 deletions packages/react-code-editor/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@
},
"dependencies": {
"@monaco-editor/react": "^4.6.0",
"@patternfly/react-core": "^5.4.0-prerelease.15",
"@patternfly/react-icons": "^5.4.0-prerelease.5",
"@patternfly/react-styles": "^5.4.0-prerelease.6",
"@patternfly/react-core": "workspace:^",
"@patternfly/react-icons": "workspace:^",
"@patternfly/react-styles": "workspace:^",
"react-dropzone": "14.2.3",
"tslib": "^2.6.2"
},
Expand Down
6 changes: 3 additions & 3 deletions packages/react-core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,9 @@
"clean:exports": "node scripts/cleanDistExports.js"
},
"dependencies": {
"@patternfly/react-icons": "^5.4.0-prerelease.5",
"@patternfly/react-styles": "^5.4.0-prerelease.6",
"@patternfly/react-tokens": "^5.4.0-prerelease.5",
"@patternfly/react-icons": "workspace:^",
"@patternfly/react-styles": "workspace:^",
"@patternfly/react-tokens": "workspace:^",
"focus-trap": "7.5.4",
"react-dropzone": "^14.2.3",
"tslib": "^2.6.2"
Expand Down
18 changes: 9 additions & 9 deletions packages/react-docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,15 @@
},
"dependencies": {
"@patternfly/patternfly": "5.4.0-prerelease.3",
"@patternfly/react-charts": "^7.4.0-prerelease.11",
"@patternfly/react-code-editor": "^5.4.0-prerelease.17",
"@patternfly/react-core": "^5.4.0-prerelease.15",
"@patternfly/react-drag-drop": "^5.4.0-prerelease.16",
"@patternfly/react-icons": "^5.4.0-prerelease.5",
"@patternfly/react-styles": "^5.4.0-prerelease.6",
"@patternfly/react-table": "^5.4.0-prerelease.16",
"@patternfly/react-templates": "^1.1.0-prerelease.15",
"@patternfly/react-tokens": "^5.4.0-prerelease.5"
"@patternfly/react-charts": "workspace:^",
"@patternfly/react-code-editor": "workspace:^",
"@patternfly/react-core": "workspace:^",
"@patternfly/react-drag-drop": "workspace:^",
"@patternfly/react-icons": "workspace:^",
"@patternfly/react-styles": "workspace:^",
"@patternfly/react-table": "workspace:^",
"@patternfly/react-templates": "workspace:^",
"@patternfly/react-tokens": "workspace:^"
},
"devDependencies": {
"@patternfly/documentation-framework": "^5.16.4",
Expand Down
6 changes: 3 additions & 3 deletions packages/react-drag-drop/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@
"@dnd-kit/core": "^6.1.0",
"@dnd-kit/modifiers": "^6.0.1",
"@dnd-kit/sortable": "^7.0.2",
"@patternfly/react-core": "^5.4.0-prerelease.15",
"@patternfly/react-icons": "^5.4.0-prerelease.5",
"@patternfly/react-styles": "^5.4.0-prerelease.6",
"@patternfly/react-core": "workspace:^",
"@patternfly/react-icons": "workspace:^",
"@patternfly/react-styles": "workspace:^",
"memoize-one": "^5.1.0",
"resize-observer-polyfill": "^1.5.1"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/react-integration/demo-app-ts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"preview": "vite preview --port 3000"
},
"dependencies": {
"@patternfly/react-core": "^5.4.0-prerelease.15",
"@patternfly/react-core": "workspace:^",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react-router": "^5.3.4",
Expand Down
8 changes: 4 additions & 4 deletions packages/react-table/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@
"subpaths": "node ../../scripts/exportSubpaths.js --config subpaths.config.json"
},
"dependencies": {
"@patternfly/react-core": "^5.4.0-prerelease.15",
"@patternfly/react-icons": "^5.4.0-prerelease.5",
"@patternfly/react-styles": "^5.4.0-prerelease.6",
"@patternfly/react-tokens": "^5.4.0-prerelease.5",
"@patternfly/react-core": "workspace:^",
"@patternfly/react-icons": "workspace:^",
"@patternfly/react-styles": "workspace:^",
"@patternfly/react-tokens": "workspace:^",
"lodash": "^4.17.21",
"tslib": "^2.6.2"
},
Expand Down
8 changes: 4 additions & 4 deletions packages/react-templates/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@
"subpaths": "node ../../scripts/exportSubpaths.js --config subpaths.config.json"
},
"dependencies": {
"@patternfly/react-core": "^5.4.0-prerelease.15",
"@patternfly/react-icons": "^5.4.0-prerelease.5",
"@patternfly/react-styles": "^5.4.0-prerelease.6",
"@patternfly/react-tokens": "^5.4.0-prerelease.5",
"@patternfly/react-core": "workspace:^",
"@patternfly/react-icons": "workspace:^",
"@patternfly/react-styles": "workspace:^",
"@patternfly/react-tokens": "workspace:^",
"tslib": "^2.6.2"
},
"peerDependencies": {
Expand Down
75 changes: 0 additions & 75 deletions scripts/verifyPatternflyVersions.js

This file was deleted.

76 changes: 38 additions & 38 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3076,12 +3076,12 @@ __metadata:
languageName: node
linkType: hard

"@patternfly/react-charts@npm:^7.4.0-prerelease.11, @patternfly/react-charts@workspace:packages/react-charts":
"@patternfly/react-charts@workspace:^, @patternfly/react-charts@workspace:packages/react-charts":
version: 0.0.0-use.local
resolution: "@patternfly/react-charts@workspace:packages/react-charts"
dependencies:
"@patternfly/react-styles": "npm:^5.4.0-prerelease.6"
"@patternfly/react-tokens": "npm:^5.4.0-prerelease.5"
"@patternfly/react-styles": "workspace:^"
"@patternfly/react-tokens": "workspace:^"
"@types/lodash": "npm:^4.17.4"
css: "npm:^2.2.4"
fs-extra: "npm:^11.2.0"
Expand Down Expand Up @@ -3111,14 +3111,14 @@ __metadata:
languageName: unknown
linkType: soft

"@patternfly/react-code-editor@npm:^5.4.0-prerelease.17, @patternfly/react-code-editor@workspace:packages/react-code-editor":
"@patternfly/react-code-editor@workspace:^, @patternfly/react-code-editor@workspace:packages/react-code-editor":
version: 0.0.0-use.local
resolution: "@patternfly/react-code-editor@workspace:packages/react-code-editor"
dependencies:
"@monaco-editor/react": "npm:^4.6.0"
"@patternfly/react-core": "npm:^5.4.0-prerelease.15"
"@patternfly/react-icons": "npm:^5.4.0-prerelease.5"
"@patternfly/react-styles": "npm:^5.4.0-prerelease.6"
"@patternfly/react-core": "workspace:^"
"@patternfly/react-icons": "workspace:^"
"@patternfly/react-styles": "workspace:^"
monaco-editor: "npm:^0.49.0"
react-dropzone: "npm:14.2.3"
tslib: "npm:^2.6.2"
Expand All @@ -3128,14 +3128,14 @@ __metadata:
languageName: unknown
linkType: soft

"@patternfly/react-core@npm:^5.4.0-prerelease.15, @patternfly/react-core@workspace:packages/react-core":
"@patternfly/react-core@workspace:^, @patternfly/react-core@workspace:packages/react-core":
version: 0.0.0-use.local
resolution: "@patternfly/react-core@workspace:packages/react-core"
dependencies:
"@patternfly/patternfly": "npm:5.4.0-prerelease.3"
"@patternfly/react-icons": "npm:^5.4.0-prerelease.5"
"@patternfly/react-styles": "npm:^5.4.0-prerelease.6"
"@patternfly/react-tokens": "npm:^5.4.0-prerelease.5"
"@patternfly/react-icons": "workspace:^"
"@patternfly/react-styles": "workspace:^"
"@patternfly/react-tokens": "workspace:^"
css: "npm:^2.2.4"
focus-trap: "npm:7.5.4"
fs-extra: "npm:^11.2.0"
Expand All @@ -3154,28 +3154,28 @@ __metadata:
"@patternfly/documentation-framework": "npm:^5.16.4"
"@patternfly/patternfly": "npm:5.4.0-prerelease.3"
"@patternfly/patternfly-a11y": "npm:4.3.1"
"@patternfly/react-charts": "npm:^7.4.0-prerelease.11"
"@patternfly/react-code-editor": "npm:^5.4.0-prerelease.17"
"@patternfly/react-core": "npm:^5.4.0-prerelease.15"
"@patternfly/react-drag-drop": "npm:^5.4.0-prerelease.16"
"@patternfly/react-icons": "npm:^5.4.0-prerelease.5"
"@patternfly/react-styles": "npm:^5.4.0-prerelease.6"
"@patternfly/react-table": "npm:^5.4.0-prerelease.16"
"@patternfly/react-templates": "npm:^1.1.0-prerelease.15"
"@patternfly/react-tokens": "npm:^5.4.0-prerelease.5"
"@patternfly/react-charts": "workspace:^"
"@patternfly/react-code-editor": "workspace:^"
"@patternfly/react-core": "workspace:^"
"@patternfly/react-drag-drop": "workspace:^"
"@patternfly/react-icons": "workspace:^"
"@patternfly/react-styles": "workspace:^"
"@patternfly/react-table": "workspace:^"
"@patternfly/react-templates": "workspace:^"
"@patternfly/react-tokens": "workspace:^"
languageName: unknown
linkType: soft

"@patternfly/react-drag-drop@npm:^5.4.0-prerelease.16, @patternfly/react-drag-drop@workspace:packages/react-drag-drop":
"@patternfly/react-drag-drop@workspace:^, @patternfly/react-drag-drop@workspace:packages/react-drag-drop":
version: 0.0.0-use.local
resolution: "@patternfly/react-drag-drop@workspace:packages/react-drag-drop"
dependencies:
"@dnd-kit/core": "npm:^6.1.0"
"@dnd-kit/modifiers": "npm:^6.0.1"
"@dnd-kit/sortable": "npm:^7.0.2"
"@patternfly/react-core": "npm:^5.4.0-prerelease.15"
"@patternfly/react-icons": "npm:^5.4.0-prerelease.5"
"@patternfly/react-styles": "npm:^5.4.0-prerelease.6"
"@patternfly/react-core": "workspace:^"
"@patternfly/react-icons": "workspace:^"
"@patternfly/react-styles": "workspace:^"
memoize-one: "npm:^5.1.0"
resize-observer-polyfill: "npm:^1.5.1"
peerDependencies:
Expand All @@ -3184,7 +3184,7 @@ __metadata:
languageName: unknown
linkType: soft

"@patternfly/react-icons@npm:^5.4.0-prerelease.5, @patternfly/react-icons@workspace:packages/react-icons":
"@patternfly/react-icons@workspace:^, @patternfly/react-icons@workspace:packages/react-icons":
version: 0.0.0-use.local
resolution: "@patternfly/react-icons@workspace:packages/react-icons"
dependencies:
Expand Down Expand Up @@ -3265,7 +3265,7 @@ __metadata:
languageName: unknown
linkType: soft

"@patternfly/react-styles@npm:^5.4.0-prerelease.6, @patternfly/react-styles@workspace:packages/react-styles":
"@patternfly/react-styles@workspace:^, @patternfly/react-styles@workspace:packages/react-styles":
version: 0.0.0-use.local
resolution: "@patternfly/react-styles@workspace:packages/react-styles"
dependencies:
Expand All @@ -3277,14 +3277,14 @@ __metadata:
languageName: unknown
linkType: soft

"@patternfly/react-table@npm:^5.4.0-prerelease.16, @patternfly/react-table@workspace:packages/react-table":
"@patternfly/react-table@workspace:^, @patternfly/react-table@workspace:packages/react-table":
version: 0.0.0-use.local
resolution: "@patternfly/react-table@workspace:packages/react-table"
dependencies:
"@patternfly/react-core": "npm:^5.4.0-prerelease.15"
"@patternfly/react-icons": "npm:^5.4.0-prerelease.5"
"@patternfly/react-styles": "npm:^5.4.0-prerelease.6"
"@patternfly/react-tokens": "npm:^5.4.0-prerelease.5"
"@patternfly/react-core": "workspace:^"
"@patternfly/react-icons": "workspace:^"
"@patternfly/react-styles": "workspace:^"
"@patternfly/react-tokens": "workspace:^"
lodash: "npm:^4.17.21"
tslib: "npm:^2.6.2"
peerDependencies:
Expand All @@ -3293,22 +3293,22 @@ __metadata:
languageName: unknown
linkType: soft

"@patternfly/react-templates@npm:^1.1.0-prerelease.15, @patternfly/react-templates@workspace:packages/react-templates":
"@patternfly/react-templates@workspace:^, @patternfly/react-templates@workspace:packages/react-templates":
version: 0.0.0-use.local
resolution: "@patternfly/react-templates@workspace:packages/react-templates"
dependencies:
"@patternfly/react-core": "npm:^5.4.0-prerelease.15"
"@patternfly/react-icons": "npm:^5.4.0-prerelease.5"
"@patternfly/react-styles": "npm:^5.4.0-prerelease.6"
"@patternfly/react-tokens": "npm:^5.4.0-prerelease.5"
"@patternfly/react-core": "workspace:^"
"@patternfly/react-icons": "workspace:^"
"@patternfly/react-styles": "workspace:^"
"@patternfly/react-tokens": "workspace:^"
tslib: "npm:^2.6.2"
peerDependencies:
react: ^17 || ^18
react-dom: ^17 || ^18
languageName: unknown
linkType: soft

"@patternfly/react-tokens@npm:^5.4.0-prerelease.5, @patternfly/react-tokens@workspace:packages/react-tokens":
"@patternfly/react-tokens@workspace:^, @patternfly/react-tokens@workspace:packages/react-tokens":
version: 0.0.0-use.local
resolution: "@patternfly/react-tokens@workspace:packages/react-tokens"
dependencies:
Expand Down Expand Up @@ -8303,7 +8303,7 @@ __metadata:
version: 0.0.0-use.local
resolution: "demo-app-ts@workspace:packages/react-integration/demo-app-ts"
dependencies:
"@patternfly/react-core": "npm:^5.4.0-prerelease.15"
"@patternfly/react-core": "workspace:^"
"@types/react-router": "npm:^5.1.20"
"@types/react-router-dom": "npm:^5.3.3"
"@vitejs/plugin-react-swc": "npm:^3.7.0"
Expand Down

0 comments on commit 8e6295e

Please sign in to comment.