svg-loaders-react 3.0.1 → 3.1.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.
- package/.github/workflows/publish.yml +13 -5
- package/.github/workflows/test.yml +20 -0
- package/README.md +3 -2
- package/package.json +2 -2
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
name: Publish Package to npmjs
|
|
2
2
|
on:
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
push:
|
|
4
|
+
tags:
|
|
5
|
+
- 'v*'
|
|
5
6
|
|
|
6
7
|
jobs:
|
|
7
8
|
build:
|
|
@@ -13,9 +14,16 @@ jobs:
|
|
|
13
14
|
- uses: actions/checkout@v4
|
|
14
15
|
- uses: actions/setup-node@v4
|
|
15
16
|
with:
|
|
16
|
-
node-version: '
|
|
17
|
+
node-version: '24.x'
|
|
17
18
|
registry-url: 'https://registry.npmjs.org'
|
|
19
|
+
# Trusted publishing (OIDC) requires npm 11.5.1+
|
|
20
|
+
- run: npm install -g npm@latest
|
|
18
21
|
- run: npm ci
|
|
22
|
+
- run: npm test
|
|
23
|
+
- name: Verify tag matches package.json version
|
|
24
|
+
run: |
|
|
25
|
+
if [ "${GITHUB_REF_NAME#v}" != "$(node -p "require('./package.json').version")" ]; then
|
|
26
|
+
echo "Tag $GITHUB_REF_NAME does not match package.json version" >&2
|
|
27
|
+
exit 1
|
|
28
|
+
fi
|
|
19
29
|
- run: npm publish --provenance --access public
|
|
20
|
-
env:
|
|
21
|
-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
name: Tests
|
|
2
|
+
on:
|
|
3
|
+
push:
|
|
4
|
+
branches: [master]
|
|
5
|
+
pull_request:
|
|
6
|
+
branches: [master]
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
test:
|
|
10
|
+
runs-on: ubuntu-latest
|
|
11
|
+
permissions:
|
|
12
|
+
contents: read
|
|
13
|
+
steps:
|
|
14
|
+
- uses: actions/checkout@v4
|
|
15
|
+
- uses: actions/setup-node@v4
|
|
16
|
+
with:
|
|
17
|
+
node-version-file: '.nvmrc'
|
|
18
|
+
cache: 'npm'
|
|
19
|
+
- run: npm ci
|
|
20
|
+
- run: npm test
|
package/README.md
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
[](https://github.com/ajwann/svg-loaders-react/actions/workflows/test.yml)
|
|
2
|
+
[](https://www.npmjs.com/package/svg-loaders-react)
|
|
3
|
+
[](https://github.com/ajwann/svg-loaders-react/blob/master/LICENSE.md)
|
|
3
4
|
|
|
4
5
|
This is a zero-dependency React adaptation of Sam Herberts [SVG Loaders](https://github.com/SamHerbert/SVG-Loaders) library.
|
|
5
6
|
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "svg-loaders-react",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.1.2",
|
|
4
4
|
"description": "React implementation of the SVG Loaders library by Sam Herbert",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "https://github.com/ajwann/svg-loaders-react"
|
|
8
8
|
},
|
|
9
9
|
"main": "dist/index.js",
|
|
10
|
-
"
|
|
10
|
+
"peerDependencies": {
|
|
11
11
|
"react": ">=18",
|
|
12
12
|
"react-dom": ">=18"
|
|
13
13
|
},
|