summaryrefslogtreecommitdiff
path: root/tests
AgeCommit message (Collapse)Author
2024-03-07fix(publish): properly display graph validation errors (#22775)David Sherret
The graph validation errors were displaying cryptically during publish. This fixes that.
2024-03-07fix(publish): silence warnings for sloppy imports and node builtins with env ↵Bartek Iwańczuk
var (#22760) An undocumented "DENO_DISABLE_PEDANTIC_NODE_WARNINGS" env var can be used to silence warnings for sloppy imports and node builtins without `node:` prefix.
2024-03-07fix(ext/node): http2.createServer (#22708)Satya Rohith
2024-03-06chore(tests): fix process_test for sure (#22756)Matt Mastracci
2024-03-06fix(ext/node): add default methods to fs.StatsBase (#22750)Divy Srivastava
2024-03-06fix(ext/node): strip `--enable-source-maps` from argv (#22743)Divy Srivastava
Fixes https://github.com/denoland/deno/issues/21750
2024-03-06feat(unstable/pm): support npm packages in 'deno add' (#22715)Nayeem Rahman
2024-03-06fix(node): stat/statSync returns instance of fs.Stats (#22294)Divy Srivastava
Fixes https://github.com/denoland/deno/issues/22291 --------- Signed-off-by: Divy Srivastava <dj.srivastava23@gmail.com>
2024-03-06fix(node): implement ALS enterWith (#22740)Divy Srivastava
Fixes https://github.com/denoland/deno/issues/18127 https://github.com/denoland/deno/issues/17248 SvelteKit works now! ``` $ deno run -A npm:create-svelte@latest my-app create-svelte version 6.0.9 ┌ Welcome to SvelteKit! │ ◇ Which Svelte app template? │ SvelteKit demo app │ ◇ Add type checking with TypeScript? │ Yes, using JavaScript with JSDoc comments │ ◇ Select additional options (use arrow keys/space bar) │ none │ └ Your project is ready! ✔ Type-checked JavaScript https://www.typescriptlang.org/tsconfig#checkJs Install community-maintained integrations: https://github.com/svelte-add/svelte-add Next steps: 1: cd my-app 2: npm install 3: git init && git add -A && git commit -m "Initial commit" (optional) 4: npm run dev -- --open To close the dev server, hit Ctrl-C Stuck? Visit us at https://svelte.dev/chat $ cd my-app/ $ deno task dev Task dev vite dev VITE v5.1.4 ready in 1632 ms ➜ Local: http://localhost:5173/ ➜ Network: use --host to expose ➜ press h + enter to show help ```
2024-03-05chore(ext/node): ignore non-working process test (#22723)Matt Mastracci
Filed https://github.com/denoland/deno/issues/22724 for actual issue
2024-03-06fix(node): improve cjs tracking (#22673)David Sherret
We were missing saying that a file is CJS when some Deno code imported from the node_modules directory at runtime.
2024-03-05chore(tests): Remove vestiges of cli/tests folder (#22712)Aapo Alasuutari
2024-03-04chore(ext/node): make process_test more reliable (#22703)Matt Mastracci
2024-03-05chore(tests): update flaky timer test (#22701)Matt Mastracci
This test was flaky after landing the new timer rewrite.
2024-03-05chore: move `tools/wpt` to `tests/wpt/runner` (#22545)Asher Gomez
Towards #22525 --------- Signed-off-by: Asher Gomez <ashersaupingomez@gmail.com> Co-authored-by: Matt Mastracci <matthew@mastracci.com>
2024-03-04fix(lsp): do not warn about local file "redirects" from .js to .d.ts files ↵David Sherret
(#22670) The diagnostic was incorrect when importing a `.js` file with a corresponding `.d.ts` file with sloppy imports because it would say to change the `.js` extension to `.d.ts`, which is incorrect. We might as well just hide this diagnostic.
2024-03-04fix(node): errno property when command missing (#22691)Divy Srivastava
Fixes https://github.com/denoland/deno/issues/22604 `remix dev` with Node adapter works: ``` $ ~/gh/littledivy/deno/target/debug/deno task dev Task dev remix dev --manual 💿 remix dev info building... info built (619ms) [remix-serve] http://localhost:3000 (http://192.168.1.24:3000) GET / 200 - - 3.090 ms ```
2024-03-04fix(lsp): ignore code errors when type passes for non-`@deno-types` ↵David Sherret
reolution (#22682)
2024-03-04feat(lsp): include registry url in jsr import hover text (#22676)Nayeem Rahman
2024-03-04chore: fix typos (#22677)cui fliter
2024-03-04feat(publish): add `npm:` suggestion for esm.sh specifiers (#22343)Divy Srivastava
![image](https://github.com/denoland/deno/assets/34997667/f32642ed-c109-4519-84c5-6f78e9452703) Co-authored-by: David Sherret <dsherret@users.noreply.github.com>
2024-03-01fix(lsp): regression - caching in lsp broken when config with imports has ↵David Sherret
comments (#22666) Caused by https://github.com/denoland/deno/pull/22553 Closes #22664
2024-03-01feat(unstable/pm): support version contraints in 'deno add' (#22646)Nayeem Rahman
2024-03-01chore(core): fix zlib_test sanitizer failures (#22659)Matt Mastracci
2024-03-01perf(cli): use new deno_core timers (#22569)Matt Mastracci
Improves #19100 Fixes #20356 Replaces #20428 Changes made in deno_core to support this: - [x] Errors must be handled in setTimeout callbacks - [x] Microtask ordering is not-quite-right - [x] Timer cancellation must be checked right before dispatch - [x] Timer sanitizer - [x] Move high-res timer to deno_core - [x] Timers need opcall tracing
2024-03-01fix(unstable/publish): repect `--no-check` in no-slow-types (#22653)David Sherret
2024-02-29fix(ext/node) add node http methods (#22630)Igor Zinkovsky
fixes #22627 This PR fixes a node compat issue that is preventing `serverless-http` and `serverless-express` npm modules from working with Deno. These modules are useful for running apps on AWS Lambda (and other serverless infra). --------- Signed-off-by: Igor Zinkovsky <igor@deno.com>
2024-02-29feat(unstable): `deno add` subcommand (#22520)Bartek Iwańczuk
This commit adds "deno add" subcommand that has a basic support for adding "jsr:" packages to "deno.json" file. This currently doesn't support "npm:" specifiers and specifying version constraints.
2024-02-29test(jsr): add tests for jsx files with and without pragmas (#22634)Bartek Iwańczuk
Follow up to https://github.com/denoland/deno/pull/22631 that asserts behavior when JSX and TSX files have and do not have pragmas with `jsx*` config.
2024-02-29feat(publish): enable package provenance by default on github actions (#22635)Divy Srivastava
2024-02-29test(publish): adjust a test for .env files (#22595)Bartek Iwańczuk
https://github.com/denoland/deno/pull/22590#discussion_r1502945984
2024-02-29fix(publish): print a warning when .jsx or .tsx is imported (#22631)Bartek Iwańczuk
This commit adds a warning when .jsx or .tsx is encountered during publishing. This is a stop-gap solution before we fix it proper.
2024-02-28fix(cli): ensure that pre- and post-test output is flushed at the ↵Matt Mastracci
appropriate times (#22611) Some `deno_std` tests were failing to print output that was resolved after the last test finished. In addition, output printed before tests began would sometimes appear above the "running X tests ..." line, and sometimes below it depending on timing. We now guarantee that all output is flushed before and after tests run, making the output consistent. Pre-test and post-test output are captured in `------ pre-test output ------` and `------ post-test output ------` blocks to differentiate them from the regular output blocks. Here's an example of a test (that is much noisier than normal, but an example of what the output will look like): ``` Check ./load_unload.ts ------- pre-test output ------- load ----- output end ----- running 1 test from ./load_unload.ts test ... ------- output ------- test ----- output end ----- test ... ok ([WILDCARD]) ------- post-test output ------- unload ----- output end ----- ```
2024-02-28Revert "fix(publish): error if there are uncommitted changes (#22613)" (#22625)Bartek Iwańczuk
This reverts commit c2c4e745a5db4f2e53aa70bf22b6c828fa1b4040.
2024-02-28fix(jsr): do not allow importing a non-JSR url via unanalyzable dynamic ↵David Sherret
import from JSR (#22623) A security feature of JSR is that it is self contained other than npm dependencies. At publish time, the registry rejects packages that write code like this: ```ts const data = await import("https://example.com/evil.js"); ``` However, this can be trivially bypassed by writing code that the registry cannot statically analyze for. This PR prevents Deno from loading dynamic imports that do this.
2024-02-28chore(cli): rename `--trace-ops` to `--trace-leaks` (#22598)Matt Mastracci
As we add tracing to more types of runtime activity, `--trace-ops` is less useful of a name. `--trace-leaks` better reflects that this feature traces both ops and timers, and will eventually trace resource opening as well. This keeps `--trace-ops` as an alias for `--trace-leaks`, but prints a warning to the console suggesting migration to `--trace-leaks`. One test continues to use `--trace-ops` to test the deprecation warning. --------- Signed-off-by: Matt Mastracci <matthew@mastracci.com>
2024-02-28fix(publish): error if there are uncommitted changes (#22613)Bartek Iwańczuk
Closes https://github.com/denoland/deno/issues/22330
2024-02-27perf(cli): reduce overhead in test registration (#22552)Matt Mastracci
- Removes the origin call, since all origins are the same for an isolate (ie: the main module) - Collects the `TestDescription`s and sends them all at the same time inside of an Arc, allowing us to (later on) re-use these instead of cloning. Needs a follow-up pass to remove all the cloning, but that's a thread that is pretty long to pull --------- Signed-off-by: Matt Mastracci <matthew@mastracci.com>
2024-02-28feat(publish): provenance attestation (#22573)Divy Srivastava
Supply chain security for JSR. ``` $ deno publish --provenance Successfully published @divy/test_provenance@0.0.3 Provenance transparency log available at https://search.sigstore.dev/?logIndex=73657418 ``` 0. Package has been published. 1. Fetches the version manifest and verifies it's matching with uploaded files and exports. 2. Builds the attestation SLSA payload using Github actions env. 3. Creates an ephemeral key pair for signing the github token (aud=sigstore) and DSSE pre authentication tag. 4. Requests a X.509 signing certificate from Fulcio using the challenge and ephemeral public key PEM. 5. Prepares a DSSE envelop for Rekor to witness. Posts an intoto entry to Rekor and gets back the transparency log index. 6. Builds the provenance bundle and posts it to JSR.
2024-02-27fix(unstable): sloppy imports should resolve .d.ts files during types ↵David Sherret
resolution (#22602)
2024-02-27feat(publish): support sloppy imports and bare node built-ins (#22588)Luca Casonato
2024-02-27chore: bump deno_core (#22596)Matt Mastracci
Migrations: - snapshot code updated - runtime stats API tweaks
2024-02-27feat(publish): discover jsr.json and jsr.jsonc files (#22587)Bartek Iwańczuk
Closes https://github.com/denoland/deno/issues/22491
2024-02-26test(publish): add a test that checks for .env files (#22590)Bartek Iwańczuk
2024-02-24fix(lsp): import map expansion (#22553)David Sherret
2024-02-23test(ext/node): assert imported argv0 value (#22568)Satya Rohith
2024-02-23fix(ext/node): set correct process.argv0 (#22555)Satya Rohith
2024-02-23feat: infer dependencies from package.json (#22563)Marvin Hagemeister
<!-- Before submitting a PR, please read https://docs.deno.com/runtime/manual/references/contributing 1. Give the PR a descriptive title. Examples of good title: - fix(std/http): Fix race condition in server - docs(console): Update docstrings - feat(doc): Handle nested reexports Examples of bad title: - fix #7123 - update docs - fix bugs 2. Ensure there is a related issue and it is referenced in the PR text. 3. Ensure there are tests that cover the changes. 4. Ensure `cargo test` passes. 5. Ensure `./tools/format.js` passes without changing files. 6. Ensure `./tools/lint.js` passes. 7. Open as a draft PR if your work is still in progress. The CI won't run all steps, but you can add '[ci]' to a commit message to force it to. 8. If you would like to run the benchmarks on the CI, add the 'ci-bench' label. --> This PR enhances the `deno publish` command to infer dependencies from `package.json` if present.
2024-02-23fix(ext/node): init arch, pid, platform at startup (#22561)Satya Rohith
2024-02-23feat(publish): respect .gitignore during `deno publish` (#22514)Divy Srivastava
Files from `.gitignore`, global git config, `.git/info/exclude` and `deno.json`'s `exclude` are ignored.