-
Notifications
You must be signed in to change notification settings - Fork 111
refactor: rewrite with typescript and module-builder #456
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
Merged
Merged
Changes from 4 commits
Commits
Show all changes
45 commits
Select commit
Hold shift + click to select a range
daa948c
migrate to module-builder
rtibaldo 1f74f4e
revert eslintrc changes
rtibaldo 21137de
fixed lint issues
rtibaldo 040208b
added prepare script
rtibaldo b01023c
Removed JSDoc
rtibaldo e669fa3
Updated to nuxt stable release
rtibaldo 96c68c0
Added lint rules
rtibaldo 7fb1c5e
migrate to module-builder
rtibaldo 0eb4360
Merge branch 'rtibaldo-rewrite-module-builder' into rtibaldo-rewrite-…
rchl 6ff3b6f
disable treeshake for now
rchl 1c99c3f
Fixed default client integrations
rtibaldo 0f1de48
Fixed publish on dev
rtibaldo 96e5930
Fixed es module error
rtibaldo 51502b4
Fixed resolveClientOptions
rtibaldo 0418e61
don't lint on testing
rchl 08d37cc
Add contributing info
rchl 60157ab
camel case for types
rchl 4a05e77
generate playground before testing
rchl f810169
working on Nuxt 2 testing
rchl c8617f0
move core files to root
rchl d57a5a7
install in test
rchl b107592
Merge branch 'main' into rtibaldo-rewrite-module-builder-original
rchl e349142
Merge branch 'main' into rtibaldo-rewrite-module-builder-original
rchl ea4f90b
only nuxt 2
rchl e68de2c
unnecessary
rchl 4f16c09
remove leftover files
rchl de979af
use cjs for release-it config
rchl 43369f1
avoid crash?
rchl 6857eeb
revert to cjs
rchl bb60ab3
don't test node 14
rchl 547707a
Merge branch 'main' into rtibaldo-rewrite-module-builder-original
rchl f443830
better types for integrations
rchl bda8040
parens
rchl 3746cd9
types
rchl 9252e95
fix conflicting type names
rchl 6bc2b65
getting nuxt types to extend properly
rchl 7dc06fd
restore removed NuxtConfig extend
rchl 6521ef8
remove nuxt/kit and nuxt/schema dependencies
rchl 7b7e475
fix types in tests
rchl 02de5c3
bla
rchl 2c6836a
shouldn't be needed to define "types" anymore (I hope)
rchl 19279ee
it's needed
rchl 5b80490
remove unneeded mkdist step
rchl 80e50d3
consola is technically needed
rchl c3da9f1
unnecessary ts-ignores
rchl File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,3 +3,6 @@ | |
lib/plugin.* | ||
lib/templates/*.* | ||
test/fixture/*/.nuxt | ||
dist | ||
node_modules | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,51 @@ | ||
# Dependencies | ||
node_modules | ||
*.iml | ||
.idea | ||
|
||
# Logs | ||
*.log* | ||
.nuxt* | ||
.vscode | ||
.DS_STORE | ||
coverage | ||
|
||
# Temp directories | ||
.temp | ||
.tmp | ||
.cache | ||
|
||
# Yarn | ||
**/.yarn/cache | ||
**/.yarn/*state* | ||
|
||
# Generated dirs | ||
dist | ||
|
||
# Nuxt | ||
.nuxt | ||
.output | ||
.vercel_build_output | ||
.build-* | ||
.env | ||
.netlify | ||
|
||
# Env | ||
.env | ||
|
||
# Testing | ||
reports | ||
coverage | ||
*.lcov | ||
.nyc_output | ||
|
||
# VSCode | ||
.vscode | ||
|
||
# Intellij idea | ||
*.iml | ||
.idea | ||
|
||
# OSX | ||
.DS_Store | ||
.AppleDouble | ||
.LSOverride | ||
.AppleDB | ||
.AppleDesktop | ||
Network Trash Folder | ||
Temporary Items | ||
.apdisk |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
imports.autoImport=false |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import { defineBuildConfig } from 'unbuild' | ||
|
||
export default defineBuildConfig({ | ||
entries: [ | ||
{ | ||
builder: 'mkdist', | ||
input: './src/templates/', | ||
outDir: './dist/templates', | ||
ext: 'js', | ||
declaration: false, | ||
}, | ||
], | ||
externals: [ | ||
'@sentry/webpack-plugin', | ||
'webpack', | ||
'@sentry/tracing', | ||
'@sentry/types', | ||
'@sentry/browser', | ||
'@sentry/node', | ||
'@sentry/cli', | ||
'@sentry/minimal', | ||
'vuex', | ||
'@nuxt/types', | ||
], | ||
rchl marked this conversation as resolved.
Show resolved
Hide resolved
|
||
}) |
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import type { JestConfigWithTsJest } from 'ts-jest' | ||
|
||
const jestConfig: JestConfigWithTsJest = { | ||
preset: 'ts-jest/presets/js-with-ts-esm', | ||
testEnvironment: 'node', | ||
collectCoverage: true, | ||
collectCoverageFrom: [ | ||
'dist/module.mjs', | ||
], | ||
setupFilesAfterEnv: [ | ||
'./test/setup.ts', | ||
], | ||
moduleFileExtensions: ['js', 'mjs', 'cjs', 'jsx', 'ts', 'tsx', 'json', 'node', 'd.ts'], | ||
} | ||
|
||
export default jestConfig |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
export default function (/** context */) { | ||
return [] | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import SentryModule from '..' | ||
|
||
/** @type {import('@nuxt/types').NuxtConfig} */ | ||
export default { | ||
rootDir: __dirname, | ||
telemetry: false, | ||
build: { | ||
terser: false | ||
}, | ||
render: { | ||
resourceHints: false | ||
}, | ||
modules: [ | ||
// @ts-ignore | ||
SentryModule | ||
], | ||
sentry: { | ||
clientIntegrations: { | ||
// Integration from @Sentry/browser package. | ||
TryCatch: { eventTarget: false } | ||
}, | ||
customClientIntegrations: '~/config/custom-client-integrations.js', | ||
publishRelease: { | ||
authToken: 'fakeToken', | ||
org: 'MyCompany', | ||
project: 'TestProject', | ||
dryRun: true | ||
} | ||
} | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{ | ||
"private": true, | ||
"scripts": { | ||
"dev": "nuxt", | ||
"build": "nuxt build", | ||
"start": "nuxt start", | ||
"generate": "nuxt generate" | ||
}, | ||
"dependencies": { | ||
"nuxt": "2.15.8" | ||
}, | ||
"keywords": [] | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<template> | ||
<div> | ||
<h3>Server-side</h3> | ||
<span id="server-side">{{ serverSentry ? 'Works!' : '$sentry object is missing!' }}</span> | ||
<h3>Client-side</h3> | ||
<span id="client-side">{{ clientSentry ? 'Works!' : '$sentry object is missing!' }}</span> | ||
</div> | ||
</template> | ||
|
||
<script> | ||
export default { | ||
data () { | ||
return { | ||
/** @type {import('@sentry/minimal') | null} */ | ||
clientSentry: null, | ||
/** @type {import('@sentry/minimal') | null} */ | ||
serverSentry: this.$sentry, | ||
} | ||
}, | ||
created () { | ||
if (process.client) { | ||
this.clientSentry = this.$sentry | ||
} | ||
}, | ||
} | ||
</script> |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.