-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
feat(ember)!: Update to v2 addon format #19229
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 |
|---|---|---|
|
|
@@ -6,6 +6,8 @@ | |
| <meta name="description" content="" /> | ||
| <meta name="viewport" content="width=device-width, initial-scale=1" /> | ||
|
|
||
| <script>if(window.performance&&window.performance.mark){window.performance.mark('@sentry/ember:initial-load-start');}</script> | ||
|
aklkv marked this conversation as resolved.
Member
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. honestly if we are doing such a big refactor I'd just drop this stuff as built-in functionality - you can build this yourself if needed but likely for simplicity this can go away. |
||
|
|
||
| {{content-for "head"}} | ||
|
|
||
| <link integrity="" rel="stylesheet" href="{{rootURL}}assets/vendor.css" /> | ||
|
|
@@ -19,6 +21,8 @@ | |
| <script src="{{rootURL}}assets/vendor.js"></script> | ||
| <script src="{{rootURL}}assets/ember-classic.js"></script> | ||
|
|
||
| <script>if(window.performance&&window.performance.mark){window.performance.mark('@sentry/ember:initial-load-end');}</script> | ||
|
|
||
| {{content-for "body-footer"}} | ||
| </body> | ||
| </html> | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| import type ApplicationInstance from '@ember/application/instance'; | ||
| import { setupPerformance } from '@sentry/ember'; | ||
|
|
||
| export function initialize(appInstance: ApplicationInstance): void { | ||
|
Member
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. Hey, I am taking another look over this as we are getting closer to planning the next major, where this could go in. Ideally, we'd align this more closely with how we handle sentry init in other places as well - which would be, to keep things centralized in // app.ts
export default class App extends Application {
modulePrefix = config.modulePrefix;
podModulePrefix = config.podModulePrefix;
Resolver = Resolver;
}
Sentry.init({
// ...
integrations: [
Sentry.browserTracingIntegration({ emberApp: App })
]
});and somehow derive/wrap the necessary thing inside of this? That would be the ideal solution IMHO, or something along these lines. then we can also get rid of all the async import and special options for performance etc. and just pass this directly to the (ember-specific) browser tracing integration 🤔
Member
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. Or alternatively, if this cannot be made to work nicely, we could also do this in the initializer, which would be more "sentry native": import * as Sentry from '@sentry/ember';
export function initialize(appInstance) {
Sentry.addIntegration(Sentry.browserTracingIntegration({
appInstance,
// other options here
});
}this would possibly loose tiny bits of timing info but should overall be likely OK... Then, we need to export a custom
Member
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. I will look into PRing into this PR some changes for this! |
||
| setupPerformance(appInstance, { | ||
| minimumRunloopQueueDuration: 0, | ||
| minimumComponentRenderDuration: 0, | ||
| }); | ||
| } | ||
|
aklkv marked this conversation as resolved.
|
||
|
|
||
| export default { | ||
| initialize, | ||
| }; | ||
|
aklkv marked this conversation as resolved.
|
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| import type ApplicationInstance from '@ember/application/instance'; | ||
| import { setupPerformance } from '@sentry/ember'; | ||
|
|
||
| export function initialize(appInstance: ApplicationInstance): void { | ||
| setupPerformance(appInstance, { | ||
| minimumRunloopQueueDuration: 0, | ||
| minimumComponentRenderDuration: 0, | ||
| }); | ||
| } | ||
|
|
||
| export default { | ||
| initialize, | ||
| }; |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| # EditorConfig helps developers define and maintain consistent | ||
| # coding styles between different editors and IDEs | ||
| # editorconfig.org | ||
|
|
||
| root = true | ||
|
|
||
| [*] | ||
| end_of_line = lf | ||
| charset = utf-8 | ||
| trim_trailing_whitespace = true | ||
| insert_final_newline = true | ||
| indent_style = space | ||
| indent_size = 2 | ||
|
|
||
| [*.hbs] | ||
| insert_final_newline = false | ||
|
|
||
| [*.{diff,md}] | ||
| trim_trailing_whitespace = false |
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| # This file is committed to git and should not contain any secrets. | ||
| # | ||
| # Vite recommends using .env.local or .env.[mode].local if you need to manage secrets | ||
| # SEE: https://vite.dev/guide/env-and-mode.html#env-files for more information. | ||
|
|
||
|
|
||
| # Default NODE_ENV with vite build --mode=test is production | ||
| NODE_ENV=development |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,37 +1,21 @@ | ||
| # See https://help.github.com/ignore-files/ for more about ignoring files. | ||
|
|
||
| # compiled output | ||
| /dist/ | ||
| /tmp/ | ||
|
|
||
| # dependencies | ||
| /bower_components/ | ||
| /node_modules/ | ||
| dist/ | ||
| dist-tests/ | ||
| declarations/ | ||
|
|
||
| # misc | ||
| /.env* | ||
| /.pnp* | ||
| /.sass-cache | ||
| /connect.lock | ||
| /coverage/ | ||
| /libpeerconnection.log | ||
| /npm-debug.log* | ||
| /testem.log | ||
| /yarn-error.log | ||
| # from scenarios | ||
| tmp/ | ||
| config/optional-features.json | ||
| ember-cli-build.cjs | ||
|
|
||
| # ember-try | ||
| /.node_modules.ember-try/ | ||
| /bower.json.ember-try | ||
| /npm-shrinkwrap.json.ember-try | ||
| /package.json.ember-try | ||
| /package-lock.json.ember-try | ||
| /yarn.lock.ember-try | ||
| # npm/pnpm/yarn pack output | ||
| *.tgz | ||
|
|
||
| # broccoli-debug | ||
| /DEBUG/ | ||
| # deps & caches | ||
| node_modules/ | ||
| .eslintcache | ||
| .prettiercache | ||
| .npm-deps/ | ||
|
|
||
| # These get created when packaging | ||
| /instance-initializers | ||
| index.d.ts | ||
| runloop.d.ts | ||
| types.d.ts | ||
| # potentially containing secrets | ||
| *.local |
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| # unconventional js | ||
| /blueprints/*/files/ | ||
|
|
||
| # compiled output | ||
| /dist/ | ||
| /dist-*/ | ||
| /declarations/ | ||
|
|
||
| # misc | ||
| /coverage/ | ||
| pnpm-lock.yaml | ||
| config/ember-cli-update.json | ||
| *.yaml | ||
| *.yml | ||
| *.md | ||
| *.html |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| export default { | ||
| plugins: ['prettier-plugin-ember-template-tag'], | ||
| overrides: [ | ||
| { | ||
| files: '*.{js,gjs,ts,gts,mjs,mts,cjs,cts}', | ||
| options: { | ||
| singleQuote: true, | ||
| templateSingleQuote: false, | ||
| }, | ||
| }, | ||
| ], | ||
| }; |
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| export default { | ||
| extends: 'recommended', | ||
| checkHbsTemplateLiterals: false, | ||
| }; |
This file was deleted.
This file was deleted.
Uh oh!
There was an error while loading. Please reload this page.