kempo-testing-framework 1.4.0 → 1.4.2
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.
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
name: Publish to npmjs
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches:
|
|
6
|
+
- main
|
|
7
|
+
workflow_dispatch:
|
|
8
|
+
inputs:
|
|
9
|
+
version-type:
|
|
10
|
+
description: 'Version bump type'
|
|
11
|
+
required: true
|
|
12
|
+
type: choice
|
|
13
|
+
options:
|
|
14
|
+
- patch
|
|
15
|
+
- minor
|
|
16
|
+
- major
|
|
17
|
+
default: patch
|
|
18
|
+
|
|
19
|
+
jobs:
|
|
20
|
+
publish:
|
|
21
|
+
runs-on: ubuntu-latest
|
|
22
|
+
permissions:
|
|
23
|
+
contents: write
|
|
24
|
+
id-token: write
|
|
25
|
+
steps:
|
|
26
|
+
- uses: actions/checkout@v4
|
|
27
|
+
with:
|
|
28
|
+
token: ${{ secrets.GITHUB_TOKEN }}
|
|
29
|
+
|
|
30
|
+
- uses: actions/setup-node@v4
|
|
31
|
+
with:
|
|
32
|
+
node-version: '20.x'
|
|
33
|
+
|
|
34
|
+
- run: npm ci
|
|
35
|
+
|
|
36
|
+
- name: Set version type
|
|
37
|
+
id: version
|
|
38
|
+
run: |
|
|
39
|
+
if [ "${{ github.event_name }}" == "workflow_dispatch" ]; then
|
|
40
|
+
echo "type=${{ inputs.version-type }}" >> $GITHUB_OUTPUT
|
|
41
|
+
else
|
|
42
|
+
echo "type=patch" >> $GITHUB_OUTPUT
|
|
43
|
+
fi
|
|
44
|
+
|
|
45
|
+
- name: Bump ${{ steps.version.outputs.type }} version
|
|
46
|
+
run: |
|
|
47
|
+
git config --global user.name "github-actions"
|
|
48
|
+
git config --global user.email "github-actions@github.com"
|
|
49
|
+
npm version ${{ steps.version.outputs.type }} --no-git-tag-version
|
|
50
|
+
git add -A || true
|
|
51
|
+
git commit -m "ci: bump ${{ steps.version.outputs.type }} version [skip ci]" || echo "No changes to commit"
|
|
52
|
+
git push origin HEAD:main || echo "No changes to push"
|
|
53
|
+
env:
|
|
54
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
55
|
+
|
|
56
|
+
- name: Setup .npmrc for OIDC
|
|
57
|
+
run: |
|
|
58
|
+
cat << EOF > ~/.npmrc
|
|
59
|
+
//registry.npmjs.org/:_authToken=\${NPM_TOKEN}
|
|
60
|
+
registry=https://registry.npmjs.org/
|
|
61
|
+
always-auth=true
|
|
62
|
+
EOF
|
|
63
|
+
|
|
64
|
+
- run: npm publish --access public
|
|
65
|
+
env:
|
|
66
|
+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
name: Run Unit Tests
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches:
|
|
6
|
+
- main
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
test:
|
|
10
|
+
runs-on: ubuntu-latest
|
|
11
|
+
steps:
|
|
12
|
+
- uses: actions/checkout@v4
|
|
13
|
+
with:
|
|
14
|
+
token: ${{ secrets.GITHUB_TOKEN }}
|
|
15
|
+
|
|
16
|
+
- uses: actions/setup-node@v4
|
|
17
|
+
with:
|
|
18
|
+
node-version: '20.x'
|
|
19
|
+
|
|
20
|
+
- run: npm ci
|
|
21
|
+
|
|
22
|
+
- name: Run Unit Tests
|
|
23
|
+
run: npm test
|
package/package.json
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "kempo-testing-framework",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.2",
|
|
4
4
|
"description": "The Kempo Testing Framework is a simple testing framework built on the principle that code intended to be ran in the browser should be tested in the browser, code intended to be ran in Node should be tested in Node, and code intended to be ran in both should be tested in both. No mocking, no complexity—just testing.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"bin": {
|
|
7
7
|
"kempo-test": "./index.js"
|
|
8
8
|
},
|
|
9
9
|
"scripts": {
|
|
10
|
-
"
|
|
11
|
-
"
|
|
10
|
+
"test": "npx kempo-test",
|
|
11
|
+
"test:gui": "npx kempo-test --gui"
|
|
12
12
|
},
|
|
13
13
|
"keywords": [],
|
|
14
14
|
"author": "",
|
|
15
15
|
"license": "ISC",
|
|
16
16
|
"type": "module",
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"kempo-css": "^1.
|
|
18
|
+
"kempo-css": "^1.3.11",
|
|
19
19
|
"puppeteer": "^24.9.0"
|
|
20
20
|
},
|
|
21
21
|
"repository": {
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
name: Publish Major Version to npmjs
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
workflow_dispatch:
|
|
5
|
-
|
|
6
|
-
jobs:
|
|
7
|
-
publish:
|
|
8
|
-
runs-on: ubuntu-latest
|
|
9
|
-
permissions:
|
|
10
|
-
contents: write
|
|
11
|
-
id-token: write # enables npm provenance
|
|
12
|
-
steps:
|
|
13
|
-
- uses: actions/checkout@v4
|
|
14
|
-
with:
|
|
15
|
-
token: ${{ secrets.GITHUB_TOKEN }}
|
|
16
|
-
|
|
17
|
-
# Setup Node and create an .npmrc that uses the token from NODE_AUTH_TOKEN
|
|
18
|
-
- uses: actions/setup-node@v4
|
|
19
|
-
with:
|
|
20
|
-
node-version: '20.x'
|
|
21
|
-
registry-url: 'https://registry.npmjs.org'
|
|
22
|
-
|
|
23
|
-
- run: npm ci
|
|
24
|
-
|
|
25
|
-
# Auto-increment major version, commit, and push
|
|
26
|
-
- name: Bump major version
|
|
27
|
-
run: |
|
|
28
|
-
git config --global user.name "github-actions"
|
|
29
|
-
git config --global user.email "github-actions@github.com"
|
|
30
|
-
npm version major --no-git-tag-version
|
|
31
|
-
git add package.json package-lock.json || true
|
|
32
|
-
git commit -m "ci: bump major version [skip ci]" || echo "No changes to commit"
|
|
33
|
-
git push origin HEAD:main || echo "No changes to push"
|
|
34
|
-
env:
|
|
35
|
-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
36
|
-
|
|
37
|
-
- run: npm publish --provenance --access public
|
|
38
|
-
env:
|
|
39
|
-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
name: Publish Minor Version to npmjs
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
workflow_dispatch:
|
|
5
|
-
|
|
6
|
-
jobs:
|
|
7
|
-
publish:
|
|
8
|
-
runs-on: ubuntu-latest
|
|
9
|
-
permissions:
|
|
10
|
-
contents: write
|
|
11
|
-
id-token: write # enables npm provenance
|
|
12
|
-
steps:
|
|
13
|
-
- uses: actions/checkout@v4
|
|
14
|
-
with:
|
|
15
|
-
token: ${{ secrets.GITHUB_TOKEN }}
|
|
16
|
-
|
|
17
|
-
# Setup Node and create an .npmrc that uses the token from NODE_AUTH_TOKEN
|
|
18
|
-
- uses: actions/setup-node@v4
|
|
19
|
-
with:
|
|
20
|
-
node-version: '20.x'
|
|
21
|
-
registry-url: 'https://registry.npmjs.org'
|
|
22
|
-
|
|
23
|
-
- run: npm ci
|
|
24
|
-
|
|
25
|
-
# Auto-increment minor version, commit, and push
|
|
26
|
-
- name: Bump minor version
|
|
27
|
-
run: |
|
|
28
|
-
git config --global user.name "github-actions"
|
|
29
|
-
git config --global user.email "github-actions@github.com"
|
|
30
|
-
npm version minor --no-git-tag-version
|
|
31
|
-
git add package.json package-lock.json || true
|
|
32
|
-
git commit -m "ci: bump minor version [skip ci]" || echo "No changes to commit"
|
|
33
|
-
git push origin HEAD:main || echo "No changes to push"
|
|
34
|
-
env:
|
|
35
|
-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
36
|
-
|
|
37
|
-
- run: npm publish --provenance --access public
|
|
38
|
-
env:
|
|
39
|
-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
name: Publish Patch Version to npmjs
|
|
3
|
-
|
|
4
|
-
on:
|
|
5
|
-
push:
|
|
6
|
-
branches:
|
|
7
|
-
- main
|
|
8
|
-
workflow_dispatch:
|
|
9
|
-
|
|
10
|
-
jobs:
|
|
11
|
-
publish:
|
|
12
|
-
runs-on: ubuntu-latest
|
|
13
|
-
permissions:
|
|
14
|
-
contents: write
|
|
15
|
-
id-token: write # enables npm provenance
|
|
16
|
-
steps:
|
|
17
|
-
- uses: actions/checkout@v4
|
|
18
|
-
with:
|
|
19
|
-
token: ${{ secrets.GITHUB_TOKEN }}
|
|
20
|
-
|
|
21
|
-
# Setup Node and create an .npmrc that uses the token from NODE_AUTH_TOKEN
|
|
22
|
-
- uses: actions/setup-node@v4
|
|
23
|
-
with:
|
|
24
|
-
node-version: '20.x'
|
|
25
|
-
registry-url: 'https://registry.npmjs.org'
|
|
26
|
-
|
|
27
|
-
- run: npm ci
|
|
28
|
-
|
|
29
|
-
# Auto-increment patch version, commit, and push
|
|
30
|
-
- name: Bump patch version
|
|
31
|
-
run: |
|
|
32
|
-
git config --global user.name "github-actions"
|
|
33
|
-
git config --global user.email "github-actions@github.com"
|
|
34
|
-
npm version patch --no-git-tag-version
|
|
35
|
-
git add package.json package-lock.json || true
|
|
36
|
-
git commit -m "ci: bump patch version [skip ci]" || echo "No changes to commit"
|
|
37
|
-
git push origin HEAD:main || echo "No changes to push"
|
|
38
|
-
env:
|
|
39
|
-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
40
|
-
|
|
41
|
-
# If your package is public and scoped (e.g., @scope/name), keep --access public.
|
|
42
|
-
# For unscoped public packages, you can omit --access.
|
|
43
|
-
- run: npm publish --provenance --access public
|
|
44
|
-
env:
|
|
45
|
-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|