Skip to content

Commit 994f333

Browse files
rtibaldorchl
andauthored
refactor: rewrite with typescript and module-builder (#456)
Co-authored-by: Rafal Chlodnicki <[email protected]>
1 parent 31f2810 commit 994f333

Some content is hidden

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

42 files changed

+2212
-1369
lines changed

.eslintignore

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@
66
!.nuxt/sentry.*.js
77

88
dist/
9-
lib/plugin.*
10-
lib/templates/*.*
9+
templates/
10+
node_modules
1111

File renamed without changes.

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
CI: true
1717
strategy:
1818
matrix:
19-
node-version: [14.x, 16.x]
19+
node-version: [16.x]
2020
name: Use Node.js ${{ matrix.node-version }}
2121
steps:
2222
- uses: actions/checkout@v3

.gitignore

Lines changed: 48 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,51 @@
1+
# Dependencies
12
node_modules
2-
*.iml
3-
.idea
3+
4+
# Logs
45
*.log*
5-
.nuxt*
6-
.vscode
7-
.DS_STORE
8-
coverage
6+
7+
# Temp directories
8+
.temp
9+
.tmp
10+
.cache
11+
12+
# Yarn
13+
**/.yarn/cache
14+
**/.yarn/*state*
15+
16+
# Generated dirs
917
dist
18+
19+
# Nuxt
20+
.nuxt
21+
.output
22+
.vercel_build_output
23+
.build-*
24+
.env
25+
.netlify
26+
27+
# Env
28+
.env
29+
30+
# Testing
31+
reports
32+
coverage
33+
*.lcov
34+
.nyc_output
35+
36+
# VSCode
37+
.vscode
38+
39+
# Intellij idea
40+
*.iml
41+
.idea
42+
43+
# OSX
44+
.DS_Store
45+
.AppleDouble
46+
.LSOverride
47+
.AppleDB
48+
.AppleDesktop
49+
Network Trash Folder
50+
Temporary Items
51+
.apdisk
File renamed without changes.

README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,15 @@
1010
1111
- [&nbsp;Release Notes](https://sentry.nuxtjs.org/releases)
1212
- [📖 &nbsp;Documentation](https://sentry.nuxtjs.org)
13+
14+
## Contributing
15+
16+
1. Install dependencies with `yarn`.
17+
2. Run `yarn dev:prepare` to generate stubbed `dist` directory.
18+
3. Make your changes.
19+
4. Run `yarn lint` and `yarn test` to verify that there is no issues (consider adding new test for your changes).
20+
5. Submit a PR.
21+
1322
## License
1423

1524
[MIT License](./LICENSE)

build.config.ts

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
import { defineBuildConfig } from 'unbuild'
2+
3+
export default defineBuildConfig({
4+
entries: [
5+
{
6+
builder: 'mkdist',
7+
input: './src/templates/',
8+
outDir: './dist/templates',
9+
ext: 'js',
10+
declaration: false,
11+
},
12+
],
13+
externals: [
14+
'@nuxt/types',
15+
'@sentry/browser',
16+
'@sentry/cli',
17+
'@sentry/core',
18+
'@sentry/node',
19+
'@sentry/tracing',
20+
'@sentry/types',
21+
'@sentry/webpack-plugin',
22+
'consola',
23+
'hash-sum',
24+
'hookable',
25+
'pathe',
26+
'unctx',
27+
'webpack',
28+
'vuex',
29+
],
30+
})

jest.config.js

Lines changed: 0 additions & 19 deletions
This file was deleted.

jest.config.ts

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
import type { JestConfigWithTsJest } from 'ts-jest'
2+
3+
const jestConfig: JestConfigWithTsJest = {
4+
preset: 'ts-jest/presets/js-with-ts-esm',
5+
testEnvironment: 'node',
6+
// Crashes on CI - https://github.com/facebook/jest/issues/10662
7+
// collectCoverage: true,
8+
// collectCoverageFrom: [
9+
// 'dist/module.mjs',
10+
// ],
11+
setupFilesAfterEnv: [
12+
'./test/setup.ts',
13+
],
14+
moduleFileExtensions: ['js', 'mjs', 'cjs', 'jsx', 'ts', 'tsx', 'json', 'node', 'd.ts'],
15+
}
16+
17+
export default jestConfig

lib/core/utils.js

Lines changed: 0 additions & 53 deletions
This file was deleted.

0 commit comments

Comments
 (0)