Skip to content

Disable sourcemap emission to avoid missing source warnings#1268

Merged
cristianrgreco merged 1 commit intotestcontainers:mainfrom
tmm:tmm/disable-sourcemaps
Mar 17, 2026
Merged

Disable sourcemap emission to avoid missing source warnings#1268
cristianrgreco merged 1 commit intotestcontainers:mainfrom
tmm:tmm/disable-sourcemaps

Conversation

@tmm
Copy link
Contributor

@tmm tmm commented Mar 15, 2026

Disable sourcemap emission by setting "sourceMap": false in tsconfig.base.json.

The published npm packages emit .js.map files that reference ../src/*.ts source files, but src/ is excluded from the published files in each module's package.json. This causes Node.js to warn:

Sourcemap for "..." points to missing source files.

For example, @testcontainers/postgresql references ../src/postgresql-container.ts"

// build/postgresql-container.js.map
{"version":3,"file":"postgresql-container.js","sourceRoot":"","sources":["../src/postgresql-container.ts"],"names":[],"mappings":"..."}

But src/ does not exist:

005658_Firefox_2026-03-15-18 20 46@2x

Since the source files are never published, the sourcemaps are not useful to consumers and should not be emitted. (Could also allow src/ in packages instead of disabling sourcemap generation.)

@netlify
Copy link

netlify bot commented Mar 15, 2026

Deploy Preview for testcontainers-node ready!

Name Link
🔨 Latest commit 8e135c6
🔍 Latest deploy log https://app.netlify.com/projects/testcontainers-node/deploys/69b72fe49e59690008b75a4b
😎 Deploy Preview https://deploy-preview-1268--testcontainers-node.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@cristianrgreco cristianrgreco added the maintenance Improvements that do not change functionality label Mar 17, 2026
@cristianrgreco cristianrgreco merged commit 9261021 into testcontainers:main Mar 17, 2026
13 checks passed
@cristianrgreco
Copy link
Collaborator

Thanks for raising @tmm !

@tmm tmm deleted the tmm/disable-sourcemaps branch March 17, 2026 14:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintenance Improvements that do not change functionality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants