@typeform/eslint-config 7.0.0 → 7.1.0-beta.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.
@@ -12,6 +12,9 @@ jobs:
12
12
  main:
13
13
  name: Run checks and deploy
14
14
  runs-on: [ubuntu-latest]
15
+ permissions:
16
+ contents: write
17
+ id-token: write
15
18
 
16
19
  steps:
17
20
  - name: Check out Git repository
@@ -44,8 +47,16 @@ jobs:
44
47
  - name: Run linting
45
48
  run: yarn lint
46
49
 
50
+ - name: Reset npm registry for publishing
51
+ run: |
52
+ npm config set @typeform:registry https://registry.npmjs.org/
53
+ npm config delete '//npm.pkg.github.com/:_authToken'
54
+
47
55
  - name: Release
48
56
  run: yarn semantic-release
49
57
  env:
50
58
  GH_TOKEN: ${{ secrets.GH_TOKEN }}
51
59
  NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
60
+ # Hybrid approach: NPM_TOKEN used for verification, OIDC used for actual publishing
61
+ # OIDC publishing (with provenance) is enabled via id-token: write permission
62
+ # The npm CLI will prefer OIDC when available during the publish step
package/README.md CHANGED
@@ -59,3 +59,4 @@ yarn lint
59
59
  ```
60
60
 
61
61
  The `prepare` script automatically builds the package after `yarn install`.
62
+
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@typeform/eslint-config",
3
- "version": "7.0.0",
3
+ "version": "7.1.0-beta.3",
4
4
  "description": "ESLint configuration for Typeform front-end projects",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -24,7 +24,8 @@
24
24
  "test": "node --experimental-vm-modules node_modules/jest/bin/jest.js",
25
25
  "eslint": "eslint",
26
26
  "lint": "yarn run eslint .",
27
- "publish:npm": "yarn build && npm config set @typeform:registry https://registry.npmjs.org/ && npm config set '//registry.npmjs.org/:_authToken' $NPM_TOKEN && npm publish"
27
+ "publish:npm": "yarn build && npm config set @typeform:registry https://registry.npmjs.org/ && npm publish --provenance --access public",
28
+ "publish:github": "npm config set @typeform:registry https://npm.pkg.github.com/ && npm publish"
28
29
  },
29
30
  "lint-staged": {
30
31
  "*.{js,ts}": "yarn run eslint --fix",
@@ -56,6 +57,7 @@
56
57
  },
57
58
  "devDependencies": {
58
59
  "@semantic-release/exec": "^6.0.3",
60
+ "@semantic-release/npm": "^12.0.0",
59
61
  "eslint": "^9.16.0",
60
62
  "husky": "^9.1.7",
61
63
  "jest": "^29.7.0",
@@ -82,12 +84,19 @@
82
84
  "plugins": [
83
85
  "@semantic-release/commit-analyzer",
84
86
  "@semantic-release/release-notes-generator",
85
- "@semantic-release/npm",
87
+ [
88
+ "@semantic-release/npm",
89
+ {
90
+ "npmPublish": true,
91
+ "tarballDir": "dist",
92
+ "pkgRoot": "."
93
+ }
94
+ ],
86
95
  "@semantic-release/github",
87
96
  [
88
97
  "@semantic-release/exec",
89
98
  {
90
- "successCmd": "yarn run publish:npm"
99
+ "successCmd": "yarn run publish:github"
91
100
  }
92
101
  ]
93
102
  ]