typescript-github-action-template 0.2.0 → 0.2.1-1
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.
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
From 7d91a6dac5c5f46b5e5526b0cb613865cc73eb3c Mon Sep 17 00:00:00 2001
|
|
2
|
+
From: Cat Chen <catchen@catchen.me>
|
|
3
|
+
Date: Mon, 1 Jul 2024 01:09:18 -0700
|
|
4
|
+
Subject: [PATCH] Optimized release printout
|
|
5
|
+
|
|
6
|
+
---
|
|
7
|
+
.github/workflows/release.yml | 22 ++++++++++++++++++----
|
|
8
|
+
1 file changed, 18 insertions(+), 4 deletions(-)
|
|
9
|
+
|
|
10
|
+
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
|
|
11
|
+
index c2b9417..b7673e8 100644
|
|
12
|
+
--- a/.github/workflows/release.yml
|
|
13
|
+
+++ b/.github/workflows/release.yml
|
|
14
|
+
@@ -102,28 +102,42 @@ jobs:
|
|
15
|
+
if: ${{ !inputs.dry-run }}
|
|
16
|
+
with:
|
|
17
|
+
ref: ${{ needs.release.outputs.tag }}
|
|
18
|
+
+
|
|
19
|
+
- uses: actions/checkout@v4
|
|
20
|
+
if: ${{ inputs.dry-run }}
|
|
21
|
+
with:
|
|
22
|
+
ref: ${{ github.ref_name || github.ref }}
|
|
23
|
+
+
|
|
24
|
+
- uses: actions/setup-node@v4
|
|
25
|
+
with:
|
|
26
|
+
node-version-file: '.nvmrc'
|
|
27
|
+
check-latest: true
|
|
28
|
+
registry-url: https://registry.npmjs.org/
|
|
29
|
+
cache: yarn
|
|
30
|
+
- - env:
|
|
31
|
+
+
|
|
32
|
+
+ - name: Build
|
|
33
|
+
+ run: |
|
|
34
|
+
+ yarn install
|
|
35
|
+
+ yarn build
|
|
36
|
+
+
|
|
37
|
+
+ - name: Publish
|
|
38
|
+
+ env:
|
|
39
|
+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
40
|
+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
41
|
+
DRY_RUN: ${{ inputs.dry-run || false }}
|
|
42
|
+
run: |
|
|
43
|
+
- yarn install
|
|
44
|
+
- yarn build
|
|
45
|
+
- npm whoami
|
|
46
|
+
+ NPM_WHOAMI=$(npm whoami)
|
|
47
|
+
+ echo "::notice::NPM username: $NPM_WHOAMI"
|
|
48
|
+
+
|
|
49
|
+
+ echo "::group::npm config"
|
|
50
|
+
npm config ls -l
|
|
51
|
+
+ echo "::endgroup::"
|
|
52
|
+
+
|
|
53
|
+
+ echo "::group::npm config"
|
|
54
|
+
if [[ "$DRY_RUN" = true ]]
|
|
55
|
+
then
|
|
56
|
+
npm publish --dry-run
|
|
57
|
+
else
|
|
58
|
+
npm publish
|
|
59
|
+
fi
|
|
60
|
+
+ echo "::endgroup::"
|
|
61
|
+
--
|
|
62
|
+
2.45.2
|
|
63
|
+
|
|
@@ -0,0 +1,244 @@
|
|
|
1
|
+
From d7e3f369db841dd293d12589b94a868b3fe3691e Mon Sep 17 00:00:00 2001
|
|
2
|
+
From: Cat Chen <catchen@catchen.me>
|
|
3
|
+
Date: Mon, 1 Jul 2024 06:34:36 +0000
|
|
4
|
+
Subject: [PATCH 1/2] Renamed dist to bundle; renamed lib to dist and ignored
|
|
5
|
+
it (#558)
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
.gitattributes | 2 +-
|
|
9
|
+
.github/codeql/codeql-config.yml | 2 +-
|
|
10
|
+
.github/workflows/build.yml | 4 ++--
|
|
11
|
+
.github/workflows/release.yml | 4 ++--
|
|
12
|
+
.gitignore | 38 +++++++++++++++++++++++++++-----
|
|
13
|
+
.husky/pre-commit | 7 ++----
|
|
14
|
+
.npmignore | 2 +-
|
|
15
|
+
.prettierignore | 2 +-
|
|
16
|
+
eslint.config.js | 6 ++---
|
|
17
|
+
tsconfig.json | 2 +-
|
|
18
|
+
10 files changed, 47 insertions(+), 22 deletions(-)
|
|
19
|
+
|
|
20
|
+
diff --git a/.gitattributes b/.gitattributes
|
|
21
|
+
index 7128ec5..5e63179 100644
|
|
22
|
+
--- a/.gitattributes
|
|
23
|
+
+++ b/.gitattributes
|
|
24
|
+
@@ -1,2 +1,2 @@
|
|
25
|
+
dist/**/* linguist-generated
|
|
26
|
+
-lib/**/* linguist-generated
|
|
27
|
+
+bundle/**/* linguist-generated
|
|
28
|
+
diff --git a/.github/codeql/codeql-config.yml b/.github/codeql/codeql-config.yml
|
|
29
|
+
index e2f1185..61054de 100644
|
|
30
|
+
--- a/.github/codeql/codeql-config.yml
|
|
31
|
+
+++ b/.github/codeql/codeql-config.yml
|
|
32
|
+
@@ -1,3 +1,3 @@
|
|
33
|
+
paths-ignore:
|
|
34
|
+
- - dist/
|
|
35
|
+
+ - bundle/
|
|
36
|
+
- node_modules/
|
|
37
|
+
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
|
|
38
|
+
index d9cf62c..39ea306 100644
|
|
39
|
+
--- a/.github/workflows/build.yml
|
|
40
|
+
+++ b/.github/workflows/build.yml
|
|
41
|
+
@@ -48,8 +48,8 @@ jobs:
|
|
42
|
+
- name: Build
|
|
43
|
+
run: yarn build
|
|
44
|
+
|
|
45
|
+
- - name: Package
|
|
46
|
+
- run: yarn package
|
|
47
|
+
+ - name: Bundle
|
|
48
|
+
+ run: yarn bundle
|
|
49
|
+
|
|
50
|
+
- uses: CatChen/check-git-status-action@v1
|
|
51
|
+
id: check-git-status
|
|
52
|
+
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
|
|
53
|
+
index 6ad530b..c2b9417 100644
|
|
54
|
+
--- a/.github/workflows/release.yml
|
|
55
|
+
+++ b/.github/workflows/release.yml
|
|
56
|
+
@@ -31,7 +31,7 @@ on:
|
|
57
|
+
diff-targets:
|
|
58
|
+
description: 'Diff Targets'
|
|
59
|
+
required: false
|
|
60
|
+
- default: '{README.md,LICENSE,dist/**/*}'
|
|
61
|
+
+ default: '{README.md,LICENSE,bundle/**/*}'
|
|
62
|
+
type: string
|
|
63
|
+
dry-run:
|
|
64
|
+
description: 'Dry run'
|
|
65
|
+
@@ -89,7 +89,7 @@ jobs:
|
|
66
|
+
update-shorthand-release: true
|
|
67
|
+
dry-run: ${{ inputs.dry-run || false }}
|
|
68
|
+
skip-if-no-diff: ${{ inputs.skip-if-no-diff || github.event_name != 'workflow_dispatch' }}
|
|
69
|
+
- diff-targets: ${{ inputs.diff-targets || '{README.md,LICENSE,dist/**/*}' }}
|
|
70
|
+
+ diff-targets: ${{ inputs.diff-targets || '{README.md,LICENSE,bundle/**/*}' }}
|
|
71
|
+
github-token: ${{ steps.get-github-app-token.outputs.token }}
|
|
72
|
+
|
|
73
|
+
publish:
|
|
74
|
+
diff --git a/.gitignore b/.gitignore
|
|
75
|
+
index adb2c19..fd72422 100644
|
|
76
|
+
--- a/.gitignore
|
|
77
|
+
+++ b/.gitignore
|
|
78
|
+
@@ -5,6 +5,7 @@ npm-debug.log*
|
|
79
|
+
yarn-debug.log*
|
|
80
|
+
yarn-error.log*
|
|
81
|
+
lerna-debug.log*
|
|
82
|
+
+.pnpm-debug.log*
|
|
83
|
+
|
|
84
|
+
# Diagnostic reports (https://nodejs.org/api/report.html)
|
|
85
|
+
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
|
|
86
|
+
@@ -41,8 +42,8 @@ build/Release
|
|
87
|
+
node_modules/
|
|
88
|
+
jspm_packages/
|
|
89
|
+
|
|
90
|
+
-# TypeScript v1 declaration files
|
|
91
|
+
-typings/
|
|
92
|
+
+# Snowpack dependency directory (https://snowpack.dev/)
|
|
93
|
+
+web_modules/
|
|
94
|
+
|
|
95
|
+
# TypeScript cache
|
|
96
|
+
*.tsbuildinfo
|
|
97
|
+
@@ -53,6 +54,9 @@ typings/
|
|
98
|
+
# Optional eslint cache
|
|
99
|
+
.eslintcache
|
|
100
|
+
|
|
101
|
+
+# Optional stylelint cache
|
|
102
|
+
+.stylelintcache
|
|
103
|
+
+
|
|
104
|
+
# Microbundle cache
|
|
105
|
+
.rpt2_cache/
|
|
106
|
+
.rts2_cache_cjs/
|
|
107
|
+
@@ -68,28 +72,41 @@ typings/
|
|
108
|
+
# Yarn Integrity file
|
|
109
|
+
.yarn-integrity
|
|
110
|
+
|
|
111
|
+
-# dotenv environment variables file
|
|
112
|
+
+# dotenv environment variable files
|
|
113
|
+
.env
|
|
114
|
+
-.env.test
|
|
115
|
+
+.env.development.local
|
|
116
|
+
+.env.test.local
|
|
117
|
+
+.env.production.local
|
|
118
|
+
+.env.local
|
|
119
|
+
|
|
120
|
+
# parcel-bundler cache (https://parceljs.org/)
|
|
121
|
+
.cache
|
|
122
|
+
+.parcel-cache
|
|
123
|
+
|
|
124
|
+
# Next.js build output
|
|
125
|
+
.next
|
|
126
|
+
+out
|
|
127
|
+
|
|
128
|
+
# Nuxt.js build / generate output
|
|
129
|
+
.nuxt
|
|
130
|
+
+dist
|
|
131
|
+
|
|
132
|
+
# Gatsby files
|
|
133
|
+
.cache/
|
|
134
|
+
-# Comment in the public line in if your project uses Gatsby and *not* Next.js
|
|
135
|
+
+# Comment in the public line in if your project uses Gatsby and not Next.js
|
|
136
|
+
# https://nextjs.org/blog/next-9-1#public-directory-support
|
|
137
|
+
# public
|
|
138
|
+
|
|
139
|
+
# vuepress build output
|
|
140
|
+
.vuepress/dist
|
|
141
|
+
|
|
142
|
+
+# vuepress v2.x temp and cache directory
|
|
143
|
+
+.temp
|
|
144
|
+
+.cache
|
|
145
|
+
+
|
|
146
|
+
+# Docusaurus cache and generated files
|
|
147
|
+
+.docusaurus
|
|
148
|
+
+
|
|
149
|
+
# Serverless directories
|
|
150
|
+
.serverless/
|
|
151
|
+
|
|
152
|
+
@@ -101,3 +118,14 @@ typings/
|
|
153
|
+
|
|
154
|
+
# TernJS port file
|
|
155
|
+
.tern-port
|
|
156
|
+
+
|
|
157
|
+
+# Stores VSCode versions used for testing VSCode extensions
|
|
158
|
+
+.vscode-test
|
|
159
|
+
+
|
|
160
|
+
+# yarn v2
|
|
161
|
+
+.yarn/cache
|
|
162
|
+
+.yarn/unplugged
|
|
163
|
+
+.yarn/build-state.yml
|
|
164
|
+
+.yarn/install-state.gz
|
|
165
|
+
+.pnp.*
|
|
166
|
+
+
|
|
167
|
+
diff --git a/.husky/pre-commit b/.husky/pre-commit
|
|
168
|
+
index 89f7fbf..9832581 100755
|
|
169
|
+
--- a/.husky/pre-commit
|
|
170
|
+
+++ b/.husky/pre-commit
|
|
171
|
+
@@ -1,10 +1,7 @@
|
|
172
|
+
#!/bin/sh
|
|
173
|
+
. "$(dirname "$0")/_/husky.sh"
|
|
174
|
+
|
|
175
|
+
-yarn build
|
|
176
|
+
-git add lib
|
|
177
|
+
-
|
|
178
|
+
-yarn package
|
|
179
|
+
-git add dist
|
|
180
|
+
+yarn bundle
|
|
181
|
+
+git add bundle
|
|
182
|
+
|
|
183
|
+
yarn lint-staged
|
|
184
|
+
diff --git a/.npmignore b/.npmignore
|
|
185
|
+
index f052377..17f9acd 100644
|
|
186
|
+
--- a/.npmignore
|
|
187
|
+
+++ b/.npmignore
|
|
188
|
+
@@ -7,7 +7,7 @@
|
|
189
|
+
.prettierrc.json
|
|
190
|
+
action.yml
|
|
191
|
+
assets/
|
|
192
|
+
-dist/
|
|
193
|
+
+bundle/
|
|
194
|
+
src/
|
|
195
|
+
tests/
|
|
196
|
+
eslint.config.js
|
|
197
|
+
diff --git a/.prettierignore b/.prettierignore
|
|
198
|
+
index d21f3bc..cd5737f 100644
|
|
199
|
+
--- a/.prettierignore
|
|
200
|
+
+++ b/.prettierignore
|
|
201
|
+
@@ -1,2 +1,2 @@
|
|
202
|
+
dist/
|
|
203
|
+
-lib/
|
|
204
|
+
+bundle/
|
|
205
|
+
diff --git a/eslint.config.js b/eslint.config.js
|
|
206
|
+
index d1802b0..62d324c 100644
|
|
207
|
+
--- a/eslint.config.js
|
|
208
|
+
+++ b/eslint.config.js
|
|
209
|
+
@@ -1,7 +1,7 @@
|
|
210
|
+
-import js from '@eslint/js';
|
|
211
|
+
-import { FlatCompat } from '@eslint/eslintrc';
|
|
212
|
+
import path from 'path';
|
|
213
|
+
import { fileURLToPath } from 'url';
|
|
214
|
+
+import { FlatCompat } from '@eslint/eslintrc';
|
|
215
|
+
+import js from '@eslint/js';
|
|
216
|
+
import ts from 'typescript-eslint';
|
|
217
|
+
|
|
218
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
219
|
+
@@ -31,8 +31,8 @@ export default ts.config(
|
|
220
|
+
rules: {},
|
|
221
|
+
ignorePatterns: [
|
|
222
|
+
'node_modules/**/*',
|
|
223
|
+
- 'lib/**/*',
|
|
224
|
+
'dist/**/*',
|
|
225
|
+
+ 'bundle/**/*',
|
|
226
|
+
'eslint.config.js',
|
|
227
|
+
],
|
|
228
|
+
overrides: [
|
|
229
|
+
diff --git a/tsconfig.json b/tsconfig.json
|
|
230
|
+
index 6b900a0..fd4112c 100644
|
|
231
|
+
--- a/tsconfig.json
|
|
232
|
+
+++ b/tsconfig.json
|
|
233
|
+
@@ -49,7 +49,7 @@
|
|
234
|
+
// "emitDeclarationOnly": true, /* Only output d.ts files and not JavaScript files. */
|
|
235
|
+
// "sourceMap": true, /* Create source map files for emitted JavaScript files. */
|
|
236
|
+
// "outFile": "./", /* Specify a file that bundles all outputs into one JavaScript file. If 'declaration' is true, also designates a file that bundles all .d.ts output. */
|
|
237
|
+
- "outDir": "lib" /* Specify an output folder for all emitted files. */,
|
|
238
|
+
+ "outDir": "dist" /* Specify an output folder for all emitted files. */,
|
|
239
|
+
// "removeComments": true, /* Disable emitting comments. */
|
|
240
|
+
// "noEmit": true, /* Disable emitting files from a compilation. */
|
|
241
|
+
// "importHelpers": true, /* Allow importing helper functions from tslib once per project, instead of including them per-file. */
|
|
242
|
+
--
|
|
243
|
+
2.45.2
|
|
244
|
+
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
From 396f674a613a2bc95820118d1deb4efe12145ab0 Mon Sep 17 00:00:00 2001
|
|
2
|
+
From: Cat Chen <catchen@catchen.me>
|
|
3
|
+
Date: Mon, 1 Jul 2024 06:37:00 +0000
|
|
4
|
+
Subject: [PATCH 2/2] Added Prettier to build workflow (#559)
|
|
5
|
+
|
|
6
|
+
---
|
|
7
|
+
.github/workflows/build.yml | 6 ++++--
|
|
8
|
+
1 file changed, 4 insertions(+), 2 deletions(-)
|
|
9
|
+
|
|
10
|
+
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
|
|
11
|
+
index 39ea306..28a9c44 100644
|
|
12
|
+
--- a/.github/workflows/build.yml
|
|
13
|
+
+++ b/.github/workflows/build.yml
|
|
14
|
+
@@ -42,8 +42,10 @@ jobs:
|
|
15
|
+
- name: Install dependencies
|
|
16
|
+
run: yarn
|
|
17
|
+
|
|
18
|
+
- - name: Lint
|
|
19
|
+
- run: yarn lint --fix
|
|
20
|
+
+ - name: Reformat
|
|
21
|
+
+ run: |
|
|
22
|
+
+ yarn prettier --write .
|
|
23
|
+
+ yarn lint --fix
|
|
24
|
+
|
|
25
|
+
- name: Build
|
|
26
|
+
run: yarn build
|
|
27
|
+
--
|
|
28
|
+
2.45.2
|
|
29
|
+
|
package/package.json
CHANGED