Skip to content

Commit

Permalink
Use normal dependencies instead of peerDependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
mbeckem committed Oct 21, 2024
1 parent 3abd9cb commit 2fbaaa0
Show file tree
Hide file tree
Showing 18 changed files with 794 additions and 14 deletions.
17 changes: 17 additions & 0 deletions .changeset/big-peaches-know.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
"@open-pioneer/authentication-keycloak": minor
"@open-pioneer/runtime-react-support": minor
"@open-pioneer/chakra-integration": minor
"@open-pioneer/authentication": minor
"@open-pioneer/local-storage": minor
"@open-pioneer/integration": minor
"@open-pioneer/react-utils": minor
"@open-pioneer/base-theme": minor
"@open-pioneer/reactivity": minor
"@open-pioneer/test-utils": minor
"@open-pioneer/notifier": minor
"@open-pioneer/runtime": minor
"@open-pioneer/http": minor
---

Use normal `dependencies` instead of `peerDependencies`. Peer dependencies have some usability issues (and bugs) when used at scale.
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"dev": "vite",
"check-types": "tsc --noEmit",
"watch-types": "pnpm check-types -w",
"check-duplicates": "pnpm check-pnpm-duplicates -c support/duplicate-packages.yaml",
"build": "vite build",
"build-packages": "pnpm run -r --aggregate-output build",
"build-docs": "typedoc",
Expand All @@ -18,7 +19,7 @@
"prettier": "pnpm prettier:common -w",
"prettier:common": "prettier ./src ./docs --ignore-path .eslintignore --cache",
"test": "vitest",
"prepare": "husky",
"prepare": "husky && pnpm check-duplicates",
"ci:test": "pnpm run clean && pnpm run lint && pnpm run check-types && vitest run",
"ci:version": "pnpm changeset version && pnpm exec prettier './src/**/CHANGELOG.md' --write --ignore-path .eslintignore && pnpm install",
"ci:publish": "pnpm run clean && pnpm run build-packages && pnpm publish -r --access public && pnpm changeset tag"
Expand Down Expand Up @@ -71,6 +72,7 @@
"@open-pioneer/build-support": "catalog:",
"@open-pioneer/runtime": "workspace:^",
"@open-pioneer/vite-plugin-pioneer": "catalog:",
"@open-pioneer/check-pnpm-duplicates": "catalog:",
"@testing-library/dom": "catalog:",
"@testing-library/jest-dom": "catalog:",
"@testing-library/react": "catalog:",
Expand Down
738 changes: 738 additions & 0 deletions pnpm-lock.yaml

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions pnpm-workspace.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ catalog:
"@open-pioneer/build-package-cli": ^2.1.0
"@open-pioneer/build-support": ^2.0.2
"@open-pioneer/vite-plugin-pioneer": ^3.0.4
"@open-pioneer/check-pnpm-duplicates": "^0.1.0"
"@testing-library/dom": ^10.4.0
"@testing-library/jest-dom": ^6.4.8
"@testing-library/react": ^16.0.0
Expand Down
2 changes: 1 addition & 1 deletion src/packages/authentication-keycloak/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"scripts": {
"build": "build-pioneer-package"
},
"peerDependencies": {
"dependencies": {
"@conterra/reactivity-core": "catalog:",
"@open-pioneer/authentication": "workspace:^",
"@open-pioneer/runtime": "workspace:^",
Expand Down
2 changes: 1 addition & 1 deletion src/packages/authentication/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"scripts": {
"build": "build-pioneer-package"
},
"peerDependencies": {
"dependencies": {
"@open-pioneer/core": "workspace:^",
"@open-pioneer/runtime": "workspace:^",
"@open-pioneer/chakra-integration": "workspace:^",
Expand Down
2 changes: 1 addition & 1 deletion src/packages/base-theme/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"scripts": {
"build": "build-pioneer-package"
},
"peerDependencies": {
"dependencies": {
"@open-pioneer/chakra-integration": "workspace:^"
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion src/packages/chakra-integration/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"scripts": {
"build": "build-pioneer-package"
},
"peerDependencies": {
"dependencies": {
"@chakra-ui/react": "catalog:",
"@emotion/cache": "catalog:",
"@emotion/react": "catalog:",
Expand Down
2 changes: 1 addition & 1 deletion src/packages/http/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"scripts": {
"build": "build-pioneer-package"
},
"peerDependencies": {
"dependencies": {
"@open-pioneer/runtime": "workspace:^",
"@open-pioneer/core": "workspace:^"
},
Expand Down
2 changes: 1 addition & 1 deletion src/packages/integration/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"scripts": {
"build": "build-pioneer-package"
},
"peerDependencies": {
"dependencies": {
"@open-pioneer/runtime": "workspace:^"
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion src/packages/local-storage/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"scripts": {
"build": "build-pioneer-package"
},
"peerDependencies": {
"dependencies": {
"@open-pioneer/core": "workspace:^",
"@open-pioneer/runtime": "workspace:^"
},
Expand Down
2 changes: 1 addition & 1 deletion src/packages/notifier/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"scripts": {
"build": "build-pioneer-package"
},
"peerDependencies": {
"dependencies": {
"@open-pioneer/core": "workspace:^",
"@open-pioneer/chakra-integration": "workspace:^",
"@chakra-ui/icons": "catalog:",
Expand Down
2 changes: 1 addition & 1 deletion src/packages/react-utils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"scripts": {
"build": "build-pioneer-package"
},
"peerDependencies": {
"dependencies": {
"@open-pioneer/chakra-integration": "workspace:^",
"@open-pioneer/core": "workspace:^",
"classnames": "catalog:",
Expand Down
2 changes: 1 addition & 1 deletion src/packages/reactivity/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"scripts": {
"build": "build-pioneer-package"
},
"peerDependencies": {
"dependencies": {
"react": "catalog:",
"@conterra/reactivity-core": "catalog:"
},
Expand Down
2 changes: 1 addition & 1 deletion src/packages/runtime-react-support/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"scripts": {
"build": "build-pioneer-package"
},
"peerDependencies": {
"dependencies": {
"react": "catalog:"
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion src/packages/runtime/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"scripts": {
"build": "build-pioneer-package"
},
"peerDependencies": {
"dependencies": {
"@formatjs/intl": "catalog:",
"@open-pioneer/base-theme": "workspace:^",
"@open-pioneer/chakra-integration": "workspace:^",
Expand Down
2 changes: 1 addition & 1 deletion src/packages/test-utils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"scripts": {
"build": "build-pioneer-package"
},
"peerDependencies": {
"dependencies": {
"@open-pioneer/runtime-react-support": "workspace:^",
"@testing-library/react": "catalog:",
"react": "catalog:",
Expand Down
22 changes: 22 additions & 0 deletions support/duplicate-packages.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# This is the configuration file for the check-pnpm-duplicates CLI.
# See <https://www.npmjs.com/package/@open-pioneer/check-pnpm-duplicates> for more details.

# Ignore any duplicates in devDependencies.
skipDevDependencies: true

# List of packages that are allowed to have duplicates.
#
# You can list packages here that do not cause issues when they are present multiple times in your project.
# You SHOULD NOT list central dependencies here, such as react or any trails packages.
allowed:
- "ansi-styles"
- "chalk"
- "color-convert"
- "color-name"
- "escape-string-regexp"
- "has-flag"
- "react-is"
- "source-map"
- "stylis"
- "supports-color"
- "tslib"

0 comments on commit 2fbaaa0

Please sign in to comment.