diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index aad0f9057953..978e728e1f56 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -44,6 +44,7 @@ env: CACHED_BUILD_PATHS: | ${{ github.workspace }}/dev-packages/*/build ${{ github.workspace }}/packages/*/build + ${{ github.workspace }}/packages/*/lib ${{ github.workspace }}/packages/ember/*.d.ts ${{ github.workspace }}/packages/gatsby/*.d.ts ${{ github.workspace }}/packages/utils/cjs diff --git a/nx.json b/nx.json index d4a90a3a6777..ce5a5117d822 100644 --- a/nx.json +++ b/nx.json @@ -35,6 +35,8 @@ "outputs": [ "{projectRoot}/build/esm", "{projectRoot}/build/cjs", + "{projectRoot}/build/lib/esm", + "{projectRoot}/build/lib/cjs", "{projectRoot}/build/npm/esm", "{projectRoot}/build/npm/cjs" ] diff --git a/package.json b/package.json index 8985b40af8d0..a3fb0123a5ae 100644 --- a/package.json +++ b/package.json @@ -28,7 +28,7 @@ "lint": "run-s lint:prettier lint:lerna", "lint:lerna": "lerna run lint", "lint:prettier": "prettier \"**/*.{md,css,yml,yaml}\" \"packages/**/**.{ts,js,mjs,cjs,mts,cts,jsx,tsx,astro,vue}\" --check", - "lint:es-compatibility": "es-check es2020 ./packages/*/build/{bundles,npm/cjs,cjs}/*.js && es-check es2020 ./packages/*/build/{npm/esm,esm}/*.js --module", + "lint:es-compatibility": "lerna run lint:es-compatibility", "dedupe-deps:check": "yarn-deduplicate yarn.lock --list --fail", "dedupe-deps:fix": "yarn-deduplicate yarn.lock", "postpublish": "lerna run --stream --concurrency 1 postpublish", diff --git a/packages/angular/package.json b/packages/angular/package.json index 3568f8eec2ec..0d2088bd31cb 100644 --- a/packages/angular/package.json +++ b/packages/angular/package.json @@ -53,6 +53,7 @@ "clean": "rimraf build coverage sentry-angular-*.tgz", "fix": "eslint . --format stylish --fix", "lint": "eslint . --format stylish", + "lint:es-compatibility": "es-check es2020 ./build/{esm2020,fesm2015,fesm2020}/*.mjs --module", "test": "yarn test:unit", "test:unit": "vitest run", "test:unit:watch": "vitest --watch", diff --git a/packages/astro/package.json b/packages/astro/package.json index 94ba9f5a2be4..40f9e60f9717 100644 --- a/packages/astro/package.json +++ b/packages/astro/package.json @@ -79,6 +79,7 @@ "clean": "rimraf build coverage sentry-astro-*.tgz", "fix": "eslint . --format stylish --fix", "lint": "eslint . --format stylish", + "lint:es-compatibility": "es-check es2020 ./build/cjs/*.js && es-check es2020 ./build/esm/*.js --module", "test": "yarn test:unit", "test:unit": "vitest run", "test:watch": "vitest --watch", diff --git a/packages/aws-serverless/package.json b/packages/aws-serverless/package.json index 14844c374819..fc4df8a69741 100644 --- a/packages/aws-serverless/package.json +++ b/packages/aws-serverless/package.json @@ -93,6 +93,7 @@ "clean": "rimraf build dist-awslambda-layer coverage sentry-serverless-*.tgz", "fix": "eslint . --format stylish --fix", "lint": "eslint . --format stylish", + "lint:es-compatibility": "es-check es2020 ./build/npm/cjs/*.js && es-check es2020 ./build/npm/esm/*.js --module", "test": "vitest run", "test:watch": "vitest --watch", "yalc:publish": "yalc publish --push --sig" diff --git a/packages/browser-utils/package.json b/packages/browser-utils/package.json index e16c6b5b11a9..9bef36f6caa2 100644 --- a/packages/browser-utils/package.json +++ b/packages/browser-utils/package.json @@ -56,6 +56,7 @@ "clean": "rimraf build coverage sentry-internal-browser-utils-*.tgz", "fix": "eslint . --format stylish --fix", "lint": "eslint . --format stylish", + "lint:es-compatibility": "es-check es2020 ./build/cjs/*.js && es-check es2020 ./build/esm/*.js --module", "test:unit": "vitest run", "test": "vitest run", "test:watch": "vitest --watch", diff --git a/packages/browser/package.json b/packages/browser/package.json index b2eb2bd9376a..2cb52ce71e5a 100644 --- a/packages/browser/package.json +++ b/packages/browser/package.json @@ -67,6 +67,7 @@ "clean": "rimraf build coverage .rpt2_cache sentry-browser-*.tgz", "fix": "eslint . --format stylish --fix", "lint": "eslint . --format stylish", + "lint:es-compatibility": "es-check es2020 ./build/{bundles,npm/cjs}/*.js && es-check es2020 ./build/npm/esm/*.js --module", "size:check": "cat build/bundles/bundle.min.js | gzip -9 | wc -c | awk '{$1=$1/1024; print \"ES2017: \",$1,\"kB\";}'", "test": "vitest run", "test:watch": "vitest --watch", diff --git a/packages/bun/package.json b/packages/bun/package.json index 74a546cba815..ae4b8f820507 100644 --- a/packages/bun/package.json +++ b/packages/bun/package.json @@ -62,6 +62,7 @@ "clean": "rimraf build coverage sentry-bun-*.tgz", "fix": "eslint . --format stylish --fix", "lint": "eslint . --format stylish", + "lint:es-compatibility": "es-check es2020 ./build/cjs/*.js && es-check es2020 ./build/esm/*.js --module", "install:bun": "node ./scripts/install-bun.js", "test": "run-s install:bun test:bun", "test:bun": "bun test", diff --git a/packages/cloudflare/package.json b/packages/cloudflare/package.json index 06386bb10aca..dd98bd01528a 100644 --- a/packages/cloudflare/package.json +++ b/packages/cloudflare/package.json @@ -80,6 +80,7 @@ "clean": "rimraf build coverage sentry-cloudflare-*.tgz", "fix": "eslint . --format stylish --fix", "lint": "eslint . --format stylish", + "lint:es-compatibility": "es-check es2020 ./build/cjs/*.js && es-check es2020 ./build/esm/*.js --module", "test": "yarn test:unit", "test:unit": "vitest run", "test:watch": "vitest --watch", diff --git a/packages/core/package.json b/packages/core/package.json index 135b38526cb3..12868d6183d8 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -54,6 +54,7 @@ "clean": "rimraf build coverage sentry-core-*.tgz", "fix": "eslint . --format stylish --fix", "lint": "eslint . --format stylish", + "lint:es-compatibility": "es-check es2020 ./build/cjs/*.js && es-check es2020 ./build/esm/*.js --module", "test": "vitest run", "test:watch": "vitest --watch", "yalc:publish": "yalc publish --push --sig" diff --git a/packages/deno/package.json b/packages/deno/package.json index a1355995ec19..5c439b13a15e 100644 --- a/packages/deno/package.json +++ b/packages/deno/package.json @@ -39,6 +39,7 @@ "fix": "eslint . --format stylish --fix", "prelint": "yarn deno-types", "lint": "eslint . --format stylish", + "lint:es-compatibility": "es-check es2020 ./build/esm/*.js --module", "install:deno": "node ./scripts/install-deno.mjs", "test": "run-s install:deno deno-types test:unit", "test:unit": "deno test --allow-read --allow-run --no-check", diff --git a/packages/feedback/package.json b/packages/feedback/package.json index 5324f4cef94e..c16a1e297e25 100644 --- a/packages/feedback/package.json +++ b/packages/feedback/package.json @@ -62,6 +62,7 @@ "clean": "rimraf build sentry-internal-feedback-*.tgz", "fix": "eslint . --format stylish --fix", "lint": "eslint . --format stylish", + "lint:es-compatibility": "es-check es2020 ./build/{bundles,npm/cjs}/*.js && es-check es2020 ./build/npm/esm/*.js --module", "test": "vitest run", "test:watch": "vitest --watch", "yalc:publish": "yalc publish --push --sig" diff --git a/packages/gatsby/package.json b/packages/gatsby/package.json index 846a1187af17..50c3c6c3e297 100644 --- a/packages/gatsby/package.json +++ b/packages/gatsby/package.json @@ -75,6 +75,7 @@ "clean": "rimraf build coverage *.d.ts sentry-gatsby-*.tgz", "fix": "eslint . --format stylish --fix", "lint": "eslint . --format stylish", + "lint:es-compatibility": "es-check es2020 ./build/cjs/*.js && es-check es2020 ./build/esm/*.js --module", "test": "vitest run", "test:watch": "vitest --watch", "yalc:publish": "yalc publish --push --sig" diff --git a/packages/google-cloud-serverless/package.json b/packages/google-cloud-serverless/package.json index c58070a24bc1..35b655ef28f5 100644 --- a/packages/google-cloud-serverless/package.json +++ b/packages/google-cloud-serverless/package.json @@ -74,6 +74,7 @@ "clean": "rimraf build coverage sentry-google-cloud-*.tgz", "fix": "eslint . --format stylish --fix", "lint": "eslint . --format stylish", + "lint:es-compatibility": "es-check es2020 ./build/cjs/*.js && es-check es2020 ./build/esm/*.js --module", "test": "vitest run", "test:watch": "vitest --watch", "yalc:publish": "yalc publish --push --sig" diff --git a/packages/integration-shims/package.json b/packages/integration-shims/package.json index c79016eb2ae1..5cf41c378584 100644 --- a/packages/integration-shims/package.json +++ b/packages/integration-shims/package.json @@ -43,7 +43,8 @@ "build:types:watch": "tsc -p tsconfig.types.json --watch", "clean": "rimraf build", "fix": "eslint . --format stylish --fix", - "lint": "eslint . --format stylish" + "lint": "eslint . --format stylish", + "lint:es-compatibility": "es-check es2020 ./build/cjs/*.js && es-check es2020 ./build/esm/*.js --module" }, "repository": { "type": "git", diff --git a/packages/nestjs/package.json b/packages/nestjs/package.json index 3e67a79c1546..61f74c614b4f 100644 --- a/packages/nestjs/package.json +++ b/packages/nestjs/package.json @@ -77,6 +77,7 @@ "clean": "rimraf build coverage sentry-nestjs-*.tgz ./*.d.ts ./*.d.ts.map", "fix": "eslint . --format stylish --fix", "lint": "eslint . --format stylish", + "lint:es-compatibility": "es-check es2020 ./build/cjs/*.js && es-check es2020 ./build/esm/*.js --module", "test": "vitest run", "test:watch": "vitest --watch", "yalc:publish": "yalc publish --push --sig" diff --git a/packages/nextjs/package.json b/packages/nextjs/package.json index f2acca4d7be8..08b715097105 100644 --- a/packages/nextjs/package.json +++ b/packages/nextjs/package.json @@ -115,6 +115,7 @@ "clean": "rimraf build coverage sentry-nextjs-*.tgz", "fix": "eslint . --format stylish --fix", "lint": "eslint . --format stylish", + "lint:es-compatibility": "es-check es2020 ./build/cjs/*.js && es-check es2020 ./build/esm/*.js --module", "test": "yarn test:unit", "test:all": "run-s test:unit", "test:unit": "vitest run", diff --git a/packages/node/package.json b/packages/node/package.json index 866a2810db0e..9222dc18efe4 100644 --- a/packages/node/package.json +++ b/packages/node/package.json @@ -119,6 +119,7 @@ "clean": "rimraf build coverage sentry-node-*.tgz", "fix": "eslint . --format stylish --fix", "lint": "eslint . --format stylish", + "lint:es-compatibility": "es-check es2020 ./build/cjs/*.js && es-check es2020 ./build/esm/*.js --module", "test": "yarn test:unit", "test:unit": "vitest run", "test:watch": "vitest --watch", diff --git a/packages/nuxt/package.json b/packages/nuxt/package.json index 8d3f5918573b..93ee5106d82f 100644 --- a/packages/nuxt/package.json +++ b/packages/nuxt/package.json @@ -70,6 +70,7 @@ "clean": "rimraf build coverage sentry-nuxt-*.tgz", "fix": "eslint . --format stylish --fix", "lint": "eslint . --format stylish", + "lint:es-compatibility": "es-check es2020 ./build/cjs/*.js && es-check es2020 ./build/esm/*.js --module && es-check es2020 ./build/module/*.cjs && es-check es2020 ./build/module/*.mjs --module", "test": "yarn test:unit", "test:unit": "vitest run", "test:watch": "vitest --watch", diff --git a/packages/opentelemetry/package.json b/packages/opentelemetry/package.json index a9460e20c248..a745d545ff4f 100644 --- a/packages/opentelemetry/package.json +++ b/packages/opentelemetry/package.json @@ -73,6 +73,7 @@ "clean": "rimraf build coverage sentry-opentelemetry-*.tgz", "fix": "eslint . --format stylish --fix", "lint": "eslint . --format stylish", + "lint:es-compatibility": "es-check es2020 ./build/cjs/*.js && es-check es2020 ./build/esm/*.js --module", "test": "yarn test:unit", "test:unit": "vitest run", "test:watch": "vitest --watch", diff --git a/packages/profiling-node/package.json b/packages/profiling-node/package.json index bd0077f68249..6f79b6b23201 100644 --- a/packages/profiling-node/package.json +++ b/packages/profiling-node/package.json @@ -46,6 +46,7 @@ "scripts": { "clean": "rm -rf build && rm -rf lib", "lint": "eslint . --format stylish", + "lint:es-compatibility": "es-check es2020 ./lib/cjs/*.js && es-check es2020 ./lib/esm/*.js --module", "fix": "eslint . --format stylish --fix", "build": "yarn build:lib", "build:lib": "yarn build:types && rollup -c rollup.npm.config.mjs", diff --git a/packages/react-router/package.json b/packages/react-router/package.json index bc0ab65a1bc4..ff1d52a11fa4 100644 --- a/packages/react-router/package.json +++ b/packages/react-router/package.json @@ -67,6 +67,7 @@ "clean": "rimraf build coverage sentry-react-router-*.tgz", "fix": "eslint . --format stylish --fix", "lint": "eslint . --format stylish", + "lint:es-compatibility": "es-check es2020 ./build/cjs/*.js && es-check es2020 ./build/esm/*.js --module", "test": "yarn test:unit", "test:unit": "vitest run", "test:watch": "vitest --watch", diff --git a/packages/react/package.json b/packages/react/package.json index f970a4acc968..6fdefba78da2 100644 --- a/packages/react/package.json +++ b/packages/react/package.json @@ -85,6 +85,7 @@ "clean": "rimraf build coverage sentry-react-*.tgz", "fix": "eslint . --format stylish --fix", "lint": "eslint . --format stylish", + "lint:es-compatibility": "es-check es2020 ./build/cjs/*.js && es-check es2020 ./build/esm/*.js --module", "test": "vitest run", "test:watch": "vitest --watch", "yalc:publish": "yalc publish --push --sig" diff --git a/packages/remix/package.json b/packages/remix/package.json index 7507eb8d462e..62b36bbcc643 100644 --- a/packages/remix/package.json +++ b/packages/remix/package.json @@ -96,6 +96,7 @@ "clean": "rimraf build coverage sentry-remix-*.tgz", "fix": "eslint . --format stylish --fix", "lint": "eslint . --format stylish", + "lint:es-compatibility": "es-check es2020 ./build/cjs/*.js && es-check es2020 ./build/esm/*.js --module", "test": "yarn test:unit", "test:integration": "run-s test:integration:clean test:integration:prepare test:integration:client test:integration:server", "test:integration:ci": "run-s test:integration:clean test:integration:prepare test:integration:client:ci test:integration:server", diff --git a/packages/replay-canvas/package.json b/packages/replay-canvas/package.json index 408e430794ed..ff4f05fe67e9 100644 --- a/packages/replay-canvas/package.json +++ b/packages/replay-canvas/package.json @@ -47,6 +47,7 @@ "clean": "rimraf build sentry-replay-*.tgz", "fix": "eslint . --format stylish --fix", "lint": "eslint . --format stylish", + "lint:es-compatibility": "es-check es2020 ./build/{bundles,npm/cjs}/*.js && es-check es2020 ./build/npm/esm/*.js --module", "test": "vitest run", "test:watch": "vitest --watch", "yalc:publish": "yalc publish --push --sig" diff --git a/packages/replay-internal/package.json b/packages/replay-internal/package.json index 545ed7d43f54..1a7007b55e15 100644 --- a/packages/replay-internal/package.json +++ b/packages/replay-internal/package.json @@ -54,6 +54,7 @@ "lint": "run-s lint:prettier lint:eslint", "lint:eslint": "eslint . --format stylish", "lint:prettier": "prettier --check \"src/**/*.ts\" \"test/**/*.ts\"", + "lint:es-compatibility": "es-check es2020 ./build/{bundles,npm/cjs}/*.js && es-check es2020 ./build/npm/esm/*.js --module", "test": "vitest run", "test:watch": "vitest --watch", "yalc:publish": "yalc publish --push --sig" diff --git a/packages/replay-worker/package.json b/packages/replay-worker/package.json index a872e89489ab..2818255532bb 100644 --- a/packages/replay-worker/package.json +++ b/packages/replay-worker/package.json @@ -32,6 +32,7 @@ "clean": "rimraf build", "fix": "eslint . --format stylish --fix", "lint": "eslint . --format stylish", + "lint:es-compatibility": "es-check es2020 ./build/esm/*.js --module", "test": "vitest run", "test:watch": "vitest --watch" }, diff --git a/packages/solid/package.json b/packages/solid/package.json index 3273b2300ac5..75ffb0372bf7 100644 --- a/packages/solid/package.json +++ b/packages/solid/package.json @@ -80,6 +80,7 @@ "clean": "rimraf build coverage sentry-solid-*.tgz ./*.d.ts ./*.d.ts.map", "fix": "eslint . --format stylish --fix", "lint": "eslint . --format stylish", + "lint:es-compatibility": "es-check es2020 ./build/cjs/*.js && es-check es2020 ./build/esm/*.js --module", "test": "vitest run", "test:watch": "vitest --watch", "yalc:publish": "yalc publish --push --sig" diff --git a/packages/solidstart/package.json b/packages/solidstart/package.json index 541a226bfe75..8b7ad3853b7b 100644 --- a/packages/solidstart/package.json +++ b/packages/solidstart/package.json @@ -96,6 +96,7 @@ "clean": "rimraf build coverage sentry-solidstart-*.tgz ./*.d.ts ./*.d.ts.map ./client ./server", "fix": "eslint . --format stylish --fix", "lint": "eslint . --format stylish", + "lint:es-compatibility": "es-check es2020 ./build/cjs/*.js && es-check es2020 ./build/esm/*.js --module", "test": "yarn test:unit", "test:unit": "vitest run", "test:watch": "vitest --watch", diff --git a/packages/svelte/package.json b/packages/svelte/package.json index 962a56a2f9fb..3b703069eaec 100644 --- a/packages/svelte/package.json +++ b/packages/svelte/package.json @@ -67,6 +67,7 @@ "clean": "rimraf build coverage sentry-svelte-*.tgz", "fix": "eslint . --format stylish --fix", "lint": "eslint . --format stylish", + "lint:es-compatibility": "es-check es2020 ./build/cjs/*.js && es-check es2020 ./build/esm/*.js --module", "test": "vitest run", "test:watch": "vitest --watch", "yalc:publish": "yalc publish --push --sig" diff --git a/packages/sveltekit/package.json b/packages/sveltekit/package.json index 60d96f93c116..9e2ef43a8716 100644 --- a/packages/sveltekit/package.json +++ b/packages/sveltekit/package.json @@ -75,6 +75,7 @@ "clean": "rimraf build coverage sentry-sveltekit-*.tgz", "fix": "eslint . --format stylish --fix", "lint": "eslint . --format stylish", + "lint:es-compatibility": "es-check es2020 ./build/cjs/*.js && es-check es2020 ./build/esm/*.js --module", "test": "yarn test:unit", "test:unit": "vitest run", "test:watch": "vitest --watch", diff --git a/packages/tanstackstart-react/package.json b/packages/tanstackstart-react/package.json index 852897606cd3..22cf7155ac0b 100644 --- a/packages/tanstackstart-react/package.json +++ b/packages/tanstackstart-react/package.json @@ -74,6 +74,7 @@ "clean": "rimraf build coverage sentry-tanstackstart-react-*.tgz", "fix": "eslint . --format stylish --fix", "lint": "eslint . --format stylish", + "lint:es-compatibility": "es-check es2020 ./build/cjs/*.js && es-check es2020 ./build/esm/*.js --module", "test": "yarn test:unit", "test:unit": "vitest run", "test:watch": "vitest --watch", diff --git a/packages/tanstackstart/package.json b/packages/tanstackstart/package.json index 22beff0a921a..733ec6bcd4d5 100644 --- a/packages/tanstackstart/package.json +++ b/packages/tanstackstart/package.json @@ -55,6 +55,7 @@ "clean": "rimraf build coverage sentry-tanstackstart-*.tgz", "fix": "eslint . --format stylish --fix", "lint": "eslint . --format stylish", + "lint:es-compatibility": "es-check es2020 ./build/cjs/*.js && es-check es2020 ./build/esm/*.js --module", "test": "yarn test:unit", "test:unit": "vitest run", "test:watch": "vitest --watch", diff --git a/packages/types/package.json b/packages/types/package.json index fd150a189432..649f96564fe2 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -52,6 +52,7 @@ "build:tarball": "npm pack", "clean": "rimraf build sentry-types-*.tgz", "lint": "eslint . --format stylish", + "lint:es-compatibility": "es-check es2020 ./build/cjs/*.js && es-check es2020 ./build/esm/*.js --module", "fix": "eslint . --format stylish --fix", "yalc:publish": "yalc publish --push --sig" }, diff --git a/packages/vercel-edge/package.json b/packages/vercel-edge/package.json index c3c9f8b7a967..c78ad9f5e1b1 100644 --- a/packages/vercel-edge/package.json +++ b/packages/vercel-edge/package.json @@ -66,6 +66,7 @@ "clean": "rimraf build coverage sentry-vercel-edge-*.tgz", "fix": "eslint . --format stylish --fix", "lint": "eslint . --format stylish", + "lint:es-compatibility": "es-check es2020 ./build/cjs/*.js && es-check es2020 ./build/esm/*.js --module", "test": "vitest run", "test:watch": "vitest --watch", "yalc:publish": "yalc publish --push --sig" diff --git a/packages/vue/package.json b/packages/vue/package.json index 241c6cde005d..4371d528b739 100644 --- a/packages/vue/package.json +++ b/packages/vue/package.json @@ -70,6 +70,7 @@ "clean": "rimraf build coverage sentry-vue-*.tgz", "fix": "eslint . --format stylish --fix", "lint": "eslint . --format stylish", + "lint:es-compatibility": "es-check es2020 ./build/cjs/*.js && es-check es2020 ./build/esm/*.js --module", "test": "vitest run", "test:watch": "vitest --watch", "yalc:publish": "yalc publish --push --sig" diff --git a/packages/wasm/package.json b/packages/wasm/package.json index b1c30bca7dbe..243d4110d8f8 100644 --- a/packages/wasm/package.json +++ b/packages/wasm/package.json @@ -62,6 +62,7 @@ "clean": "rimraf build coverage sentry-wasm-*.tgz", "fix": "eslint . --format stylish --fix", "lint": "eslint . --format stylish", + "lint:es-compatibility": "es-check es2020 ./build/{bundles,npm/cjs}/*.js && es-check es2020 ./build/npm/esm/*.js --module", "yalc:publish": "yalc publish --push --sig" }, "volta": {