Skip to content

Commit dfe5db5

Browse files
authored
build(deno): Prepare Deno SDK for release on npm (#9281)
1 parent 21e1ee2 commit dfe5db5

File tree

3 files changed

+17
-2
lines changed

3 files changed

+17
-2
lines changed

.craft.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,9 @@ targets:
6363
- name: npm
6464
id: '@sentry/vercel-edge'
6565
includeNames: /^sentry-vercel-edge-\d.*\.tgz$/
66+
- name: npm
67+
id: '@sentry/deno'
68+
includeNames: /^sentry-deno-\d.*\.tgz$/
6669

6770
## 5. Node-based Packages
6871
- name: npm

.github/workflows/build.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,10 @@ jobs:
122122
- *shared
123123
- 'packages/node/**'
124124
- 'packages/node-integration-tests/**'
125+
deno:
126+
- *shared
127+
- *browser
128+
- 'packages/deno/**'
125129
any_code:
126130
- '!**/*.md'
127131
@@ -135,6 +139,7 @@ jobs:
135139
changed_ember: ${{ steps.changed.outputs.ember }}
136140
changed_remix: ${{ steps.changed.outputs.remix }}
137141
changed_node: ${{ steps.changed.outputs.node }}
142+
changed_deno: ${{ steps.changed.outputs.deno }}
138143
changed_browser: ${{ steps.changed.outputs.browser }}
139144
changed_browser_integration: ${{ steps.changed.outputs.browser_integration }}
140145
changed_any_code: ${{ steps.changed.outputs.any_code }}
@@ -422,6 +427,7 @@ jobs:
422427
job_deno_unit_tests:
423428
name: Deno Unit Tests
424429
needs: [job_get_metadata, job_build]
430+
if: needs.job_get_metadata.outputs.changed_deno == 'true' || github.event_name != 'pull_request'
425431
timeout-minutes: 10
426432
runs-on: ubuntu-20.04
427433
strategy:

packages/deno/package.json

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,14 @@
99
"main": "build/index.js",
1010
"module": "build/index.js",
1111
"types": "build/index.d.ts",
12-
"private": true,
1312
"publishConfig": {
1413
"access": "public"
1514
},
15+
"files": [
16+
"index.js",
17+
"index.js.map",
18+
"index.d.ts"
19+
],
1620
"dependencies": {
1721
"@sentry/browser": "7.74.1",
1822
"@sentry/core": "7.74.1",
@@ -34,6 +38,7 @@
3438
"build:types": "run-s deno-types build:types:tsc build:types:bundle",
3539
"build:types:tsc": "tsc -p tsconfig.types.json",
3640
"build:types:bundle": "rollup -c rollup.types.config.js",
41+
"build:tarball": "ts-node ../../scripts/prepack.ts && npm pack ./build",
3742
"circularDepCheck": "madge --circular src/index.ts",
3843
"clean": "rimraf build build-types coverage",
3944
"prefix": "yarn deno-types",
@@ -48,7 +53,8 @@
4853
"test": "run-s deno-types install:deno test:types test:unit",
4954
"test:types": "deno check ./build/index.js",
5055
"test:unit": "deno test --allow-read --allow-run",
51-
"test:unit:update": "deno test --allow-read --allow-write --allow-run -- --update"
56+
"test:unit:update": "deno test --allow-read --allow-write --allow-run -- --update",
57+
"yalc:publish": "ts-node ../../scripts/prepack.ts && yalc publish build --push"
5258
},
5359
"volta": {
5460
"extends": "../../package.json"

0 commit comments

Comments
 (0)