Skip to content

Commit dfbaab2

Browse files
authored
Update release workflow to support npm trusted publshing (#23)
1 parent e5fe306 commit dfbaab2

File tree

6 files changed

+31
-24
lines changed

6 files changed

+31
-24
lines changed

.eslintignore

Lines changed: 0 additions & 3 deletions
This file was deleted.

.eslintrc

Lines changed: 0 additions & 14 deletions
This file was deleted.

.github/workflows/ci.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@ jobs:
4747

4848
deploy:
4949
name: Deploy
50-
runs-on: ubuntu-latest
5150
if: "startsWith(github.ref, 'refs/tags/') && github.repository == 'sass/sync-child-process'"
5251
needs: [static_analysis, tests]
5352
permissions:

.github/workflows/release.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,4 @@ jobs:
2121

2222
- run: npm install
2323
- run: npm run compile
24-
- run: npm publish
25-
env:
26-
NODE_AUTH_TOKEN: '${{ secrets.NPM_TOKEN }}'
24+
- run: npm publish --provenance

eslint.config.js

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
import { defineConfig } from 'eslint/config';
2+
import gts from 'gts';
3+
4+
export default defineConfig([
5+
gts,
6+
{
7+
rules: {
8+
'@typescript-eslint/explicit-function-return-type': [
9+
'error',
10+
{'allowExpressions': true}
11+
],
12+
'func-style': ['error', 'declaration'],
13+
'prefer-const': ['error', {'destructuring': 'all'}],
14+
// It would be nice to sort import declaration order as well, but that's not
15+
// autofixable and it's not worth the effort of handling manually.
16+
'sort-imports': ['error', {'ignoreDeclarationSort': true}],
17+
},
18+
},
19+
{
20+
ignores: [
21+
'build/',
22+
'dist/',
23+
'**/*.js',
24+
],
25+
},
26+
]);

lib/index.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,10 @@ function isMarkedAsUntransferable(object: unknown): boolean {
3030
* A child process that runs synchronously while also allowing the user to
3131
* interact with it before it shuts down.
3232
*/
33-
export class SyncChildProcess
34-
implements Iterator<StderrEvent | StdoutEvent, ExitEvent | undefined>
35-
{
33+
export class SyncChildProcess implements Iterator<
34+
StderrEvent | StdoutEvent,
35+
ExitEvent | undefined
36+
> {
3637
/** The port that communicates with the worker thread. */
3738
private readonly port: SyncMessagePort;
3839

0 commit comments

Comments
 (0)