Repository navigation
Conversation
- Whitelist published files (dist, src) so tarballs no longer ship test/ and tsconfig.json; react-native now ships src for its source maps - Mark @exceptionless/angularjs as side-effectful since importing it registers the Angular module - Drop node's unpkg/jsdelivr fields that pointed at a file its build never produces - Add types conditions to exports and type the react-native expo-plugin subpath - Use git+https repository URLs with package directories and add homepage - Add an IIFE build of @exceptionless/browser (dist/index.global[.min].js) exposing a global exceptionless object, with docs and a jsdom test - Version CDN snippets (@3) and add LICENSE to vue - Add lint:packages (publint + attw) root script
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues are identified for the packaging and browser-bundle changes.
No open issues 🎉
What changed in this PR
Improves npm packaging across the Exceptionless SDKs and adds a classic-script browser build alongside the existing ES module bundles.
Changes:
- Standardizes package metadata, published files, and type exports.
- Adds browser global bundles, startup tests, and CDN documentation.
- Introduces package validation with publint and Are the Types Wrong.
| File | Description |
|---|---|
| README.md | Documents classic scripts and versioned CDN URLs. |
| packages/vue/package.json | Updates metadata, exports, and published files. |
| packages/vue/LICENSE | Adds the Apache 2.0 license. |
| packages/react/package.json | Updates metadata, exports, and published files. |
| packages/react-native/package.json | Includes sources and Expo plugin type exports. |
| packages/react-native/expo-plugin/index.d.cts | Declares Expo plugin types. |
| packages/node/package.json | Updates packaging and removes invalid CDN targets. |
| packages/core/package.json | Updates metadata, exports, and published files. |
| packages/browser/test/global-bundle.test.ts | Tests both classic bundles and client startup. |
| packages/browser/README.md | Documents classic-script installation. |
| packages/browser/package.json | Adds global builds and updates packaging. |
| packages/angularjs/README.md | Pins the CDN example to major version 3. |
| packages/angularjs/package.json | Preserves registration side effects and updates packaging. |
| package.json | Adds package-validation tooling and command. |
| package-lock.json | Locks new validation dependencies. |
| .agents/skills/exceptionless-javascript/references/client-browser.md | Documents classic builds and versioned CDN usage. |
| .agents/skills/exceptionless-javascript/references/client-angularjs.md | Pins the CDN example to major version 3. |
Review effort: Balanced
npm test on a fresh checkout failed because the test reads dist. CI still runs it and fails if the bundle is missing.
| }, | ||
| "scripts": { | ||
| "build": "tsc -p tsconfig.json && esbuild src/index.ts --bundle --sourcemap --target=es2022 --format=esm --outfile=dist/index.bundle.js && esbuild src/index.ts --bundle --minify --sourcemap --target=es2022 --format=esm --outfile=dist/index.bundle.min.js", | ||
| "build": "tsc -p tsconfig.json && esbuild src/index.ts --bundle --sourcemap --target=es2022 --format=esm --outfile=dist/index.bundle.js && esbuild src/index.ts --bundle --minify --sourcemap --target=es2022 --format=esm --outfile=dist/index.bundle.min.js && esbuild src/index.ts --bundle --sourcemap --target=es2022 --format=iife --global-name=exceptionless --outfile=dist/index.global.js && esbuild src/index.ts --bundle --minify --sourcemap --target=es2022 --format=iife --global-name=exceptionless --outfile=dist/index.global.min.js", |
There was a problem hiding this comment.
we should NOT be supporting cjs in 2026, every single javascript runtime is fully ESM compatible including tooling to take this lib and make an iffy bundle. Also we should ditch the legacy angular package it's not supported, if anything update it to be latest angular which would be esm.
There was a problem hiding this comment.
Agreed. Removed the IIFE build, its test and the script-tag docs in cb10d05. The packages stay ESM-only (attw runs with --profile esm-only). Dropping AngularJS and adding a modern Angular package is a 4.0 change, so it goes in its own PR rather than this one.
Packaging fixes for the SDK packages. All changes are non-breaking for 3.x consumers. The packages stay ESM-only; no CommonJS or IIFE output is added.
fileswhitelist (dist,src). Tarballs no longer shiptest/ortsconfig.json.srcis kept because the tscsourceMap/declarationMapoutput points to../src. react-native already had afileslist but left outsrc, so its maps were broken; it now includessrc.sideEffects: true: importing it registers theexceptionlessAngular module, so bundlers must not drop the import. The other packages only create a client instance when imported, sofalsestays correct for them.unpkg/jsdelivrfields. They pointed atdist/index.bundle.min.js, which the node build never produces (publint reported this as an error).exports: addedtypes/defaultconditions;main/typesare kept. The react-native./expo-pluginsubpath now has types (expo-plugin/index.d.cts), which fixes attw's UntypedResolution error.@3.repositoryis nowgit+httpswithdirectory,homepageis added, and vue gets a LICENSE file.npm run lint:packages: runspublint --strictandattw --pack . --profile esm-onlyon each SDK package after a build. Both new devDependencies have no install scripts, and the set ofnpm auditfindings is the same as before. This isn't in CI yet; it should be added after the workflow-hardening PR lands.Tarball file counts (
npm pack --dry-run; the "before" numbers match the published 3.2.1):Verification:
npm ci, all SDK package builds,npm test(348 passed),npm run lintandnpm run lint:packagespass.npm run buildstill fails at the Next.js example with the knownSecurityFatalErrorfor next@16.4.1. That's not caused by this PR; the open Dependabot PR fixes it.