Skip to content

chore: loosen peer dependency requirements, remove some ci automation #1080

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Nov 7, 2024
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
15 changes: 0 additions & 15 deletions .github/workflows/audit-pending-releases.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,18 +32,3 @@ jobs:
node-version: 18
registry-url: "https://registry.npmjs.org"
cache: 'npm'

# if this is an @openfeature/core release, but the SDKs to use this version as a peer, and commit back
- name: Update Peer Version in Dependants
if: ${{ endsWith(github.ref_name, env.CORE_PACKAGE) }}
run: |
npm run update-core-peers && \
! git diff-files --quiet && \
( echo 'Updated peer dependency in dependents, committing...'
git add --all && \
git config user.name "openfeature-peer-update-bot" && \
git config user.email "[email protected]" && \
git commit -m 'fix: bump @openfeature/${{ env.CORE_PACKAGE }} peer' -s && \
git push ) || echo 'Peer dependency in dependents is already up to date.'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
10 changes: 10 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,16 @@ on each other), the owner should try to get people aligned by:
- If none of the above worked and the PR has been stuck for more than 2 weeks,
the owner should bring it to the OpenFeatures [meeting](README.md#contributing).

## Releasing

As with most OpenFeature repos, release-please supports our release process.
For this SDK specifically, keep in mind this is a monorepo with dependencies with between components.
If there are multiple release PRs open, ensure that you release them in order consistent with their dependency graph, waiting for each to fully complete.
For example, if there are pending releases for: `@openfeature/core`, `@openfeature/web-sdk` and `@openfeature/react-sdk`, release them in that order.

Also ensure that if there are changes in an artifact which depend on changes in a dependency, that you reflect that in the `peerDependencies` field.
For example, if a new release of `@openfeature/web-sdk` depends on features added in `@openfeature/core`, update the required minimum version of the `@openfeature/core` peer in the `@openfeature/web-sdk` package.json.

## Design Choices

As with other OpenFeature SDKs, js-sdk follows the
Expand Down
4 changes: 1 addition & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,7 @@
"clean": "shx rm -rf ./dist",
"build": "npm run build --workspace=packages/shared --workspace=packages/server --workspace=packages/web --workspace=packages/react --workspace=packages/angular --workspace=packages/nest",
"publish-all": "npm run publish-if-not-exists --workspace=packages/shared --workspace=packages/server --workspace=packages/web --workspace=packages/react --workspace=packages/angular --workspace=packages/nest",
"docs": "typedoc",
"core-version": "npm run version --workspace=packages/shared",
"update-core-peers": "export OPENFEATURE_CORE_VERSION=$(npm run --silent core-version) && npm run update-core-peer --workspace=packages/server --workspace=packages/web"
"docs": "typedoc"
},
"repository": {
"type": "git",
Expand Down
7 changes: 3 additions & 4 deletions packages/server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,7 @@
"postbuild": "shx cp ./../../package.esm.json ./dist/esm/package.json",
"current-version": "echo $npm_package_version",
"prepack": "shx cp ./../../LICENSE ./LICENSE",
"publish-if-not-exists": "cp $NPM_CONFIG_USERCONFIG .npmrc && if [ \"$(npm show $npm_package_name@$npm_package_version version)\" = \"$(npm run current-version -s)\" ]; then echo 'already published, skipping'; else npm publish --access public; fi",
"update-core-peer": "npm install --save-peer --save-exact @openfeature/core@$OPENFEATURE_CORE_VERSION"
"publish-if-not-exists": "cp $NPM_CONFIG_USERCONFIG .npmrc && if [ \"$(npm show $npm_package_name@$npm_package_version version)\" = \"$(npm run current-version -s)\" ]; then echo 'already published, skipping'; else npm publish --access public; fi"
},
"repository": {
"type": "git",
Expand All @@ -49,9 +48,9 @@
"node": ">=18"
},
"peerDependencies": {
"@openfeature/core": "1.5.0"
"@openfeature/core": "^1.5.0"
},
"devDependencies": {
"@openfeature/core": "1.5.0"
"@openfeature/core": "^1.5.0"
}
}
7 changes: 3 additions & 4 deletions packages/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,7 @@
"postbuild": "shx cp ./../../package.esm.json ./dist/esm/package.json",
"current-version": "echo $npm_package_version",
"prepack": "shx cp ./../../LICENSE ./LICENSE",
"publish-if-not-exists": "cp $NPM_CONFIG_USERCONFIG .npmrc && if [ \"$(npm show $npm_package_name@$npm_package_version version)\" = \"$(npm run current-version -s)\" ]; then echo 'already published, skipping'; else npm publish --access public; fi",
"update-core-peer": "npm install --save-peer --save-exact @openfeature/core@$OPENFEATURE_CORE_VERSION"
"publish-if-not-exists": "cp $NPM_CONFIG_USERCONFIG .npmrc && if [ \"$(npm show $npm_package_name@$npm_package_version version)\" = \"$(npm run current-version -s)\" ]; then echo 'already published, skipping'; else npm publish --access public; fi"
},
"repository": {
"type": "git",
Expand All @@ -47,9 +46,9 @@
},
"homepage": "https://github.com/open-feature/js-sdk#readme",
"peerDependencies": {
"@openfeature/core": "1.5.0"
"@openfeature/core": "^1.5.0"
},
"devDependencies": {
"@openfeature/core": "1.5.0"
"@openfeature/core": "^1.5.0"
}
}
Loading