Skip to content

fix(types): Point to type definitions in dist folder #4745

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 21, 2022

Conversation

lforst
Copy link
Contributor

@lforst lforst commented Mar 21, 2022

Fixes #4744

#4724 introduced an issue where we point to type definitions in the build folder. For some reason, this build folder did not get published in the build artefact.

This PR changes the pointer to the type definitions back to where we know they exist. We will update this again in the future.

@lforst lforst requested review from AbhiPrasad and Lms24 March 21, 2022 17:26
@lforst lforst force-pushed the lforst-hotfix-typedef-entrypoint branch from d2a32d4 to ac53c46 Compare March 21, 2022 17:41
@github-actions
Copy link
Contributor

size-limit report

Path Base Size (2e01497) Current Size Change
@sentry/browser - ES5 CDN Bundle (gzipped + minified) 19.49 KB 19.49 KB +0.01% 🔺
@sentry/browser - ES5 CDN Bundle (minified) 62.17 KB 62.17 KB 0%
@sentry/browser - ES6 CDN Bundle (gzipped + minified) 18.12 KB 18.12 KB -0.01% 🔽
@sentry/browser - ES6 CDN Bundle (minified) 55.5 KB 55.5 KB 0%
@sentry/browser - Webpack (gzipped + minified) 22.6 KB 22.6 KB 0%
@sentry/browser - Webpack (minified) 79.21 KB 79.21 KB 0%
@sentry/react - Webpack (gzipped + minified) 22.63 KB 22.63 KB 0%
@sentry/nextjs Client - Webpack (gzipped + minified) 47.6 KB 47.6 KB 0%
@sentry/browser + @sentry/tracing - ES5 CDN Bundle (gzipped + minified) 25.36 KB 25.37 KB +0.01% 🔺
@sentry/browser + @sentry/tracing - ES6 CDN Bundle (gzipped + minified) 23.72 KB 23.72 KB +0.01% 🔺

@lforst lforst merged commit 040a012 into master Mar 21, 2022
@lforst lforst deleted the lforst-hotfix-typedef-entrypoint branch March 21, 2022 18:04
@dashed
Copy link
Member

dashed commented Mar 21, 2022

@lforst @AbhiPrasad Do these files (tsconfig.types.json) also need to be adjusted?

Lms24 added a commit that referenced this pull request Mar 31, 2022
…ints (#4824)

* All tarballs now include the `build/types` directory. All `.npmignore`s were adjusted to include this directory.
* The `types` entry point in all `package.json`s are now adjusted to the new types directory

Proper bugfix for 6.19.0 regression:
With PR #4724, we introduced separate building of type declaration files which would be written to `<sdk>/build/types`. Furthermore, we adjusted the `types` entry point in the `package.json`s to this new directory. To avoid a breaking change, we kept type declarations in `dist` and `esm`. However, a bug in this PR caused a small regression in most of our SDKs: The new types directory was not included in most of our SDK tarballs. Subsequently, we released a hot fix via #4745 which simply reset the entry points back to their previous path (`dist/index.d.ts`) in all SDKs. 

Additional adjustments w.r.t. creating tarballs to improve consistency:
* Browser: Adjusted `postbuild.sh` to copy `.npmignore` to `./build`
* Gatsby: Use `.npmignore` instead of `files` property in `package.json`
* Utils: Changed `.npmignore` to be more similar to our other packages
* WASM: Changed `.npmignore` to be more similar to our other packages
* Next.js: Added `.npmignore`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Could not find a declaration file for module '@sentry/node'
4 participants