Skip to content

Commit 7578c9a

Browse files
Add initial structure of @sentry/lynx package (#2)
1 parent f97d8b4 commit 7578c9a

File tree

12 files changed

+3775
-47
lines changed

12 files changed

+3775
-47
lines changed

package.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,13 @@
88
"clean": "lerna run clean"
99
},
1010
"devDependencies": {
11+
"@sentry-internal/eslint-config-sdk": "9.10.1",
12+
"@sentry-internal/eslint-plugin-sdk": "9.10.1",
13+
"@sentry-internal/typescript": "9.10.1",
1114
"lerna": "^8.2.1"
1215
},
16+
"workspaces": [
17+
"packages/*"
18+
],
1319
"packageManager": "yarn@4.8.1"
1420
}

packages/lynx/.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
*.tgz
2+
README.md
3+
dist

packages/lynx/.npmignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
*
2+
3+
# Included to the final package
4+
!LICENSE.md
5+
!CHANGELOG.md
6+
!README.md
7+
!/dist/**/*

packages/lynx/package.json

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
{
2+
"name": "@sentry/lynx",
3+
"homepage": "https://github.com/getsentry/sentry-lynx",
4+
"repository": "https://github.com/getsentry/sentry-lynx",
5+
"version": "0.0.0",
6+
"description": "Official Sentry SDK for lynx",
7+
"module": "dist/index.js",
8+
"types": "dist/index.d.ts",
9+
"exports": {
10+
".": {
11+
"import": "./dist/index.js",
12+
"types": "./dist/index.d.ts"
13+
}
14+
},
15+
"scripts": {
16+
"build": "run-s clean build:ts",
17+
"build:ts": "tsc",
18+
"build:tarball": "run-s build build:tarball:archive",
19+
"build:tarball:archive": "bash scripts/build-tarball.sh",
20+
"clean": "rimraf dist",
21+
"circularDepCheck": "madge --circular dist/index.js",
22+
"test": "vitest run",
23+
"test:watch": "vitest watch"
24+
},
25+
"keywords": [
26+
"lynx-js",
27+
"sentry",
28+
"crashreporting"
29+
],
30+
"publishConfig": {
31+
"access": "public"
32+
},
33+
"author": "Sentry",
34+
"license": "MIT",
35+
"dependencies": {
36+
"@sentry/browser": "9.10.1",
37+
"@sentry/core": "9.10.1"
38+
},
39+
"devDependencies": {
40+
"@types/node": "^20.9.3",
41+
"madge": "^6.1.0",
42+
"npm-run-all2": "^7.0.2",
43+
"rimraf": "^5.0.10",
44+
"typescript": "~5.0.0",
45+
"vitest": "^3.1.1"
46+
}
47+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/bin/bash
2+
3+
rm -f $(dirname "$0")/../*.tgz
4+
5+
cp $(dirname "$0")/../../../README.md $(dirname "$0")/../README.md
6+
7+
npm pack

packages/lynx/src/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export * from '@sentry/browser';
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import { describe, test, expect } from 'vitest'
2+
import { init } from '../../src/index.js'
3+
4+
describe('public api', () => {
5+
test('init should be a function', () => {
6+
expect(init).toBeInstanceOf(Function)
7+
})
8+
})

packages/lynx/test/tsconfig.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"extends": "../tsconfig.test.json"
3+
}

packages/lynx/tsconfig.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"extends": "@sentry-internal/typescript/tsconfig.json",
3+
"include": [
4+
"src/**/*.ts",
5+
],
6+
"compilerOptions": {
7+
"skipLibCheck": true,
8+
"outDir": "dist",
9+
}
10+
}

packages/lynx/tsconfig.test.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"extends": "@sentry-internal/typescript/tsconfig.json",
3+
"include": [
4+
"src/**/*.ts",
5+
"test/**/*.ts"
6+
],
7+
"paths": {
8+
"@lib/*": ["src/*"],
9+
"@lib": ["src"]
10+
}
11+
}

packages/lynx/vitest.config.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import { defineProject } from 'vitest/config'
2+
import type { UserWorkspaceConfig } from 'vitest/config'
3+
4+
const config: UserWorkspaceConfig = defineProject({
5+
test: {
6+
name: '@sentry/lynx',
7+
},
8+
})
9+
10+
export default config

0 commit comments

Comments
 (0)