Skip to content

Commit 1a22c4a

Browse files
authored
Merge pull request #1 from ReforgeHQ/mfaga-release-script
feat: set version to 0.0.0-pre.0
2 parents b853e2d + dc104db commit 1a22c4a

6 files changed

Lines changed: 134 additions & 50 deletions

File tree

.github/workflows/release.yaml

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
name: Release Package
2+
on:
3+
push:
4+
branches: [main]
5+
jobs:
6+
check-version:
7+
runs-on: ubuntu-latest
8+
outputs:
9+
version-changed: ${{ steps.check.outputs.changed }}
10+
current-version: ${{ steps.check.outputs.current-version }}
11+
previous-version: ${{ steps.check.outputs.previous-version }}
12+
steps:
13+
- uses: actions/checkout@v4
14+
with:
15+
fetch-depth: 2
16+
- name: Check if version changed
17+
id: check
18+
run: |
19+
current_version=$(jq -r '.version' package.json)
20+
previous_version=$(git show HEAD~1:package.json | jq -r '.version')
21+
22+
echo "current-version=$current_version" >> $GITHUB_OUTPUT
23+
echo "previous-version=$previous_version" >> $GITHUB_OUTPUT
24+
25+
if [ "$current_version" != "$previous_version" ]; then
26+
echo "Version changed from $previous_version to $current_version"
27+
echo "changed=true" >> $GITHUB_OUTPUT
28+
else
29+
echo "Version unchanged: $current_version"
30+
echo "changed=false" >> $GITHUB_OUTPUT
31+
fi
32+
33+
build-and-publish:
34+
runs-on: ubuntu-latest
35+
needs: check-version
36+
if: needs.check-version.outputs.version-changed == 'true'
37+
permissions:
38+
contents: read
39+
id-token: write
40+
outputs:
41+
published-version: ${{ needs.check-version.outputs.current-version }}
42+
steps:
43+
- uses: actions/checkout@v4
44+
# Setup .npmrc file to publish to npm
45+
- uses: actions/setup-node@v4
46+
with:
47+
node-version-file: ".tool-versions"
48+
registry-url: "https://registry.npmjs.org"
49+
- run: npm ci
50+
- run: npm run build
51+
- run: npm publish --provenance --access public
52+
env:
53+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
54+
55+
create-release:
56+
runs-on: ubuntu-latest
57+
needs: [check-version, build-and-publish]
58+
if: needs.build-and-publish.result == 'success'
59+
permissions:
60+
contents: write
61+
steps:
62+
- uses: actions/checkout@v4
63+
- name: Create Release
64+
uses: actions/create-release@v1
65+
env:
66+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
67+
with:
68+
tag_name: v${{ needs.check-version.outputs.current-version }}
69+
release_name: v${{ needs.check-version.outputs.current-version }}
70+
body: |
71+
See [CHANGELOG](https://github.com/reforgehq/sdk-javascript/blob/main/CHANGELOG.md) for details.
72+
73+
Published to npm: [@reforge-com/javascript@${{ needs.check-version.outputs.current-version }}](https://www.npmjs.com/package/@reforge-com/javascript/v/${{ needs.check-version.outputs.current-version }})
74+
draft: false
75+
prerelease: false

CHANGELOG.md

Lines changed: 47 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,159 +1,168 @@
11
# Changelog
22

3-
## 0.4.5 - 2025-05-22
3+
## 0.0.0-pre.0 - 2025-08-03
4+
5+
- Reforge rebrand
6+
7+
# @prefab-cloud/prefab-cloud-js
8+
9+
All releases below were released as part of the
10+
[@prefab-cloud/prefab-cloud-js](https://github.com/prefab-cloud/prefab-cloud-js) package.
11+
12+
## @prefab-cloud/prefab-cloud-js 0.4.5 - 2025-05-22
413

514
- Extra error handling for loader and telemetry uploader
615

7-
## 0.4.4 - 2025-04-10
16+
## @prefab-cloud/prefab-cloud-js 0.4.4 - 2025-04-10
817

918
- Silently handle Telemetry AbortErrors (#70)
1019

11-
## 0.4.3 - 2025-03-12
20+
## @prefab-cloud/prefab-cloud-js 0.4.3 - 2025-03-12
1221

1322
- Use tsup for better ESM/CJS compatibility
1423

15-
## 0.4.2 - 2024-09-12
24+
## @prefab-cloud/prefab-cloud-js 0.4.2 - 2024-09-12
1625

1726
- Allow reading bootstrapped data on `window` (#67)
1827

19-
## 0.4.1 - 2024-08-27
28+
## @prefab-cloud/prefab-cloud-js 0.4.1 - 2024-08-27
2029

2130
- Failover to waistband if belt and suspenders are down (#66)
2231

23-
## 0.4.0 - 2024-08-21
32+
## @prefab-cloud/prefab-cloud-js 0.4.0 - 2024-08-21
2433

2534
- Support v2 evaluation endpoint / global delivery (#63)
2635

27-
## 0.3.5 - 2024-08-20
36+
## @prefab-cloud/prefab-cloud-js 0.3.5 - 2024-08-20
2837

2938
- Handle non-Latin1 characters in Base64 encoding (#65)
3039

31-
## 0.3.4 - 2024-07-18
40+
## @prefab-cloud/prefab-cloud-js 0.3.4 - 2024-07-18
3241

3342
- Fixes error when uploading eval telemetry for stringList values
3443

35-
## 0.3.3 - 2024-07-17
44+
## @prefab-cloud/prefab-cloud-js 0.3.3 - 2024-07-17
3645

3746
- Reduces volume of internal logging done by telemetry uploader
3847

39-
## 0.3.2 - 2024-07-16
48+
## @prefab-cloud/prefab-cloud-js 0.3.2 - 2024-07-16
4049

4150
- Adds validation console errors for Context object
4251

43-
## 0.3.1 - 2024-07-10
52+
## @prefab-cloud/prefab-cloud-js 0.3.1 - 2024-07-10
4453

4554
- Adds collectContextMode option to control context telemetry
4655
- Tries to flush telemetry when browser window closes
4756
- Improves prefix for internal logger names
4857

49-
## 0.3.0 - 2024-06-04
58+
## @prefab-cloud/prefab-cloud-js 0.3.0 - 2024-06-04
5059

5160
- collectEvaluationSummaries is now opt-out (#51)
5261

53-
## 0.2.6 - 2024-05-31
62+
## @prefab-cloud/prefab-cloud-js 0.2.6 - 2024-05-31
5463

5564
- Fix JSON parsing regression (#50)
5665

57-
## 0.2.5 - 2024-05-31
66+
## @prefab-cloud/prefab-cloud-js 0.2.5 - 2024-05-31
5867

5968
- Add support for durations (#49)
6069

61-
## 0.2.4 - 2024-05-03
70+
## @prefab-cloud/prefab-cloud-js 0.2.4 - 2024-05-03
6271

6372
- Add support for JSON config values
6473

65-
## 0.2.3 - 2024-01-24
74+
## @prefab-cloud/prefab-cloud-js 0.2.3 - 2024-01-24
6675

6776
- Add bundled/minified version
6877

69-
## 0.2.2 - 2024-01-17
78+
## @prefab-cloud/prefab-cloud-js 0.2.2 - 2024-01-17
7079

7180
- Updates to errors and warnings
7281

73-
## 0.2.1 - 2024-01-11
82+
## @prefab-cloud/prefab-cloud-js 0.2.1 - 2024-01-11
7483

7584
- Fix default endpoint for telemetry
7685

77-
## 0.2.0 - 2023-12-12
86+
## @prefab-cloud/prefab-cloud-js 0.2.0 - 2023-12-12
7887

7988
- Remove Identity (#38)
8089
- Add `updateContext` (#39)
8190

82-
## 0.1.19 - 2023-12-11
91+
## @prefab-cloud/prefab-cloud-js 0.1.19 - 2023-12-11
8392

8493
- Accept a client version string so React client can identify correctly
8594

86-
## 0.1.18 - 2023-10-31
95+
## @prefab-cloud/prefab-cloud-js 0.1.18 - 2023-10-31
8796

8897
- Start reporting known loggers telemetry
8998

90-
## 0.1.16 - 2023-10-23
99+
## @prefab-cloud/prefab-cloud-js 0.1.16 - 2023-10-23
91100

92101
- Start reporting evaluation telemetry when keys are actually used
93102

94-
## 0.1.15 - 2023-09-20
103+
## @prefab-cloud/prefab-cloud-js 0.1.15 - 2023-09-20
95104

96105
- Add support for a `afterEvaluationCallback` callback for forwarding evaluation events to analytics
97106
tools, etc.
98107

99-
## 0.1.14 - 2023-07-11
108+
## @prefab-cloud/prefab-cloud-js 0.1.14 - 2023-07-11
100109

101110
- Call stopPolling() when calling poll() (#25)
102111

103-
## 0.1.13 - 2023-07-11
112+
## @prefab-cloud/prefab-cloud-js 0.1.13 - 2023-07-11
104113

105114
- Fix bug with poll canceling (#23)
106115

107-
## 0.1.12 - 2023-07-11
116+
## @prefab-cloud/prefab-cloud-js 0.1.12 - 2023-07-11
108117

109118
- Reset polling on init (#21)
110119

111-
## 0.1.11 - 2023-07-03
120+
## @prefab-cloud/prefab-cloud-js 0.1.11 - 2023-07-03
112121

113122
- Support polling via `reforge.poll({frequencyInMs})` (#16)
114123

115-
## 0.1.10 - 2023-06-27
124+
## @prefab-cloud/prefab-cloud-js 0.1.10 - 2023-06-27
116125

117126
- Properly consider root logger (#11)
118127

119-
## 0.1.9 - 2023-06-27
128+
## @prefab-cloud/prefab-cloud-js 0.1.9 - 2023-06-27
120129

121130
- Add `shouldLog` for dynamic log levels (#10)
122131

123-
## [0.1.8] - 2023-05-01
132+
## @prefab-cloud/prefab-cloud-js [0.1.8] - 2023-05-01
124133

125134
- Version bump for NPM
126135

127-
## [0.1.7] - 2023-05-01
136+
## @prefab-cloud/prefab-cloud-js [0.1.7] - 2023-05-01
128137

129138
- Support `Context` and deprecate `Identity`
130139

131-
## [0.1.6] - 2023-04-28
140+
## @prefab-cloud/prefab-cloud-js [0.1.6] - 2023-04-28
132141

133142
- Version bump for NPM
134143

135-
## [0.1.5] - 2023-03-16
144+
## @prefab-cloud/prefab-cloud-js [0.1.5] - 2023-03-16
136145

137146
- Export cleanup
138147

139-
## [0.1.4] - 2023-03-16
148+
## @prefab-cloud/prefab-cloud-js [0.1.4] - 2023-03-16
140149

141150
- No default export
142151

143-
## [0.1.3] - 2022-09-29
152+
## @prefab-cloud/prefab-cloud-js [0.1.3] - 2022-09-29
144153

145154
- Simpler API endpoint URL for eval (#6)
146155

147-
## [0.1.2] - 2022-08-18
156+
## @prefab-cloud/prefab-cloud-js [0.1.2] - 2022-08-18
148157

149158
- Fix types for published package
150159

151-
## [0.1.1] - 2022-08-18
160+
## @prefab-cloud/prefab-cloud-js [0.1.1] - 2022-08-18
152161

153162
- Allow specifying a timeout for `fetch` (#5)
154163
- Simplify `setConfig` (#3)
155164
- Add types (#2)
156165

157-
## [0.1.0] - 2022-08-12
166+
## @prefab-cloud/prefab-cloud-js [0.1.0] - 2022-08-12
158167

159168
- First working commit (#1)

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
# @reforge-com/sdk-javascript
1+
# @reforge-com/javascript
22

33
A client for [Reforge]
44

55
## Installation
66

7-
`npm install @reforge-com/sdk-javascript` or `yarn add @reforge-com/sdk-javascript`
7+
`npm install @reforge-com/javascript` or `yarn add @reforge-com/javascript`
88

99
If you'd prefer to use the standalone `<script>` tag approach, we recommend using
1010
[jsDelivr][jsDelivr] for a minified/bundled version.
@@ -14,7 +14,7 @@ If you'd prefer to use the standalone `<script>` tag approach, we recommend usin
1414
Initialize reforge with your api key and a `Context` for the current user/visitor/device/request:
1515

1616
```javascript
17-
import { reforge, Context } from "@reforge-com/sdk-javascript";
17+
import { reforge, Context } from "@reforge-com/javascript";
1818

1919
const options = {
2020
apiKey: "1234",
@@ -151,7 +151,7 @@ it("shows the turbo button when the feature is enabled", () => {
151151
```
152152
153153
[Reforge]: https://www.prefab.cloud/
154-
[jsDelivr]: https://www.jsdelivr.com/package/npm/@reforge-com/sdk-javascript
154+
[jsDelivr]: https://www.jsdelivr.com/package/npm/@reforge-com/javascript
155155
156156
## Release Scripts
157157
@@ -192,5 +192,5 @@ This script:
192192
To install the pre-release version:
193193
194194
```bash
195-
npm install @reforge-com/sdk-javascript@pre
195+
npm install @reforge-com/javascript@pre
196196
```

package-lock.json

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
2-
"name": "@reforge-com/sdk-javascript",
3-
"version": "0.4.5",
2+
"name": "@reforge-com/javascript",
3+
"version": "0.0.0-pre.0",
44
"description": "Feature Flags & Dynamic Configuration as a Service",
55
"main": "dist/index.cjs",
66
"module": "dist/index.mjs",

publish-prerelease.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@ npm run build
1414
npm publish --tag pre
1515

1616
echo "Pre-release published successfully! To install it, use:"
17-
echo "npm install @reforge-com/sdk-javascript@pre"
17+
echo "npm install @reforge-com/javascript@pre"

0 commit comments

Comments
 (0)