-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
ref(deno): add deno-integration-tests dev-package #21827
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| { | ||
| "$schema": "../../node_modules/oxlint/configuration_schema.json", | ||
| "extends": ["../.oxlintrc.json"], | ||
| "env": { | ||
| "node": true | ||
| }, | ||
| "overrides": [ | ||
| { | ||
| "files": ["suites/**/*.ts", "suites/**/*.mjs"], | ||
| "globals": { | ||
| "Deno": "readonly" | ||
| }, | ||
| "rules": { | ||
| "typescript/ban-ts-comment": [ | ||
| "error", | ||
| { | ||
| "ts-ignore": "allow-with-description", | ||
| "ts-expect-error": true | ||
| } | ||
| ], | ||
| "import/first": "off" | ||
| } | ||
| } | ||
| ] | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| { | ||
| "name": "@sentry-internal/deno-integration-tests", | ||
| "version": "10.62.0", | ||
| "license": "MIT", | ||
| "engines": { | ||
| "node": ">=18" | ||
| }, | ||
| "private": true, | ||
| "scripts": { | ||
| "deno-types": "node ./scripts/download-deno-types.mjs", | ||
| "install:deno": "node ./scripts/install-deno.mjs", | ||
| "lint": "OXLINT_TSGOLINT_DANGEROUSLY_SUPPRESS_PROGRAM_DIAGNOSTICS=true oxlint . --type-aware", | ||
| "lint:fix": "OXLINT_TSGOLINT_DANGEROUSLY_SUPPRESS_PROGRAM_DIAGNOSTICS=true oxlint . --fix --type-aware", | ||
| "test": "run-s install:deno deno-types test:unit", | ||
| "test:unit": "deno test --allow-net --allow-read --allow-run --allow-env --no-check" | ||
| }, | ||
| "dependencies": { | ||
| "@sentry/core": "10.62.0", | ||
| "@sentry/deno": "10.62.0", | ||
| "mysql": "^2.18.1" | ||
| }, | ||
| "volta": { | ||
| "extends": "../../package.json" | ||
| } | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| import { existsSync, writeFileSync } from 'fs'; | ||
| import { download } from './download.mjs'; | ||
|
|
||
| if (!existsSync('lib.deno.d.ts')) { | ||
| const code = await download('https://github.com/denoland/deno/releases/download/v2.8.0/lib.deno.d.ts'); | ||
| writeFileSync('lib.deno.d.ts', code); | ||
|
isaacs marked this conversation as resolved.
Dismissed
|
||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| /** Download a url to a string */ | ||
| export async function download(url) { | ||
| try { | ||
| return await fetch(url).then(res => res.text()); | ||
| } catch (e) { | ||
| // eslint-disable-next-line no-console | ||
| console.error('Failed to download', url, e); | ||
| process.exit(1); | ||
| } | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| import { execSync } from 'child_process'; | ||
|
|
||
| import { download } from './download.mjs'; | ||
|
|
||
| try { | ||
| execSync('deno --version', { stdio: 'inherit' }); | ||
| } catch { | ||
| // eslint-disable-next-line no-console | ||
| console.error('Deno is not installed. Installing...'); | ||
| if (process.platform === 'win32') { | ||
| // TODO | ||
| // eslint-disable-next-line no-console | ||
| console.error('Please install Deno manually: https://docs.deno.com/runtime/manual/getting_started/installation'); | ||
| process.exit(1); | ||
| } else { | ||
| const script = await download('https://deno.land/x/install/install.sh'); | ||
|
|
||
| try { | ||
| execSync(script, { stdio: 'inherit' }); | ||
| } catch (e) { | ||
| // eslint-disable-next-line no-console | ||
| console.error('Failed to install Deno', e); | ||
| process.exit(1); | ||
| } | ||
| } | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| { | ||
| "extends": "../../tsconfig.json", | ||
| "include": ["./lib.deno.d.ts", "suites/**/*"], | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Missing Deno types before lintHigh Severity The integration package Additional Locations (1)Reviewed by Cursor Bugbot for commit 54823eb. Configure here. |
||
| "compilerOptions": { | ||
| "lib": ["esnext"], | ||
| "target": "esnext" | ||
| } | ||
| } | ||


Uh oh!
There was an error while loading. Please reload this page.