Skip to content

lib: add api to detect whether source-maps are enabled - #46391

Merged
nodejs-github-bot merged 1 commit into
nodejs:mainfrom
sapphi-red:process/get-sourcemaps-enabled
Aug 17, 2023
Merged

lib: add api to detect whether source-maps are enabled#46391
nodejs-github-bot merged 1 commit into
nodejs:mainfrom
sapphi-red:process/get-sourcemaps-enabled

Conversation

@sapphi-red

Copy link
Copy Markdown
Contributor

Add process.getSourceMapsEnabled to detect whether source-maps are enabled.

Fixes#46304

@nodejs-github-botnodejs-github-bot added needs-ci PRs that need a full CI run. process Issues and PRs related to the process subsystem. labels Jan 28, 2023
@bricss

Copy link
Copy Markdown
Contributor

IMO, its hafta be process.isSourceMapsEnabled 🧐 coz process.getSourceMapsEnabled very much confusing name for such function and whatever it does 🤔

Comment threaddoc/api/process.md Outdated
@sapphi-red

Copy link
Copy Markdown
ContributorAuthor

I found that other boolean properties doesn't have is prefix. So I changed to process.sourceMapsEnabled instead of process.isSourceMapsEnabled. If I should rename it to isSourceMapEnabled, I will change it.

Comment threaddoc/api/process.md Outdated
@panvapanva added the semver-minor PRs that contain new features and should be released in the next minor version. label Jan 29, 2023
Comment threadlib/internal/process/pre_execution.js Outdated
Comment threadlib/internal/source_map/source_map_cache.js Outdated
@sapphi-red

This comment was marked as outdated.

@sapphi-red
sapphi-red requested review from anonrig and panva and removed request for anonrig and panvaMarch 1, 2023 07:20
@sapphi-red

Copy link
Copy Markdown
ContributorAuthor

I resolved the conflict and moved the code to lib/internal/bootstrap/node.js to align with process.setSourceMapsEnabled.

@atlowChemiatlowChemi added the request-ci Add this label to start a Jenkins CI on a PR. label Aug 12, 2023
@github-actionsgithub-actionsBot removed the request-ci Add this label to start a Jenkins CI on a PR. label Aug 12, 2023
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@atlowChemi

Copy link
Copy Markdown
Member

@sapphi-red the CI is failing because of conflicts. Could you rebase the branch on top of main?

@sapphi-red

Copy link
Copy Markdown
ContributorAuthor

@atlowChemi I merged the latest main branch to this PR.

@atlowChemi

Copy link
Copy Markdown
Member

@atlowChemi I merged the latest main branch to this PR.

You would need to rebase instead of merge-commit in order for CI to be able to pass 🙂
Let me know if you would need any help with rebasing 🙂

Add `process.sourceMapsEnabled` to detect
whether source-maps are enabled.
Fixes: nodejs#46304
@sapphi-red
sapphi-redforce-pushed the process/get-sourcemaps-enabled branch from db5a879 to 92c088dCompareAugust 15, 2023 12:21
@sapphi-red

Copy link
Copy Markdown
ContributorAuthor

@atlowChemi I'm sorry. I incorrectly remembered that "merge" was the preferred way for this project. I have rebased it now.

@atlowChemiatlowChemi added the request-ci Add this label to start a Jenkins CI on a PR. label Aug 15, 2023
@github-actionsgithub-actionsBot removed the request-ci Add this label to start a Jenkins CI on a PR. label Aug 15, 2023
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@sapphi-red
sapphi-red deleted the process/get-sourcemaps-enabled branch September 2, 2023 11:30
UlisesGascon pushed a commit that referenced this pull request Sep 10, 2023
Add `process.sourceMapsEnabled` to detect
whether source-maps are enabled.
Fixes: #46304
PR-URL: #46391
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
@UlisesGasconUlisesGascon mentioned this pull request Sep 10, 2023
UlisesGascon added a commit that referenced this pull request Sep 10, 2023
Notable changes:
crypto:
* update root certificates to NSS 3.93 (Node.js GitHub Bot) #49341
doc:
* move and rename loaders section (Geoffrey Booth) #49261
lib:
* (SEMVER-MINOR) add api to detect whether source-maps are enabled (翠 / green) #46391
src,permission:
* add multiple allow-fs-* flags (Carlos Espa) #49047
test_runner:
* (SEMVER-MINOR) expose location of tests (Colin Ihrig) #48975
PR-URL: #49592
UlisesGascon added a commit that referenced this pull request Sep 11, 2023
Notable changes:
crypto:
* update root certificates to NSS 3.93 (Node.js GitHub Bot) #49341
doc:
* move and rename loaders section (Geoffrey Booth) #49261
lib:
* (SEMVER-MINOR) add api to detect whether source-maps are enabled (翠 / green) #46391
src,permission:
* add multiple allow-fs-* flags (Carlos Espa) #49047
test_runner:
* (SEMVER-MINOR) expose location of tests (Colin Ihrig) #48975
PR-URL: #49592
UlisesGascon added a commit that referenced this pull request Sep 11, 2023
Notable changes:
crypto:
* update root certificates to NSS 3.93 (Node.js GitHub Bot) #49341
doc:
* move and rename loaders section (Geoffrey Booth) #49261
lib:
* (SEMVER-MINOR) add api to detect whether source-maps are enabled (翠 / green) #46391
src:
* support multiple `--env-file` declarations (Yagiz Nizipli) #49542
src,permission:
* add multiple allow-fs-* flags (Carlos Espa) #49047
test_runner:
* (SEMVER-MINOR) expose location of tests (Colin Ihrig) #48975
PR-URL: #49592
UlisesGascon added a commit that referenced this pull request Sep 12, 2023
Notable changes:
crypto:
* update root certificates to NSS 3.93 (Node.js GitHub Bot) #49341
doc:
* move and rename loaders section (Geoffrey Booth) #49261
* add release key for Ulises Gascon (Ulises Gascón) #49196
lib:
* (SEMVER-MINOR) add api to detect whether source-maps are enabled (翠 / green) #46391
src:
* support multiple `--env-file` declarations (Yagiz Nizipli) #49542
src,permission:
* add multiple allow-fs-* flags (Carlos Espa) #49047
test_runner:
* (SEMVER-MINOR) expose location of tests (Colin Ihrig) #48975
PR-URL: #49592
UlisesGascon added a commit that referenced this pull request Sep 13, 2023
Notable changes:
crypto:
* update root certificates to NSS 3.93 (Node.js GitHub Bot) #49341
doc:
* move and rename loaders section (Geoffrey Booth) #49261
* add release key for Ulises Gascon (Ulises Gascón) #49196
lib:
* (SEMVER-MINOR) add api to detect whether source-maps are enabled (翠 / green) #46391
src:
* support multiple `--env-file` declarations (Yagiz Nizipli) #49542
src,permission:
* add multiple allow-fs-* flags (Carlos Espa) #49047
test_runner:
* (SEMVER-MINOR) expose location of tests (Colin Ihrig) #48975
PR-URL: #49592
UlisesGascon added a commit that referenced this pull request Sep 16, 2023
Notable changes:
crypto:
* update root certificates to NSS 3.93 (Node.js GitHub Bot) #49341
doc:
* move and rename loaders section (Geoffrey Booth) #49261
* add release key for Ulises Gascon (Ulises Gascón) #49196
lib:
* (SEMVER-MINOR) add api to detect whether source-maps are enabled (翠 / green) #46391
src:
* support multiple `--env-file` declarations (Yagiz Nizipli) #49542
src,permission:
* add multiple allow-fs-* flags (Carlos Espa) #49047
test_runner:
* (SEMVER-MINOR) expose location of tests (Colin Ihrig) #48975
PR-URL: #49592
UlisesGascon added a commit that referenced this pull request Sep 18, 2023
Notable changes:
crypto:
* update root certificates to NSS 3.93 (Node.js GitHub Bot) #49341
deps:
* upgrade npm to 10.1.0 (npm team) #49570
* upgrade npm to 10.0.0 (npm team) #49423
doc:
* move and rename loaders section (Geoffrey Booth) #49261
* add release key for Ulises Gascon (Ulises Gascón) #49196
lib:
* (SEMVER-MINOR) add api to detect whether source-maps are enabled (翠 / green) #46391
src:
* support multiple `--env-file` declarations (Yagiz Nizipli) #49542
src,permission:
* add multiple allow-fs-* flags (Carlos Espa) #49047
test_runner:
* (SEMVER-MINOR) expose location of tests (Colin Ihrig) #48975
PR-URL: #49592
UlisesGascon added a commit to UlisesGascon/node that referenced this pull request Sep 18, 2023
Notable changes:
crypto:
* update root certificates to NSS 3.93 (Node.js GitHub Bot) nodejs#49341
deps:
* upgrade npm to 10.1.0 (npm team) nodejs#49570
* upgrade npm to 10.0.0 (npm team) nodejs#49423
doc:
* move and rename loaders section (Geoffrey Booth) nodejs#49261
* add release key for Ulises Gascon (Ulises Gascón) nodejs#49196
lib:
* (SEMVER-MINOR) add api to detect whether source-maps are enabled (翠 / green) nodejs#46391
src:
* support multiple `--env-file` declarations (Yagiz Nizipli) nodejs#49542
src,permission:
* add multiple allow-fs-* flags (Carlos Espa) nodejs#49047
test_runner:
* (SEMVER-MINOR) expose location of tests (Colin Ihrig) nodejs#48975
PR-URL: nodejs#49592
targos pushed a commit that referenced this pull request Nov 15, 2023
Add `process.sourceMapsEnabled` to detect
whether source-maps are enabled.
Fixes: #46304
PR-URL: #46391
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
targos added a commit that referenced this pull request Nov 27, 2023
Notable changes:
deps:
* (SEMVER-MINOR) update uvwasi to 0.0.19 (Node.js GitHub Bot) #49908
* (SEMVER-MINOR) upgrade npm to 10.0.0 (npm team) #49423
doc:
* add new TSC members (Michael Dawson) #48841
* move and rename loaders section (Geoffrey Booth) #49261
esm:
* use import attributes instead of import assertions (Antoine du Hamel) #50140
* --experimental-default-type flag to flip module defaults (Geoffrey Booth) #49869
* unflag import.meta.resolve (Guy Bedford) #49028
* move hook execution to separate thread (Jacob Smith) #44710
* leverage loaders when resolving subsequent loaders (Maël Nison) #43772
lib:
* (SEMVER-MINOR) add api to detect whether source-maps are enabled (翠 / green) #46391
* (SEMVER-MINOR) add tracing channel to diagnostics_channel (Stephen Belanger) #44943
src:
* (SEMVER-MINOR) add cjs_module_lexer_version base64_version (Jithil P Ponnan) #45629
stream:
* use bitmap in readable state (Benjamin Gruenbaum) #49745
test_runner:
* (SEMVER-MINOR) accept `testOnly` in `run` (Moshe Atlow) #49753
* (SEMVER-MINOR) add junit reporter (Moshe Atlow) #49614
* (SEMVER-MINOR) expose location of tests (Colin Ihrig) #48975
* (SEMVER-MINOR) add shards support (Raz Luvaton) #48639
* (SEMVER-MINOR) add initial draft for fakeTimers (Erick Wendel) #47775
test_runner, cli:
* (SEMVER-MINOR) add --test-concurrency flag (Colin Ihrig) #49996
tls:
* (SEMVER-MINOR) add ALPNCallback server option for dynamic ALPN negotiation (Tim Perry) #45190
vm:
* (SEMVER-MINOR) use import attributes instead of import assertions (Antoine du Hamel) #50141
wasi:
* (SEMVER-MINOR) updates required for latest uvwasi version (Michael Dawson) #49908
PR-URL: TODO
targos added a commit that referenced this pull request Nov 28, 2023
Notable changes:
deps:
* (SEMVER-MINOR) update uvwasi to 0.0.19 (Node.js GitHub Bot) #49908
* (SEMVER-MINOR) upgrade npm to 10.2.3 (npm team) #50531
doc:
* move and rename loaders section (Geoffrey Booth) #49261
esm:
* use import attributes instead of import assertions (Antoine du Hamel) #50140
* --experimental-default-type flag to flip module defaults (Geoffrey Booth) #49869
* unflag import.meta.resolve (Guy Bedford) #49028
* move hook execution to separate thread (Jacob Smith) #44710
* leverage loaders when resolving subsequent loaders (Maël Nison) #43772
lib:
* (SEMVER-MINOR) add api to detect whether source-maps are enabled (翠 / green) #46391
* (SEMVER-MINOR) add tracing channel to diagnostics_channel (Stephen Belanger) #44943
src:
* (SEMVER-MINOR) add cjs_module_lexer_version base64_version (Jithil P Ponnan) #45629
stream:
* use bitmap in readable state (Benjamin Gruenbaum) #49745
test_runner:
* (SEMVER-MINOR) accept `testOnly` in `run` (Moshe Atlow) #49753
* (SEMVER-MINOR) add junit reporter (Moshe Atlow) #49614
* (SEMVER-MINOR) expose location of tests (Colin Ihrig) #48975
* (SEMVER-MINOR) add shards support (Raz Luvaton) #48639
* (SEMVER-MINOR) add initial draft for fakeTimers (Erick Wendel) #47775
test_runner, cli:
* (SEMVER-MINOR) add --test-concurrency flag (Colin Ihrig) #49996
tls:
* (SEMVER-MINOR) add ALPNCallback server option for dynamic ALPN negotiation (Tim Perry) #45190
vm:
* (SEMVER-MINOR) use import attributes instead of import assertions (Antoine du Hamel) #50141
PR-URL: #50953
@targostargos mentioned this pull request Nov 28, 2023
targos added a commit that referenced this pull request Nov 29, 2023
Notable changes:
deps:
* (SEMVER-MINOR) update uvwasi to 0.0.19 (Node.js GitHub Bot) #49908
* (SEMVER-MINOR) upgrade npm to 10.2.3 (npm team) #50531
doc:
* move and rename loaders section (Geoffrey Booth) #49261
esm:
* use import attributes instead of import assertions (Antoine du Hamel) #50140
* --experimental-default-type flag to flip module defaults (Geoffrey Booth) #49869
* unflag import.meta.resolve (Guy Bedford) #49028
* move hook execution to separate thread (Jacob Smith) #44710
* leverage loaders when resolving subsequent loaders (Maël Nison) #43772
lib:
* (SEMVER-MINOR) add api to detect whether source-maps are enabled (翠 / green) #46391
* (SEMVER-MINOR) add tracing channel to diagnostics_channel (Stephen Belanger) #44943
src:
* (SEMVER-MINOR) add cjs_module_lexer_version base64_version (Jithil P Ponnan) #45629
stream:
* use bitmap in readable state (Benjamin Gruenbaum) #49745
test_runner:
* (SEMVER-MINOR) accept `testOnly` in `run` (Moshe Atlow) #49753
* (SEMVER-MINOR) add junit reporter (Moshe Atlow) #49614
* (SEMVER-MINOR) expose location of tests (Colin Ihrig) #48975
* (SEMVER-MINOR) add shards support (Raz Luvaton) #48639
* (SEMVER-MINOR) add initial draft for fakeTimers (Erick Wendel) #47775
test_runner, cli:
* (SEMVER-MINOR) add --test-concurrency flag (Colin Ihrig) #49996
tls:
* (SEMVER-MINOR) add ALPNCallback server option for dynamic ALPN negotiation (Tim Perry) #45190
vm:
* (SEMVER-MINOR) use import attributes instead of import assertions (Antoine du Hamel) #50141
PR-URL: #50953
sercher added a commit to sercher/graaljs that referenced this pull request Apr 25, 2024
Add `process.sourceMapsEnabled` to detect
whether source-maps are enabled.
Fixes: nodejs/node#46304
PR-URL: nodejs/node#46391
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
sercher added a commit to sercher/graaljs that referenced this pull request Apr 25, 2024
Notable changes:
deps:
* (SEMVER-MINOR) update uvwasi to 0.0.19 (Node.js GitHub Bot) nodejs/node#49908
* (SEMVER-MINOR) upgrade npm to 10.2.3 (npm team) nodejs/node#50531
doc:
* move and rename loaders section (Geoffrey Booth) nodejs/node#49261
esm:
* use import attributes instead of import assertions (Antoine du Hamel) nodejs/node#50140
* --experimental-default-type flag to flip module defaults (Geoffrey Booth) nodejs/node#49869
* unflag import.meta.resolve (Guy Bedford) nodejs/node#49028
* move hook execution to separate thread (Jacob Smith) nodejs/node#44710
* leverage loaders when resolving subsequent loaders (Maël Nison) nodejs/node#43772
lib:
* (SEMVER-MINOR) add api to detect whether source-maps are enabled (翠 / green) nodejs/node#46391
* (SEMVER-MINOR) add tracing channel to diagnostics_channel (Stephen Belanger) nodejs/node#44943
src:
* (SEMVER-MINOR) add cjs_module_lexer_version base64_version (Jithil P Ponnan) nodejs/node#45629
stream:
* use bitmap in readable state (Benjamin Gruenbaum) nodejs/node#49745
test_runner:
* (SEMVER-MINOR) accept `testOnly` in `run` (Moshe Atlow) nodejs/node#49753
* (SEMVER-MINOR) add junit reporter (Moshe Atlow) nodejs/node#49614
* (SEMVER-MINOR) expose location of tests (Colin Ihrig) nodejs/node#48975
* (SEMVER-MINOR) add shards support (Raz Luvaton) nodejs/node#48639
* (SEMVER-MINOR) add initial draft for fakeTimers (Erick Wendel) nodejs/node#47775
test_runner, cli:
* (SEMVER-MINOR) add --test-concurrency flag (Colin Ihrig) nodejs/node#49996
tls:
* (SEMVER-MINOR) add ALPNCallback server option for dynamic ALPN negotiation (Tim Perry) nodejs/node#45190
vm:
* (SEMVER-MINOR) use import attributes instead of import assertions (Antoine du Hamel) nodejs/node#50141
PR-URL: nodejs/node#50953
sercher added a commit to sercher/graaljs that referenced this pull request Apr 25, 2024
Add `process.sourceMapsEnabled` to detect
whether source-maps are enabled.
Fixes: nodejs/node#46304
PR-URL: nodejs/node#46391
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
sercher added a commit to sercher/graaljs that referenced this pull request Apr 25, 2024
Notable changes:
deps:
* (SEMVER-MINOR) update uvwasi to 0.0.19 (Node.js GitHub Bot) nodejs/node#49908
* (SEMVER-MINOR) upgrade npm to 10.2.3 (npm team) nodejs/node#50531
doc:
* move and rename loaders section (Geoffrey Booth) nodejs/node#49261
esm:
* use import attributes instead of import assertions (Antoine du Hamel) nodejs/node#50140
* --experimental-default-type flag to flip module defaults (Geoffrey Booth) nodejs/node#49869
* unflag import.meta.resolve (Guy Bedford) nodejs/node#49028
* move hook execution to separate thread (Jacob Smith) nodejs/node#44710
* leverage loaders when resolving subsequent loaders (Maël Nison) nodejs/node#43772
lib:
* (SEMVER-MINOR) add api to detect whether source-maps are enabled (翠 / green) nodejs/node#46391
* (SEMVER-MINOR) add tracing channel to diagnostics_channel (Stephen Belanger) nodejs/node#44943
src:
* (SEMVER-MINOR) add cjs_module_lexer_version base64_version (Jithil P Ponnan) nodejs/node#45629
stream:
* use bitmap in readable state (Benjamin Gruenbaum) nodejs/node#49745
test_runner:
* (SEMVER-MINOR) accept `testOnly` in `run` (Moshe Atlow) nodejs/node#49753
* (SEMVER-MINOR) add junit reporter (Moshe Atlow) nodejs/node#49614
* (SEMVER-MINOR) expose location of tests (Colin Ihrig) nodejs/node#48975
* (SEMVER-MINOR) add shards support (Raz Luvaton) nodejs/node#48639
* (SEMVER-MINOR) add initial draft for fakeTimers (Erick Wendel) nodejs/node#47775
test_runner, cli:
* (SEMVER-MINOR) add --test-concurrency flag (Colin Ihrig) nodejs/node#49996
tls:
* (SEMVER-MINOR) add ALPNCallback server option for dynamic ALPN negotiation (Tim Perry) nodejs/node#45190
vm:
* (SEMVER-MINOR) use import attributes instead of import assertions (Antoine du Hamel) nodejs/node#50141
PR-URL: nodejs/node#50953
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-ciPRs that need a full CI run.processIssues and PRs related to the process subsystem.semver-minorPRs that contain new features and should be released in the next minor version.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

add api to detect whether source-maps are enabled

7 participants

@sapphi-red@bricss@nodejs-github-bot@atlowChemi@panva@jasnell@anonrig