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.
@@ -1,7 +1,8 @@
1
1
  name: Publish Package to npmjs
2
2
  on:
3
- release:
4
- types: [published]
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: '20.x'
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
- [![Build Status](https://travis-ci.org/ajwann/svg-loaders-react.svg?branch=master)](https://travis-ci.org/ajwann/svg-loaders-react)
2
- [![npm version](https://badge.fury.io/js/svg-loaders-react.svg)](https://badge.fury.io/js/svg-loaders-react)
1
+ [![Tests](https://github.com/ajwann/svg-loaders-react/actions/workflows/test.yml/badge.svg?branch=master)](https://github.com/ajwann/svg-loaders-react/actions/workflows/test.yml)
2
+ [![npm version](https://img.shields.io/npm/v/svg-loaders-react.svg)](https://www.npmjs.com/package/svg-loaders-react)
3
+ [![License: MIT](https://img.shields.io/npm/l/svg-loaders-react.svg)](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.0.1",
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
- "peerDependendies": {
10
+ "peerDependencies": {
11
11
  "react": ">=18",
12
12
  "react-dom": ">=18"
13
13
  },