summaryrefslogtreecommitdiff
path: root/tests/specs
AgeCommit message (Collapse)Author
2024-09-09fix(node/byonm): do not accidentally resolve bare node built-ins (#25543)David Sherret
This was accidentally enabled in byonm, but it requires the `--unstable-bare-node-builtins` flag. Closes #25358
2024-09-09feat: Add better error messages for unstable APIs (#25519)Bartek Iwańczuk
This commit improves error messages for unstable APIs: - `--unstable-broadcast-channel` - `--unstable-cron` - `--unstable-http` - `--unstable-kv` - `--unstable-temporal` By providing information and hints what went wrong and how the error can be fixed. It reuses the same infra that was added in https://github.com/denoland/deno/pull/21764.
2024-09-09fix: remove recently added deno.json node_modules aliasing (#25542)David Sherret
This was initially added in #25399 in order to make transitioning over from package.json to deno.json more easy, but it causes some problems that are shown in the issue and it also means that the output of `deno install` would have different resolution than `npm install`. Overall, I think it's too much complexity to be smarter about this and it's probably best to not do it. If someone needs an aliased folder then they should keep using a package.json Closes #25538
2024-09-09chore: Deprecate worker itests (#25514)Mohammad Sulaiman
2024-09-07feat(add/install): Flag to add dev dependency to package.json (#25495)Nathan Whitaker
``` deno install --dev npm:chalk ``` Adds to `devDependencies` if a `package.json` is present, otherwise it just adds to `imports` in `deno.json`
2024-09-06BREAKING(net): remove `Deno.{Conn,TlsConn,TcpConn,UnixConn}.prototype.rid` ↵Asher Gomez
(#25446) Towards #22079 --------- Signed-off-by: Asher Gomez <ashersaupingomez@gmail.com>
2024-09-06fix(install): Make sure target node_modules exists when symlinking (#25494)Nathan Whitaker
Fixes https://github.com/denoland/deno/issues/25493
2024-09-06feat(add): Add npm packages to package.json if present (#25477)Nathan Whitaker
Closes https://github.com/denoland/deno/issues/25321 Ended up being a larger refactoring, since we're now juggling (potentially) two config files in the same `add`, instead of choosing one. I don't love the shape of the code, but I think it's good enough Some smaller side improvements: - `deno remove` supports `jsonc` - `deno install --dev` will be a really simple change - if `deno remove` removes the last import/dependency in the `imports`/`dependencies`/`devDependencies` field, it removes the field instead of leaving an empty object
2024-09-06feat(lsp): turn on useUnknownInCatchVariables (#25474)Kenta Moriuchi
2024-09-06BREAKING(buffer): remove `Deno.Buffer` (#25441)Asher Gomez
Towards #22079 --------- Signed-off-by: Asher Gomez <ashersaupingomez@gmail.com>
2024-09-05BREAKING: remove "emit" and "map" from deno info output (#25468)David Sherret
The map field has been empty for years now and we don't want the emit file to be exposed so it allows us to iterate on making the cache faster. Additionally, it's racy/unreliable to rely on this information. Instead, people should emit the TS files themselves using tools like deno_emit, typescript, esbuild, etc. Closes https://github.com/denoland/deno/issues/17703
2024-09-05feat(check): turn on useUnknownInCatchVariables (#25465)David Sherret
Part of #25162 Closes #11826
2024-09-05fix: add suggestion how to fix importing CJS module (#21764)Bartek Iwańczuk
``` $ cat exports_error.js Object.defineProperty(exports, "__esModule", { value: true }); $ deno exports_error.js error: Uncaught (in promise) ReferenceError: exports is not defined Object.defineProperty(exports, "__esModule", { value: true }); ^ at file:///exports_error.js:1:23 info: Deno doesn't support CommonJS modules without `.cjs` extension. hint: Rewrite this module to ESM or change the file extension to `.cjs`. ```
2024-09-05BREAKING(fs): remove `Deno.funlock[Sync]()` (#25442)Asher Gomez
Towards #22079 --------- Signed-off-by: Asher Gomez <ashersaupingomez@gmail.com>
2024-09-05BREAKING(fs): remove `Deno.seek[Sync]()` (#25449)Asher Gomez
Towards #22079
2024-09-05fix: update hint for `deno add <package>` (#25455)Bartek Iwańczuk
Follow up to https://github.com/denoland/deno/pull/25430
2024-09-05feat: include version number in all --json based outputs (#25335)Kamil Ogórek
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2024-09-05chore: deprecate doc itests (#25452)Mohammad Sulaiman
2024-09-05feat: Allow importing .cjs files (#25426)Bartek Iwańczuk
This commit adds support for executing top-level `.cjs` files, as well as import `.cjs` files from within npm packages. This works only for `.cjs` files, the contents of sibling `package.json` are not consulted for the `"type"` field. Closes https://github.com/denoland/deno/issues/25384 --------- Signed-off-by: David Sherret <dsherret@users.noreply.github.com> Co-authored-by: Luca Casonato <hello@lcas.dev> Co-authored-by: David Sherret <dsherret@users.noreply.github.com>
2024-09-05feat: Add a hint on error about 'Relative import path ... not prefixed with ↵Bartek Iwańczuk
...' (#25430) Running a file like: ``` import "@std/dotenv/load"; ``` Without a mapping in `imports` field of `deno.json` or `dependencies` of `package.json` will now error out with a hint: ``` error: Relative import path "@std/dotenv/load" not prefixed with / or ./ or ../ hint: Try running `deno add @std/dotenv/load` at [WILDCARD]bare_specifier_without_import/main.ts:1:8 ``` Closes https://github.com/denoland/deno/issues/24699 --------- Co-authored-by: David Sherret <dsherret@users.noreply.github.com>
2024-09-05BREAKING(fs): remove `Deno.FsWatcher.prototype.rid` (#25444)Asher Gomez
Towards #22079
2024-09-05BREAKING(fs): remove `Deno.File` (#25447)Asher Gomez
Towards #22079
2024-09-04fix(regression): do not expose resolved path in Deno.Command permission ↵David Sherret
denied error (#25434) Regression from https://github.com/denoland/deno/pull/25370
2024-09-04feat(install): deno install with entrypoint (#25411)Nathan Whitaker
``` deno install --entrypoint one.ts two.ts ``` effectively equivalent to `deno cache`
2024-09-04fix(byonm): resolve npm deps of jsr deps (#25399)David Sherret
This allows using npm deps of jsr deps without having to add them to the root package.json. Works by taking the package requirement and scanning the `node_modules/.deno` directory for the best matching package, so it relies on deno's node_modules structure. Additionally to make the transition from package.json to deno.json easier, Deno now: 1. Installs npm deps in a deno.json at the same time as installing npm deps from a package.json. 2. Uses the alias in the import map for `node_modules/<alias>` for better package.json compatiblity.
2024-09-04feat(add): strip package subpath when adding a package (#25419)Bartek Iwańczuk
These now works: ``` $ deno add @std/dotenv/load $ deno add npm:preact/hooks ``` Previously we were erroring out, because this is a "package reference" including a subpath. Closes https://github.com/denoland/deno/issues/25385 --------- Signed-off-by: Bartek Iwańczuk <biwanczuk@gmail.com> Co-authored-by: David Sherret <dsherret@users.noreply.github.com>
2024-09-04fix: lock down allow-run permissions more (#25370)David Sherret
`--allow-run` even with an allow list has essentially been `--allow-all`... this locks it down more. 1. Resolves allow list for `--allow-run=` on startup to an absolute path, then uses these paths when evaluating if a command can execute. Also, adds these paths to `--deny-write` 1. Resolves the environment (cwd and env vars) before evaluating permissions and before executing a command. Then uses this environment to evaluate the permissions and then evaluate the command.
2024-09-04BREAKING(io): remove `Deno.read[Sync]()` (#25409)Asher Gomez
Towards #22079 Signed-off-by: Asher Gomez <ashersaupingomez@gmail.com>
2024-09-04feat(cli): give access to `process` global everywhere (#25291)Luca Casonato
2024-09-04BREAKING(io): remove `Deno.write[Sync]()` (#25408)Asher Gomez
Towards #22079 Signed-off-by: Asher Gomez <ashersaupingomez@gmail.com>
2024-09-04BEAKING(buffer): remove `Deno.readAll[Sync]()` (#25386)Asher Gomez
Towards #22079 Signed-off-by: Asher Gomez <ashersaupingomez@gmail.com>
2024-09-04BREAKING(fs): remove `Deno.ftruncate[Sync]()` (#25412)Asher Gomez
Towards #22079 Signed-off-by: Asher Gomez <ashersaupingomez@gmail.com>
2024-09-04refactor(cli/js): align error messages (#25406)Ian Bull
Aligns the error messages in the cli/js folder to be in-line with the Deno style guide.
2024-09-04BREAKING(buffer): remove `Deno.writeAll[Sync]()` (#25407)Asher Gomez
2024-09-04BREAKING(fs): remove `Deno.fstat[Sync]()` (#25351)Asher Gomez
Towards #22079 Signed-off-by: Asher Gomez <ashersaupingomez@gmail.com>
2024-09-03fix(flags): require global flag for permission flags in install subcommand ↵Leo Kettmeir
(#25391) Also rewrites some of the subcommands help text Closes https://github.com/denoland/deno/issues/25362 --------- Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2024-09-03fix(install): recommend using `deno install -g` when using a single http url ↵Bartek Iwańczuk
(#25388) Closes https://github.com/denoland/deno/issues/25361
2024-09-03chore: deprecate eval itests (#25382)HasanAlrimawi
This PR serves as a part of #22907 . --------- Signed-off-by: David Sherret <dsherret@users.noreply.github.com> Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com> Co-authored-by: David Sherret <dsherret@users.noreply.github.com>
2024-09-03fix(task): correct name for scoped npm package binaries (#25390)David Sherret
This is for when not using a node_modules directory or when using auto install for a node_modules dir.
2024-09-03BREAKING(io): remove `Deno.copy()` (#25345)Asher Gomez
Towards #22079 --------- Signed-off-by: Asher Gomez <ashersaupingomez@gmail.com>
2024-09-03test: reenable frozen_lockfile tests (#25381)Bartek Iwańczuk
Ref https://github.com/denoland/deno/issues/25241
2024-09-03BREAKING(permissions): remove --allow-hrtime (#25367)Luca Casonato
Remove `--allow-hrtime` and `--deny-hrtime`. We are doing this because it is already possible to get access to high resolution timers through workers and SharedArrayBuffer. Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2024-09-03fix: only enable byonm if workspace root has pkg json (#25379)David Sherret
Closes #25355
2024-09-03BREAKING(console): remove `Deno.customInspect` (#25348)Asher Gomez
Note: this is implemented on Deploy. However, according to @magurotuna, a thin compatibility layer might be in the works that'd prevent breakages for PRs such as this one. Towards #22079
2024-09-03fix: make some warnings more standard (#25324)David Sherret
2024-09-03chore(fs): remove `Deno.flock[Sync]()` (#25350)Asher Gomez
Towards #22079
2024-09-03BREAKING(io): remove `Deno.iter[Sync]()` (#25346)Asher Gomez
Towards #22079
2024-09-03BREAKING: remove `Deno.close()` (#25347)Asher Gomez
Towards #22079
2024-09-03BREAKING: remove `deno vendor` (#25343)Asher Gomez
2024-09-02BREAKING: remove `--allow-none` flag (#25337)Asher Gomez
Towards #22079 Signed-off-by: Luca Casonato <hello@lcas.dev> Co-authored-by: Luca Casonato <hello@lcas.dev>