flagsmith-nodejs 6.1.0 → 6.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/workflows/conventional-commit.yml +29 -0
- package/.github/workflows/publish.yml +17 -17
- package/.github/workflows/pull_request.yaml +33 -33
- package/.github/workflows/release-please.yml +18 -0
- package/.gitmodules +1 -0
- package/.prettierrc.cjs +9 -1
- package/.release-please-manifest.json +1 -0
- package/CHANGELOG.md +552 -0
- package/CODEOWNERS +1 -0
- package/README.md +0 -2
- package/build/cjs/sdk/analytics.js +3 -1
- package/build/cjs/sdk/index.js +41 -5
- package/build/cjs/sdk/utils.d.ts +1 -0
- package/build/cjs/sdk/utils.js +14 -1
- package/build/esm/sdk/analytics.js +3 -1
- package/build/esm/sdk/index.js +42 -6
- package/build/esm/sdk/utils.d.ts +1 -0
- package/build/esm/sdk/utils.js +12 -0
- package/package.json +1 -1
- package/release-please-config.json +62 -0
- package/sdk/analytics.ts +3 -1
- package/sdk/index.ts +53 -7
- package/sdk/utils.ts +13 -0
- package/tests/engine/unit/engine.test.ts +0 -1
- package/tests/sdk/analytics.test.ts +6 -1
- package/tests/sdk/flagsmith-environment-flags.test.ts +28 -0
- package/tests/sdk/flagsmith-identity-flags.test.ts +11 -2
- package/tests/sdk/flagsmith.test.ts +162 -1
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
name: Conventional Commit
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
pull_request:
|
|
5
|
+
types:
|
|
6
|
+
- edited
|
|
7
|
+
- opened
|
|
8
|
+
|
|
9
|
+
jobs:
|
|
10
|
+
conventional-commit:
|
|
11
|
+
name: Conventional Commit
|
|
12
|
+
runs-on: ubuntu-latest
|
|
13
|
+
steps:
|
|
14
|
+
- name: Check PR Conventional Commit title
|
|
15
|
+
uses: amannn/action-semantic-pull-request@v5
|
|
16
|
+
env:
|
|
17
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
18
|
+
with:
|
|
19
|
+
types: | # mirrors changelog-sections in the /release-please-config.json
|
|
20
|
+
feat
|
|
21
|
+
fix
|
|
22
|
+
infra
|
|
23
|
+
ci
|
|
24
|
+
docs
|
|
25
|
+
deps
|
|
26
|
+
perf
|
|
27
|
+
refactor
|
|
28
|
+
test
|
|
29
|
+
chore
|
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
name: Publish NPM Package
|
|
2
2
|
|
|
3
3
|
on:
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
push:
|
|
5
|
+
tags:
|
|
6
|
+
- '*'
|
|
7
7
|
|
|
8
8
|
jobs:
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
package:
|
|
10
|
+
runs-on: ubuntu-latest
|
|
11
|
+
name: Publish NPM Package
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
steps:
|
|
14
|
+
- name: Cloning repo
|
|
15
|
+
uses: actions/checkout@v3
|
|
16
16
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
17
|
+
- uses: actions/setup-node@v4
|
|
18
|
+
with:
|
|
19
|
+
node-version: '18.x'
|
|
20
|
+
registry-url: 'https://registry.npmjs.org'
|
|
21
21
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
22
|
+
- run: npm ci
|
|
23
|
+
- run: npm run deploy
|
|
24
|
+
env:
|
|
25
|
+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
@@ -1,37 +1,37 @@
|
|
|
1
1
|
name: Unit/Integration Tests
|
|
2
2
|
|
|
3
3
|
on:
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
4
|
+
pull_request:
|
|
5
|
+
types:
|
|
6
|
+
- opened
|
|
7
|
+
- synchronize
|
|
8
|
+
- reopened
|
|
9
|
+
- ready_for_review
|
|
10
|
+
push:
|
|
11
|
+
branches:
|
|
12
|
+
- main
|
|
13
13
|
jobs:
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
14
|
+
build-and-test:
|
|
15
|
+
strategy:
|
|
16
|
+
matrix:
|
|
17
|
+
node-version: [18.x, 20.x, 22.x]
|
|
18
|
+
runs-on: ubuntu-latest
|
|
19
|
+
steps:
|
|
20
|
+
- uses: actions/checkout@v4
|
|
21
|
+
with:
|
|
22
|
+
submodules: true
|
|
23
|
+
- uses: actions/setup-node@v4
|
|
24
|
+
with:
|
|
25
|
+
node-version: '${{ matrix.node-version }}'
|
|
26
|
+
- name: cache node modules
|
|
27
|
+
uses: actions/cache@v4
|
|
28
|
+
with:
|
|
29
|
+
path: ~/.npm # npm cache files are stored in `~/.npm` on Linux/macOS
|
|
30
|
+
key: npm-${{ matrix.node-version }}-${{ hashFiles('package-lock.json') }}
|
|
31
|
+
restore-keys: |
|
|
32
|
+
npm-${{ matrix.node-version }}-${{ hashFiles('package-lock.json') }}
|
|
33
|
+
npm-
|
|
34
|
+
- run: npm ci
|
|
35
|
+
- run: npm test
|
|
36
|
+
env:
|
|
37
|
+
CI: true
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
name: Update release PR
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches:
|
|
6
|
+
- main
|
|
7
|
+
|
|
8
|
+
permissions:
|
|
9
|
+
contents: write
|
|
10
|
+
pull-requests: write
|
|
11
|
+
|
|
12
|
+
jobs:
|
|
13
|
+
release-please:
|
|
14
|
+
runs-on: ubuntu-latest
|
|
15
|
+
steps:
|
|
16
|
+
- uses: googleapis/release-please-action@v4
|
|
17
|
+
with:
|
|
18
|
+
token: ${{ secrets.RELEASE_PLEASE_GITHUB_TOKEN }}
|
package/.gitmodules
CHANGED
package/.prettierrc.cjs
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{".":"6.2.0"}
|