Skip to content

Commit ef3ba21

Browse files
authored
chore: loosen peer dependency requirements, remove some ci automation (#1080)
Signed-off-by: Todd Baert <[email protected]>
1 parent a3469b6 commit ef3ba21

File tree

5 files changed

+17
-26
lines changed

5 files changed

+17
-26
lines changed

.github/workflows/audit-pending-releases.yml

-15
Original file line numberDiff line numberDiff line change
@@ -32,18 +32,3 @@ jobs:
3232
node-version: 18
3333
registry-url: "https://registry.npmjs.org"
3434
cache: 'npm'
35-
36-
# if this is an @openfeature/core release, but the SDKs to use this version as a peer, and commit back
37-
- name: Update Peer Version in Dependants
38-
if: ${{ endsWith(github.ref_name, env.CORE_PACKAGE) }}
39-
run: |
40-
npm run update-core-peers && \
41-
! git diff-files --quiet && \
42-
( echo 'Updated peer dependency in dependents, committing...'
43-
git add --all && \
44-
git config user.name "openfeature-peer-update-bot" && \
45-
git config user.email "[email protected]" && \
46-
git commit -m 'fix: bump @openfeature/${{ env.CORE_PACKAGE }} peer' -s && \
47-
git push ) || echo 'Peer dependency in dependents is already up to date.'
48-
env:
49-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

CONTRIBUTING.md

+10
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,16 @@ on each other), the owner should try to get people aligned by:
120120
- If none of the above worked and the PR has been stuck for more than 2 weeks,
121121
the owner should bring it to the OpenFeatures [meeting](README.md#contributing).
122122

123+
## Releasing
124+
125+
As with most OpenFeature repos, release-please supports our release process.
126+
For this SDK specifically, keep in mind this is a monorepo with dependencies with between components.
127+
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.
128+
For example, if there are pending releases for: `@openfeature/core`, `@openfeature/web-sdk` and `@openfeature/react-sdk`, release them in that order.
129+
130+
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.
131+
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.
132+
123133
## Design Choices
124134

125135
As with other OpenFeature SDKs, js-sdk follows the

package.json

+1-3
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,7 @@
1313
"clean": "shx rm -rf ./dist",
1414
"build": "npm run build --workspace=packages/shared --workspace=packages/server --workspace=packages/web --workspace=packages/react --workspace=packages/angular --workspace=packages/nest",
1515
"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",
16-
"docs": "typedoc",
17-
"core-version": "npm run version --workspace=packages/shared",
18-
"update-core-peers": "export OPENFEATURE_CORE_VERSION=$(npm run --silent core-version) && npm run update-core-peer --workspace=packages/server --workspace=packages/web"
16+
"docs": "typedoc"
1917
},
2018
"repository": {
2119
"type": "git",

packages/server/package.json

+3-4
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,7 @@
2525
"postbuild": "shx cp ./../../package.esm.json ./dist/esm/package.json",
2626
"current-version": "echo $npm_package_version",
2727
"prepack": "shx cp ./../../LICENSE ./LICENSE",
28-
"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",
29-
"update-core-peer": "npm install --save-peer --save-exact @openfeature/core@$OPENFEATURE_CORE_VERSION"
28+
"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"
3029
},
3130
"repository": {
3231
"type": "git",
@@ -49,9 +48,9 @@
4948
"node": ">=18"
5049
},
5150
"peerDependencies": {
52-
"@openfeature/core": "1.5.0"
51+
"@openfeature/core": "^1.5.0"
5352
},
5453
"devDependencies": {
55-
"@openfeature/core": "1.5.0"
54+
"@openfeature/core": "^1.5.0"
5655
}
5756
}

packages/web/package.json

+3-4
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,7 @@
2525
"postbuild": "shx cp ./../../package.esm.json ./dist/esm/package.json",
2626
"current-version": "echo $npm_package_version",
2727
"prepack": "shx cp ./../../LICENSE ./LICENSE",
28-
"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",
29-
"update-core-peer": "npm install --save-peer --save-exact @openfeature/core@$OPENFEATURE_CORE_VERSION"
28+
"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"
3029
},
3130
"repository": {
3231
"type": "git",
@@ -47,9 +46,9 @@
4746
},
4847
"homepage": "https://github.com/open-feature/js-sdk#readme",
4948
"peerDependencies": {
50-
"@openfeature/core": "1.5.0"
49+
"@openfeature/core": "^1.5.0"
5150
},
5251
"devDependencies": {
53-
"@openfeature/core": "1.5.0"
52+
"@openfeature/core": "^1.5.0"
5453
}
5554
}

0 commit comments

Comments
 (0)