Skip to content

Commit d037295

Browse files
authored
Add changeset and fix type exports (#58)
* export shared types * add changesets * make changelog compatible * add actions * change npm install * setup node * fix typo * change action name * add release script * add changeset * change access to public npm registry
1 parent 9430467 commit d037295

File tree

8 files changed

+3792
-152
lines changed

8 files changed

+3792
-152
lines changed

.changeset/config.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"$schema": "https://unpkg.com/@changesets/config@2.3.0/schema.json",
3+
"changelog": "@changesets/cli/changelog",
4+
"commit": false,
5+
"fixed": [],
6+
"linked": [],
7+
"access": "public",
8+
"baseBranch": "master",
9+
"updateInternalDependencies": "patch",
10+
"ignore": []
11+
}

.changeset/small-rings-worry.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'opticks': patch
3+
---
4+
5+
:house: Automate versioning and releasing and export types from optimizely integration
Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,20 @@
1-
name: Test
2-
1+
name: Main
32
on:
43
push:
5-
branches: ['master']
6-
pull_request:
7-
branches: ['master']
4+
branches:
5+
- '**'
86

97
jobs:
108
build:
119
runs-on: ubuntu-latest
12-
1310
steps:
1411
- uses: actions/checkout@v3
15-
- name: Tests
12+
- name: Setup Node
1613
uses: actions/setup-node@v3
1714
with:
1815
node-version: '16.13.1'
1916
cache: 'npm'
17+
2018
- run: npm i
2119
- run: npm run build
2220
- run: npm test

.github/workflows/publish.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Publish
2+
on:
3+
push:
4+
branches:
5+
- 'main'
6+
7+
concurrency: ${{ github.workflow }}-${{ github.ref }}
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v3
14+
- uses: actions/setup-node@v3
15+
with:
16+
node-version: '16.13.1'
17+
cache: 'npm'
18+
19+
- run: npm i
20+
- name: Create Release Pull Request or Publish
21+
id: changesets
22+
uses: changesets/action@v1
23+
with:
24+
publish: npm run release
25+
env:
26+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
27+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

CHANGELOG.md

Lines changed: 20 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,64 +1,54 @@
11
# Changelog
22

3-
> **Tags:**
4-
>
5-
> - :boom: [Breaking Change]
6-
> - :eyeglasses: [Spec Compliancy]
7-
> - :rocket: [New Feature]
8-
> - :bug: [Bug Fix]
9-
> - :memo: [Documentation]
10-
> - :house: [Internal]
11-
> - :nail_care: [Polish]
12-
13-
# v4.0.2
3+
## v4.0.2
144

155
- :house: Run build before NPM publish
166

17-
# v4.0.1
7+
## v4.0.1
188

199
- :nail_care: Fix types for initialize and addActivateListener
2010

21-
# v4.0.0
11+
## v4.0.0
2212

2313
- :boom: Migrate from Flow -> TypeScript
2414
- :memo: Document and type the Optimizely integration
2515
- :boom: Deprecate the Simple integration, still functions but won't be improved
2616
- :boom: Deprecate `booleanToggle`, as the `toggle` supports both feature flags and MVT experiments
2717

28-
# v3.3.3
18+
## v3.3.3
2919

3020
- :nail_care: Update JSCodeShift to 0.14.0
3121

32-
# v3.3.2
22+
## v3.3.2
3323

3424
- :nail_care: Remove overridable parser flag in clean:toggle and clean:booleanToggle
3525

36-
# v3.3.1
26+
## v3.3.1
3727

3828
- :house: Make JSCodeShift parser configurable
3929

40-
# v3.3.0
30+
## v3.3.0
4131

4232
- :rocket: Add getEnabledFeatures method.
4333

44-
# v3.2.0
34+
## v3.2.0
4535

4636
- :bug: Fix for Optimizely 4.2.1 `isUserInRolloutAudience`
4737

48-
# v3.1.0
38+
## v3.1.0
4939

5040
- :house: Pin Optimizely SDK version to 4.2.1
5141
- :house: Update unit tests
5242

53-
# v3.0.0
43+
## v3.0.0
5444

5545
- :boom: Support for Optimizely Rollouts with feature toggles
5646
- :boom: Update to Optimizely SDK 4.2.1
5747
- :boom: `toggle` now detrmines whether to use booleanToggles or multiToggles based on the amount of arguments passed
5848

59-
# v2.0.0
49+
## v2.0.0
6050

61-
## Optimizely Integration
51+
### Optimizely Integration
6252

6353
- :boom: Rename multiToggle -> toggle and promote it as default toggle
6454
- :rocket: Add resetAudienceSegmentationAttributes
@@ -68,37 +58,37 @@
6858
- :boom: Use `activate`, with a convention of using keys with value `a`, `b`, `c` etc - instead of using `getFeatureVariableString`. This is not a breaking change for the `toggle` API but simplifies the dataFile, check the supplied example on how to set up your experiments.
6959
- :eyeglasses: The supported version of the Optimizely SDK is now 3.0.1
7060

71-
# v1.5.0
61+
## v1.5.0
7262

7363
- :boom: Bundle as a CommonJS module instead of ES6 for Node JS support #16
7464

75-
# v1.4.0
65+
## v1.4.0
7666

7767
- :boom: (:bug: ?) Optimizely Integration: Forced toggles are now retained after setting audience segmentation attributes #14
7868

79-
# v1.3.0
69+
## v1.3.0
8070

8171
- :rocket: Optimizely Integration: Allow setting / overriding individual audience segmentation attributes #11
8272
- :memo: Optimizely Integration: Document DataFile specifics
8373

84-
# v1.2.1
74+
## v1.2.1
8575

8676
- :memo: Codemod documentation
8777
- :bug: Codemods now only remove imports for toggles being removed
8878

89-
# v1.2.0
79+
## v1.2.0
9080

9181
- :memo: Optimizely Integration: Example datafile for audience segmentation
9282
- :boom: Optimizely Integration: Rename setUserAttributes -> setAudienceSegmentationAttributes
9383

94-
# v1.1.0
84+
## v1.1.0
9585

9686
- :rocket: Optimizely Integration: Add capability to force toggles
9787

98-
# v1.0.1
88+
## v1.0.1
9989

10090
- :bug: Missing Flow Type exports
10191

102-
# v1.0.0
92+
## v1.0.0
10393

10494
- Initial release

0 commit comments

Comments
 (0)