Skip to content

Commit d74ee56

Browse files
csvncrowlKats
authored andcommitted
refactor: convert action to TS and bundle code (#95)
(cherry picked from commit 95bbb87)
1 parent 909cc5a commit d74ee56

File tree

737 files changed

+39118
-132949
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

737 files changed

+39118
-132949
lines changed

.github/workflows/test.yml

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,13 @@ jobs:
3838
- name: Test `deno install -g` (2.0)
3939
if: matrix.deno == 'canary' || matrix.deno == 'latest'
4040
run: |
41-
deno install -g --allow-net -n deno_curl https://deno.land/std@0.198.0/examples/curl.ts
41+
deno install -g --allow-net --no-config -n deno_curl https://deno.land/std@0.198.0/examples/curl.ts
4242
deno_curl https://deno.land/std@0.198.0/examples/curl.ts
4343
4444
- name: Test `deno install (1.0)
4545
if: matrix.deno == '1.x' || matrix.deno == '1.33.1' || matrix.deno == '~1.32' || matrix.deno == 'b290fd01f3f5d32f9d010fc719ced0240759c049'
4646
run: |
47-
deno install --allow-net -n deno_curl https://deno.land/std@0.198.0/examples/curl.ts
47+
deno install --allow-net --no-config -n deno_curl https://deno.land/std@0.198.0/examples/curl.ts
4848
deno_curl https://deno.land/std@0.198.0/examples/curl.ts
4949
5050
test-version-file:
@@ -96,4 +96,20 @@ jobs:
9696
run: deno fmt --check
9797

9898
- name: Check types
99-
run: deno check main.mjs
99+
run: deno check src/main.ts
100+
101+
build-diff:
102+
runs-on: ubuntu-latest
103+
steps:
104+
- uses: actions/checkout@v4
105+
106+
- name: Setup Deno
107+
uses: ./
108+
with:
109+
deno-version: "rc"
110+
111+
- name: Build code
112+
run: deno run -A scripts/build.ts
113+
114+
- name: Assert no git changes
115+
run: git diff --quiet

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/node_modules

.vscode/settings.json

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"deno.enable": true,
3+
"deno.lint": true,
4+
"[markdown]": {
5+
"editor.defaultFormatter": "denoland.vscode-deno",
6+
"editor.formatOnSave": true
7+
},
8+
"[json]": {
9+
"editor.defaultFormatter": "denoland.vscode-deno",
10+
"editor.formatOnSave": true
11+
},
12+
"[jsonc]": {
13+
"editor.defaultFormatter": "denoland.vscode-deno",
14+
"editor.formatOnSave": true
15+
},
16+
"[typescript]": {
17+
"editor.defaultFormatter": "denoland.vscode-deno",
18+
"editor.formatOnSave": true
19+
}
20+
}

action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,4 @@ outputs:
2020
description: "The release channel of the installed version."
2121
runs:
2222
using: "node20"
23-
main: "main.mjs"
23+
main: "dist/main.mjs"

deno.json

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,25 @@
11
{
2+
"lock": {
3+
"frozen": true
4+
},
5+
"nodeModulesDir": "auto",
6+
"license": "MIT",
27
"compilerOptions": {
3-
"checkJs": true,
4-
"allowJs": true
8+
"lib": ["esnext"]
9+
},
10+
"exclude": [
11+
"dist"
12+
],
13+
"tasks": {
14+
"build": "deno run -A scripts/build.ts"
15+
},
16+
"imports": {
17+
"@actions/core": "npm:@actions/core@^1.11.1",
18+
"@actions/tool-cache": "npm:@actions/tool-cache@^2.0.2",
19+
"@types/node": "npm:@types/node@^22.15.0",
20+
"@types/semver": "npm:@types/semver@^7.7.0",
21+
"semver": "npm:semver@^7.7.1",
22+
"tsdown": "npm:tsdown@0.10.1",
23+
"undici": "npm:undici@^7.8.0"
524
}
625
}

0 commit comments

Comments
 (0)