@granite-js/plugin-sentry 0.1.15 → 0.1.17

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,23 @@
1
1
  # @granite-js/plugin-sentry
2
2
 
3
+ ## 0.1.17
4
+
5
+ ### Patch Changes
6
+
7
+ - 9c415df: supports dynamic plugin config
8
+ - 7a81746: fix wrong metadata
9
+ - Updated dependencies [9c415df]
10
+ - @granite-js/plugin-core@0.1.17
11
+ - @granite-js/utils@0.1.17
12
+
13
+ ## 0.1.16
14
+
15
+ ### Patch Changes
16
+
17
+ - c9b4fff: replace .js to .hbc
18
+ - @granite-js/plugin-core@0.1.16
19
+ - @granite-js/utils@0.1.16
20
+
3
21
  ## 0.1.15
4
22
 
5
23
  ### Patch Changes
package/dist/index.cjs CHANGED
@@ -83,7 +83,7 @@ async function injectSentryDebugId(sourcemapPath, debugId) {
83
83
  //#endregion
84
84
  //#region src/resolveHermesBundle.ts
85
85
  function tryResolveHermesBundle(jsBundlePath) {
86
- const lookupPath = `${jsBundlePath}.hbc`;
86
+ const lookupPath = jsBundlePath.replace(/\.js$/, ".hbc");
87
87
  return fs.existsSync(lookupPath) ? {
88
88
  hbc: lookupPath,
89
89
  sourcemap: `${lookupPath}.map`
@@ -123,7 +123,6 @@ const PLUGIN_NAME = "sentry-plugin";
123
123
  const PLUGIN_SHIM = { name: PLUGIN_NAME };
124
124
  const sentryPlugin = ({ enabled = true,...options } = {}) => {
125
125
  if (enabled === false) return PLUGIN_SHIM;
126
- const { injectionScript, sourceMappingComment } = getSentryDebugIdSnippets();
127
126
  const sentryActions = createClientActions(options);
128
127
  return {
129
128
  name: PLUGIN_NAME,
@@ -152,18 +151,21 @@ const sentryPlugin = ({ enabled = true,...options } = {}) => {
152
151
  sourcemapPath: targetSourcemap
153
152
  });
154
153
  sentryResults.push({
155
- bundle,
156
- sourcemap,
154
+ bundle: targetBundle,
155
+ sourcemap: targetSourcemap,
157
156
  debugId
158
157
  });
159
158
  }
160
159
  this.meta.sentry = sentryResults;
161
160
  }
162
161
  },
163
- config: { esbuild: {
164
- banner: { js: injectionScript },
165
- footer: { js: sourceMappingComment }
166
- } }
162
+ config: () => {
163
+ const { injectionScript, sourceMappingComment } = getSentryDebugIdSnippets();
164
+ return { esbuild: {
165
+ banner: { js: injectionScript },
166
+ footer: { js: sourceMappingComment }
167
+ } };
168
+ }
167
169
  };
168
170
  };
169
171
 
package/dist/index.js CHANGED
@@ -61,7 +61,7 @@ async function injectSentryDebugId(sourcemapPath, debugId) {
61
61
  //#endregion
62
62
  //#region src/resolveHermesBundle.ts
63
63
  function tryResolveHermesBundle(jsBundlePath) {
64
- const lookupPath = `${jsBundlePath}.hbc`;
64
+ const lookupPath = jsBundlePath.replace(/\.js$/, ".hbc");
65
65
  return fs$1.existsSync(lookupPath) ? {
66
66
  hbc: lookupPath,
67
67
  sourcemap: `${lookupPath}.map`
@@ -101,7 +101,6 @@ const PLUGIN_NAME = "sentry-plugin";
101
101
  const PLUGIN_SHIM = { name: PLUGIN_NAME };
102
102
  const sentryPlugin = ({ enabled = true,...options } = {}) => {
103
103
  if (enabled === false) return PLUGIN_SHIM;
104
- const { injectionScript, sourceMappingComment } = getSentryDebugIdSnippets();
105
104
  const sentryActions = createClientActions(options);
106
105
  return {
107
106
  name: PLUGIN_NAME,
@@ -130,18 +129,21 @@ const sentryPlugin = ({ enabled = true,...options } = {}) => {
130
129
  sourcemapPath: targetSourcemap
131
130
  });
132
131
  sentryResults.push({
133
- bundle,
134
- sourcemap,
132
+ bundle: targetBundle,
133
+ sourcemap: targetSourcemap,
135
134
  debugId
136
135
  });
137
136
  }
138
137
  this.meta.sentry = sentryResults;
139
138
  }
140
139
  },
141
- config: { esbuild: {
142
- banner: { js: injectionScript },
143
- footer: { js: sourceMappingComment }
144
- } }
140
+ config: () => {
141
+ const { injectionScript, sourceMappingComment } = getSentryDebugIdSnippets();
142
+ return { esbuild: {
143
+ banner: { js: injectionScript },
144
+ footer: { js: sourceMappingComment }
145
+ } };
146
+ }
145
147
  };
146
148
  };
147
149
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@granite-js/plugin-sentry",
3
3
  "type": "module",
4
- "version": "0.1.15",
4
+ "version": "0.1.17",
5
5
  "description": "Plugin for integrating Sentry with Granite applications",
6
6
  "scripts": {
7
7
  "prepack": "yarn build",
@@ -34,8 +34,8 @@
34
34
  "vitest": "^3.1.4"
35
35
  },
36
36
  "dependencies": {
37
- "@granite-js/plugin-core": "0.1.15",
38
- "@granite-js/utils": "0.1.15",
37
+ "@granite-js/plugin-core": "0.1.17",
38
+ "@granite-js/utils": "0.1.17",
39
39
  "@sentry/cli": "^2.45.0",
40
40
  "es-toolkit": "^1.39.8",
41
41
  "execa": "^5"