Skip to content
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

deno compile includes .js file's **absolute** path file:// url in compiled executable #16106

Closed
xBZZZZ opened this issue Sep 30, 2022 · 0 comments · Fixed by #24334
Closed

deno compile includes .js file's **absolute** path file:// url in compiled executable #16106

xBZZZZ opened this issue Sep 30, 2022 · 0 comments · Fixed by #24334

Comments

@xBZZZZ
Copy link

xBZZZZ commented Sep 30, 2022

example in shell (shell is busybox sh, I added extra newlines around commands to make it easier to read):

/tmp/path/to/javascript $ echo 'console.log("deno compile test");' > app.js

/tmp/path/to/javascript $ deno compile app.js

Compile file:///tmp/path/to/javascript/app.js
Emit app

/tmp/path/to/javascript $ ./app

deno compile test

/tmp/path/to/javascript $ strings app | grep path/to/javascript

%file:///tmp/path/to/javascript/app.js
{"argv":[],"unstable":false,"seed":null,"permissions":{"allow_env":null,"allow_hrtime":false,"allow_net":null,"allow_ffi":null,"allow_read":null,"allow_run":null,"allow_sys":null,"allow_write":null,"prompt":true},"location":null,"v8_flags":[],"log_level":null,"ca_stores":null,"ca_data":null,"unsafely_ignore_certificate_errors":null,"maybe_import_map":null,"entrypoint":"file:///tmp/path/to/javascript/app.js"}d3n0l4nd

You can see that there is file:///tmp/path/to/javascript/app.js in last 2 lines of strings app | grep path/to/javascript.

Is there deno compile option to not include .js file's absolute path in compiled executable?

zebreus pushed a commit to zebreus/deno that referenced this issue Jul 8, 2024
Adds much better support for the unstable Deno workspaces as well as
support for npm workspaces. npm workspaces is still lacking in that we
only install packages into the root node_modules folder. We'll make it
smarter over time in order for it to figure out when to add node_modules
folders within packages.

This includes a breaking change in config file resolution where we stop
searching for config files on the first found package.json unless it's
in a workspace. For the previous behaviour, the root deno.json needs to
be updated to be a workspace by adding `"workspace":
["./path-to-pkg-json-folder-goes-here"]`. See details in
denoland/deno_config#66

Closes denoland#24340
Closes denoland#24159
Closes denoland#24161
Closes denoland#22020
Closes denoland#18546
Closes denoland#16106
Closes denoland#24160
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 a pull request may close this issue.

1 participant