0
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2025-02-16 02:26:08 -05:00
Commit graph

10971 commits

Author SHA1 Message Date
David Sherret
84b36001b8
fix(node): require of pkg json imports was broken (#22821) 2024-03-14 10:11:29 -07:00
Divy Srivastava
010272a6c2
fix(ext/websocket): do not continue reading if socket rid closes (#21849)
Fixes https://github.com/denoland/deno/issues/21379
2024-03-14 10:11:29 -07:00
Divy Srivastava
4419fc340b
fix(ext/node): support junction symlinks on Windows (#22762)
Fixes https://github.com/denoland/deno/issues/20609

Vitepress support! `vitepress dev` and `vitepress build` via BYONM
2024-03-14 10:11:28 -07:00
Nathan Whitaker
7f99b968fc
fix(ext/node): Implement isBuiltin in node:module (#22817)
Fixes #22502

Implements the
[`isBuiltin`](https://nodejs.org/api/module.html#moduleisbuiltinmodulename)
function in `node:module`. I had to update the version of `@types/node`
in the test registry in order to get the test I added to typecheck.
2024-03-14 10:11:28 -07:00
Nathan Whitaker
1e1d0410a4
fix(ext/node): Add Immediate class to mirror NodeJS.Immediate (#22808)
Fixes #21660

Adds a basic `Immediate` class to mirror `NodeJS.Immediate`, and changes
`setImmediate` and `clearImmediate` to return and accept (respectively)
`Immediate` objects.

Note that for now {ref,unref,hasRef} are effectively stubs, as deno_core
doesn't really natively support immediates (they're currently modeled as
timers with delay of 0). Eventually we probably want to actually
implement these properly.
2024-03-14 10:11:28 -07:00
David Sherret
8b9a9a7411
fix(config): remove pkg name example and add pattern to schema (#22813) 2024-03-14 10:11:28 -07:00
David Sherret
776d756472
fix(config): add unstable features as examples to config schema (#22814) 2024-03-14 10:11:28 -07:00
David Sherret
49998341b4
fix(publish): suggest using --allow-dirty on uncommitted changes (#22810) 2024-03-14 10:11:28 -07:00
David Sherret
9a4b096073
chore(test): add [WILDCHARS(x)] and [WILDLINE] (#22803) 2024-03-14 10:11:28 -07:00
tuhana
de3be86053
fix(cli): occasional panics on progress bar (#22809)
Uses `Instant` instead of `SystemTime` for
`cli/util/progress_bar/mod.rs`. Fixes #22558
2024-03-14 10:11:28 -07:00
David Sherret
b36ebdca23
fix(publish): ability to un-exclude when .gitignore ignores everything (#22805)
This is an unrealistic scenario, but it's still a good thing to fix and
have a test for because it probably fixes some other underlying issues
with how the gitignore was being resolved for the root directory.

From https://github.com/denoland/deno/pull/22720#issuecomment-1986134425
2024-03-14 10:11:28 -07:00
David Sherret
67b90891fd
fix(node): resolve .css files in npm packages when type checking (#22804)
When type checking, we should just resolve css files in npm packages and
not surface a type checking error on the specifier.
2024-03-14 10:11:28 -07:00
mimikun
5548576cdb
fix(publish): typo in --allow-dirty help text (#22799) 2024-03-14 10:11:28 -07:00
Luca Casonato
36672b16f2
fix: support sloppy resolution to file where directory exists (#22800)
Previously the sloppy resolver could not resolve the following:

- foo/bar.ts
- foo.ts
- index.ts

Where `index.ts` contains `import "./foo"`, because it did not consider
`foo.ts` a valid target for this directory import.

This commit fixes this bug.
2024-03-14 10:11:28 -07:00
Bartek Iwańczuk
3bb357ef31
refactor(ext/node): worker_threads.isMainThread setup (#22785)
This commit changes how we figure out if we're running on main
thread in `node:worker_threads` module. Instead of relying on quirky
"magic variable" for a name to check if we're on main thread, we are
now explicitly passing this information during bootstrapping of the
runtime. As a side effect, `WorkerOptions.name` is more useful
and matches what Node.js does more closely (though not fully).

Towards https://github.com/denoland/deno/issues/22783
2024-03-14 10:11:28 -07:00
Satya Rohith
59e23a9c68
refactor(ext/node): use worker ops directly in worker_threads (#22794) 2024-03-14 10:11:28 -07:00
denobot
6d062cf0c7
1.41.2 (#22791)
Bumped versions for 1.41.2

Signed-off-by: Divy Srivastava <dj.srivastava23@gmail.com>
Co-authored-by: Divy Srivastava <dj.srivastava23@gmail.com>
2024-03-08 13:02:21 +05:30
David Sherret
630ef77ada fix(publish): include explicitly specified .gitignored files and directories (#22790)
This allows explicitly overriding a .gitignore by specifying files and
directories in "include". This does not apply to globs in an include as
files matching those will still be gitignored. Additionally,
individually gitignored files within an included directory will still be
ignored.
2024-03-08 12:38:25 +05:30
David Sherret
4c51fb0741 fix(publish): do not include .gitignore (#22789)
Regression from https://github.com/denoland/deno/pull/22720
2024-03-08 12:38:25 +05:30
Matt Mastracci
4830f677a6 feat(ext/node): ref/unref on workers (#22778)
Implements ref/unref on worker to fix part of #22629
2024-03-08 12:38:25 +05:30
David Sherret
9ee96caaf0 fix(publish): make include and exclude work (#22720)
1. Stops `deno publish` using some custom include/exclude behaviour from
other sub commands
2. Takes ancestor directories into account when resolving gitignore
3. Backards compatible change that adds ability to unexclude an exclude
by using a negated glob at a more specific level for all sub commands
(see https://github.com/denoland/deno_config/pull/44).
2024-03-08 12:38:24 +05:30
Bartek Iwańczuk
b27d0d1b33 fix: respect unstable "temporal" configuration in config file (#22134)
Actual fix happened in https://github.com/denoland/deno/pull/22782, but
this commit adds additional tests and cleans up V8 flags passed on init.

Closes https://github.com/denoland/deno/issues/22123
Closes https://github.com/denoland/deno/issues/22560
Closes https://github.com/denoland/deno/issues/22557
2024-03-08 12:38:24 +05:30
Bartek Iwańczuk
b03bb16cc9 chore: upgrade deno_core (#22782) 2024-03-08 12:38:24 +05:30
Bartek Iwańczuk
338fe7e5b2 fix(publish): reland error if there are uncommitted changes (#22613) (#22632)
Reverted in https://github.com/denoland/deno/pull/22625
2024-03-08 12:38:24 +05:30
Divy Srivastava
8d2df1d504 perf: hard link npm cache (#22773) 2024-03-08 12:38:24 +05:30
Nayeem Rahman
94cf92a98f fix(lsp): don't apply renames to remote modules (#22765) 2024-03-08 12:38:24 +05:30
Matt Mastracci
8fda1b8a9c fix(cli): limit test parallelism on Windows to avoid pipe error (#22776)
One last attempt to fix the parallelism issue on Windows.
2024-03-08 12:38:24 +05:30
Matt Mastracci
77dee10f3a perf(cli): use faster_hex (#22761)
`cli::util::checksum` was showing up on flame graphs because it was
concatenating allocated strings. We can use `faster-hex` to improve it.
2024-03-08 12:38:24 +05:30
David Sherret
5788063efb fix(publish): properly display graph validation errors (#22775)
The graph validation errors were displaying cryptically during publish.
This fixes that.
2024-03-08 12:38:24 +05:30
Luca Casonato
b36458721c fix(tools/publish): correctly handle importing from self in unfurling (#22774)
We emitted `import "./` rather than `import "./$NAME"`. This is now
fixed.

Also makes a cosmetic change so that `../` imports are now just imported
as `../`, not `./../`.
2024-03-08 12:38:24 +05:30
Bartek Iwańczuk
2ac62a9fde fix(publish): silence warnings for sloppy imports and node builtins with env 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-08 12:38:24 +05:30
Satya Rohith
2b1e16231b fix(ext/node): http2.createServer (#22708) 2024-03-08 12:38:24 +05:30
Leo Kettmeir
1a217c97fb feat(node/util): styleText (#22758)
Implements https://github.com/nodejs/node/pull/51850
2024-03-08 12:38:24 +05:30
Nathan Whitaker
1064977f8a chore: upgrade deno_core (#22725)
<!--
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.
-->
2024-03-08 12:38:24 +05:30
Bartek Iwańczuk
02426287a7 fix: don't include source maps in release mode (#22751)
Due to bug in `deno_ast` the `source_map` setting is ignored and source
map is always emitted. This is fixed by updating `deno_ast`.
2024-03-08 12:38:24 +05:30
Matt Mastracci
394cc989cd chore(tests): fix process_test for sure (#22756) 2024-03-08 12:38:24 +05:30
Divy Srivastava
f2c1edae7d fix(ext/node): add default methods to fs.StatsBase (#22750) 2024-03-08 12:38:24 +05:30
Asher Gomez
cc7d522510 fix: point to correct WPT runner file (#22753)
We were previously pointing to the incorrect runner file.
2024-03-08 12:38:23 +05:30
Divy Srivastava
5b186f532f fix(ext/node): strip --enable-source-maps from argv (#22743)
Fixes https://github.com/denoland/deno/issues/21750
2024-03-08 12:38:23 +05:30
Nayeem Rahman
1d909edc33 feat(unstable/pm): support npm packages in 'deno add' (#22715) 2024-03-08 12:38:23 +05:30
Bartek Iwańczuk
37a804dd33 fix: Provide source map for internal extension code (#22716)
This commit adds support for source maps for `ext/` crates that are
authored in TypeScript. As a result any exceptions thrown from eg. `ext/node`
will now have correct stack traces.

This is only enabled in debug mode as it adds about 2Mb to the binary.
2024-03-08 12:38:23 +05:30
Divy Srivastava
b66d11a624 fix(node): stat/statSync returns instance of fs.Stats (#22294)
Fixes https://github.com/denoland/deno/issues/22291

---------

Signed-off-by: Divy Srivastava <dj.srivastava23@gmail.com>
2024-03-08 12:38:23 +05:30
Divy Srivastava
5faa115f04 fix(publish): permissionless dry-run in GHA (#22679)
Fixes https://github.com/denoland/deno/issues/22658
2024-03-08 12:38:23 +05:30
Divy Srivastava
bb356216f7 chore: remove debug console table log in node/http2 (#22741) 2024-03-08 12:38:23 +05:30
Divy Srivastava
41b565349b fix(node): implement ALS enterWith (#22740)
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-08 12:38:23 +05:30
Matt Mastracci
5edba2aae6 chore(ext/node): ignore non-working process test (#22723)
Filed https://github.com/denoland/deno/issues/22724 for actual issue
2024-03-08 12:38:23 +05:30
Divy Srivastava
3792472223 chore: Reuse linux symbols list on openbsd and freebsd (#22706) 2024-03-08 12:38:23 +05:30
Matt Mastracci
48c37cb381 fix(cli): improve logging on failed named pipe (#22726) 2024-03-08 12:38:22 +05:30
Matt Mastracci
7313fbf34c chore(cli): remove problematic snapshot test (#22722)
This test crashes often on windows.
2024-03-08 12:38:22 +05:30
David Sherret
639eeb1c14 fix(node): improve cjs tracking (#22673)
We were missing saying that a file is CJS when some Deno code imported
from the node_modules directory at runtime.
2024-03-08 12:38:22 +05:30