Skip to content

Commit

Permalink
ref(build): Rename CDN bundles to be es6 per default (#4958)
Browse files Browse the repository at this point in the history
  • Loading branch information
lforst authored and lobsterkatie committed Apr 26, 2022
1 parent c970930 commit 8e31d21
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 19 deletions.
12 changes: 6 additions & 6 deletions .size-limit.js
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
module.exports = [
{
name: '@sentry/browser - ES5 CDN Bundle (gzipped + minified)',
path: 'packages/browser/build/bundles/bundle.min.js',
path: 'packages/browser/build/bundles/bundle.es5.min.js',
gzip: true,
limit: '100 KB',
},
{
name: '@sentry/browser - ES5 CDN Bundle (minified)',
path: 'packages/browser/build/bundles/bundle.min.js',
path: 'packages/browser/build/bundles/bundle.es5.min.js',
gzip: false,
limit: '120 KB',
},
{
name: '@sentry/browser - ES6 CDN Bundle (gzipped + minified)',
path: 'packages/browser/build/bundles/bundle.es6.min.js',
path: 'packages/browser/build/bundles/bundle.min.js',
gzip: true,
limit: '100 KB',
},
{
name: '@sentry/browser - ES6 CDN Bundle (minified)',
path: 'packages/browser/build/bundles/bundle.es6.min.js',
path: 'packages/browser/build/bundles/bundle.min.js',
gzip: false,
limit: '120 KB',
},
Expand Down Expand Up @@ -53,13 +53,13 @@ module.exports = [
},
{
name: '@sentry/browser + @sentry/tracing - ES5 CDN Bundle (gzipped + minified)',
path: 'packages/tracing/build/bundles/bundle.tracing.min.js',
path: 'packages/tracing/build/bundles/bundle.tracing.es5.min.js',
gzip: true,
limit: '100 KB',
},
{
name: '@sentry/browser + @sentry/tracing - ES6 CDN Bundle (gzipped + minified)',
path: 'packages/tracing/build/bundles/bundle.tracing.es6.min.js',
path: 'packages/tracing/build/bundles/bundle.tracing.min.js',
gzip: true,
limit: '100 KB',
},
Expand Down
2 changes: 1 addition & 1 deletion packages/browser/rollup.bundle.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const builds = [];
isAddOn: false,
jsVersion,
licenseTitle: '@sentry/browser',
outputFileBase: `bundles/bundle${jsVersion === 'es6' ? '.es6' : ''}`,
outputFileBase: `bundles/bundle${jsVersion === 'es5' ? '.es5' : ''}`,
});

builds.push(...makeBundleConfigVariants(baseBundleConfig));
Expand Down
16 changes: 8 additions & 8 deletions packages/integration-tests/utils/generatePlugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,18 +19,18 @@ const BUNDLE_PATHS: Record<string, Record<string, string>> = {
browser: {
cjs: 'build/npm/cjs/index.js',
esm: 'build/npm/esm/index.js',
bundle_es5: 'build/bundles/bundle.js',
bundle_es5_min: 'build/bundles/bundle.min.js',
bundle_es6: 'build/bundles/bundle.es6.js',
bundle_es6_min: 'build/bundles/bundle.es6.min.js',
bundle_es5: 'build/bundles/bundle.es5.js',
bundle_es5_min: 'build/bundles/bundle.es5.min.js',
bundle_es6: 'build/bundles/bundle.js',
bundle_es6_min: 'build/bundles/bundle.min.js',
},
tracing: {
cjs: 'build/npm/cjs/index.js',
esm: 'build/npm/esm/index.js',
bundle_es5: 'build/bundles/bundle.tracing.js',
bundle_es5_min: 'build/bundles/bundle.tracing.min.js',
bundle_es6: 'build/bundles/bundle.tracing.es6.js',
bundle_es6_min: 'build/bundles/bundle.tracing.es6.min.js',
bundle_es5: 'build/bundles/bundle.tracing.es5.js',
bundle_es5_min: 'build/bundles/bundle.tracing.es5.min.js',
bundle_es6: 'build/bundles/bundle.tracing.js',
bundle_es6_min: 'build/bundles/bundle.tracing.min.js',
},
};

Expand Down
2 changes: 1 addition & 1 deletion packages/integrations/rollup.bundle.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const baseBundleConfig = makeBaseBundleConfig({
isAddOn: true,
jsVersion,
licenseTitle: '@sentry/integrations',
outputFileBase: `bundles/${file.replace('.ts', '')}${jsVersion === 'ES6' ? '.es6' : ''}`,
outputFileBase: `bundles/${file.replace('.ts', '')}${jsVersion === 'ES5' ? '.es5' : ''}`,
});

// TODO We only need `commonjs` for localforage (used in the offline plugin). Once that's fixed, this can come out.
Expand Down
2 changes: 1 addition & 1 deletion packages/tracing/rollup.bundle.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const builds = [];
isAddOn: false,
jsVersion,
licenseTitle: '@sentry/tracing & @sentry/browser',
outputFileBase: `bundles/bundle.tracing${jsVersion === 'es6' ? '.es6' : ''}`,
outputFileBase: `bundles/bundle.tracing${jsVersion === 'es5' ? '.es5' : ''}`,
});

builds.push(...makeBundleConfigVariants(baseBundleConfig));
Expand Down
2 changes: 1 addition & 1 deletion packages/vue/rollup.bundle.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { makeBaseBundleConfig, makeBundleConfigVariants } from '../../rollup/ind
const baseBundleConfig = makeBaseBundleConfig({
input: 'src/index.bundle.ts',
isAddOn: false,
jsVersion: 'es5',
jsVersion: 'es6',
licenseTitle: '@sentry/vue',
outputFileBase: 'bundle.vue',
});
Expand Down
2 changes: 1 addition & 1 deletion packages/wasm/rollup.bundle.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { makeBaseBundleConfig, makeBundleConfigVariants } from '../../rollup/ind
const baseBundleConfig = makeBaseBundleConfig({
input: 'src/index.ts',
isAddOn: true,
jsVersion: 'es5',
jsVersion: 'es6',
licenseTitle: '@sentry/wasm',
outputFileBase: 'bundles/wasm',
});
Expand Down

0 comments on commit 8e31d21

Please sign in to comment.