svg-loaders-react 3.1.1 → 3.1.3

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:
@@ -10,13 +11,20 @@ jobs:
10
11
  contents: read
11
12
  id-token: write
12
13
  steps:
13
- - uses: actions/checkout@v4
14
- - uses: actions/setup-node@v4
14
+ - uses: actions/checkout@v7
15
+ - uses: actions/setup-node@v7
15
16
  with:
16
- node-version: '20.x'
17
+ node-version-file: '.nvmrc'
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
19
22
  - run: npm test
23
+ - run: npm run build
24
+ - name: Verify tag matches package.json version
25
+ run: |
26
+ if [ "${GITHUB_REF_NAME#v}" != "$(node -p "require('./package.json').version")" ]; then
27
+ echo "Tag $GITHUB_REF_NAME does not match package.json version" >&2
28
+ exit 1
29
+ fi
20
30
  - run: npm publish --provenance --access public
21
- env:
22
- NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
@@ -0,0 +1,21 @@
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@v7
15
+ - uses: actions/setup-node@v7
16
+ with:
17
+ node-version-file: '.nvmrc'
18
+ cache: 'npm'
19
+ - run: npm ci
20
+ - run: npm test
21
+ - run: npm run build
package/.nvmrc CHANGED
@@ -1 +1 @@
1
- v20
1
+ 24
package/README.md CHANGED
@@ -1,4 +1,6 @@
1
- [![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)
2
4
 
3
5
  This is a zero-dependency React adaptation of Sam Herberts [SVG Loaders](https://github.com/SamHerbert/SVG-Loaders) library.
4
6
 
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "svg-loaders-react",
3
- "version": "3.1.1",
3
+ "version": "3.1.3",
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
  },
@@ -25,8 +25,8 @@
25
25
  "babel-plugin-transform-react-jsx": "^6.24.1",
26
26
  "babel-preset-env": "^1.7.0",
27
27
  "enzyme": "^3.10.0",
28
- "eslint": "^6.0.0",
29
- "eslint-config-airbnb": "^17.1.0",
28
+ "eslint": "^9.32.0",
29
+ "eslint-config-airbnb": "^19.0.4",
30
30
  "eslint-plugin-import": "^2.17.3",
31
31
  "eslint-plugin-jsx-a11y": "^6.2.1",
32
32
  "eslint-plugin-react": "^7.13.0",