@sentry/bundler-plugin-core 0.2.2 → 0.2.4
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/dist/cjs/index.js +10 -5
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/index.mjs +10 -5
- package/dist/esm/index.mjs.map +1 -1
- package/dist/types/sentry/telemetry.d.ts +1 -1
- package/package.json +4 -4
package/dist/esm/index.mjs
CHANGED
|
@@ -927,12 +927,16 @@ function validateOptions(options, logger) {
|
|
|
927
927
|
}
|
|
928
928
|
|
|
929
929
|
var SENTRY_SAAS_HOSTNAME = "sentry.io";
|
|
930
|
-
function makeSentryClient(dsn, allowedToSendTelemetryPromise) {
|
|
930
|
+
function makeSentryClient(dsn, allowedToSendTelemetryPromise, userProject) {
|
|
931
931
|
var client = new NodeClient({
|
|
932
932
|
dsn: dsn,
|
|
933
933
|
tracesSampleRate: 1,
|
|
934
934
|
sampleRate: 1,
|
|
935
|
-
|
|
935
|
+
// We're also sending the user project in dist because it is an indexed fieldso we can use this data effectively in
|
|
936
|
+
// a dashboard.
|
|
937
|
+
// Yes, this is slightly abusing the purpose of this field.
|
|
938
|
+
dist: userProject,
|
|
939
|
+
release: "0.2.4",
|
|
936
940
|
integrations: [],
|
|
937
941
|
tracePropagationTargets: ["sentry.io/api"],
|
|
938
942
|
stackParser: defaultStackParser,
|
|
@@ -1645,7 +1649,7 @@ function getDryRunCLI(cli, logger) {
|
|
|
1645
1649
|
// This probably doesn't work for all bundlers but for rollup it does.
|
|
1646
1650
|
|
|
1647
1651
|
var RELEASE_INJECTOR_ID = "\0sentry-release-injector";
|
|
1648
|
-
var ALLOWED_TRANSFORMATION_FILE_ENDINGS = [".js", ".ts", ".jsx", ".tsx", ".
|
|
1652
|
+
var ALLOWED_TRANSFORMATION_FILE_ENDINGS = [".js", ".ts", ".jsx", ".tsx", ".mjs"];
|
|
1649
1653
|
/**
|
|
1650
1654
|
* The sentry bundler plugin concerns itself with two things:
|
|
1651
1655
|
* - Release injection
|
|
@@ -1678,7 +1682,7 @@ var unplugin = createUnplugin(function (options, unpluginMetaContext) {
|
|
|
1678
1682
|
var internalOptions = normalizeUserOptions(options);
|
|
1679
1683
|
var allowedToSendTelemetryPromise = shouldSendTelemetry(internalOptions);
|
|
1680
1684
|
|
|
1681
|
-
var _makeSentryClient = makeSentryClient("https://4c2bae7d9fbc413e8f7385f55c515d51@o1.ingest.sentry.io/6690737", allowedToSendTelemetryPromise),
|
|
1685
|
+
var _makeSentryClient = makeSentryClient("https://4c2bae7d9fbc413e8f7385f55c515d51@o1.ingest.sentry.io/6690737", allowedToSendTelemetryPromise, internalOptions.project),
|
|
1682
1686
|
sentryHub = _makeSentryClient.sentryHub,
|
|
1683
1687
|
sentryClient = _makeSentryClient.sentryClient;
|
|
1684
1688
|
|
|
@@ -1894,11 +1898,12 @@ var unplugin = createUnplugin(function (options, unpluginMetaContext) {
|
|
|
1894
1898
|
}
|
|
1895
1899
|
});
|
|
1896
1900
|
} else {
|
|
1901
|
+
var isInNodeModules = normalizedId.split(path.sep).includes("node_modules");
|
|
1897
1902
|
var pathIsOrdinary = !normalizedId.includes("?") && !normalizedId.includes("#");
|
|
1898
1903
|
var pathHasAllowedFileEnding = ALLOWED_TRANSFORMATION_FILE_ENDINGS.some(function (allowedFileEnding) {
|
|
1899
1904
|
return normalizedId.endsWith(allowedFileEnding);
|
|
1900
1905
|
});
|
|
1901
|
-
return pathIsOrdinary && pathHasAllowedFileEnding;
|
|
1906
|
+
return !isInNodeModules && pathIsOrdinary && pathHasAllowedFileEnding;
|
|
1902
1907
|
}
|
|
1903
1908
|
},
|
|
1904
1909
|
|