implement lazy(?) mode. an unconfigured jsruntime is created if
DENO_UNSTABLE_CONTROL_SOCK is present, and later passed into deno_runtime to be
configured and used.
Fixes https://github.com/denoland/deno/issues/28022
Basically drizzle-kit studio uses hono with the node-server adapter.
That creates wrapper objects for responses that forward property getters
to the underlying response (the one we provided). However, in deno.serve
we were assuming that the response was actually the same response we
initially gave and crashed when it wasn't. instead, just call the
property getters if we can't find the inner response.
The raw headers bug is that we were exposing the `rawHeaders` field on
`Incoming` as a `Headers` object, instead it's supposed to be a flat
array of the header keys + values. I.e. `["Content-Type:",
"application/json", "Host:", "http://localhost"]`
Closes https://github.com/denoland/deno/issues/27229.
TODO:
- [x] Tests
- [x] Make some changes to `deno_cache_dir` so we can get the paths for
the local http cache
- [x] Right now this leaves the node modules setup cache in an incorrect
state (removes the symlinks, but doesn't update the setup cache)
- [ ] ~~Handle code cache and other sqlite caches?~~
This PR adds detection of `tsconfig.json` at the root of a workspace
when there exists either a deno.json or package.json. If a project
already has `deno.json` with a `compilerOptions` value the
`tsconfig.json` is ignored.
This was actually fixed via the deno_npm and lockfile updates, but it
would be good to have an explicit entry for this in the release notes so
labeling this as a "fix"
Closes https://github.com/denoland/deno/issues/27758
This commit adds the formatting of CSS, HTML, and SQL which are embedded in
Tagged Template Literal strings. The embedded languages are detected by
the tag name of the literal.
```ts
// triggers CSS formatting
const Div = styled.div`
margin: 5px;
padding: ${padding}px;
`;
// triggers HTML formatting
document.body.innerHTML = html`
<main>
<h1>Hello ${name}!<h1>
</main>
`;
// triggers SQL formatting when `--unstable-sql` passed
const query = sql`
SELECT
${table}.${field}
FROM
${table};
`
```
See https://github.com/dprint/dprint-plugin-typescript/pull/701 for more
details
Fixes https://github.com/denoland/deno/issues/28125
Additionally "FORCE_COLOR" env var can now be accessed
without `--allow-env` check.
---------
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
Ref #26819
An optional **timeout** parameter has been added to the
**Deno.connect()** interface. This parameter allows specifying a timeout
(in milliseconds) within which the application must establish a
connection. If the timeout is exceeded without successfully connecting,
the operation is automatically aborted with an error. If the parameter
is not provided, the default behavior remains unchanged (no timeout).
Currently, the timeout functionality is implemented only for TCP
connections. Other connection types are not affected by this change.
---------
Co-authored-by: Yoshiya Hinosawa <stibium121@gmail.com>
Closes#27722
This will show `Listening on http://0.0.0.0:8000 (http://localhost:8000)`
---------
Co-authored-by: David Sherret <dsherret@gmail.com>
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
- preserve authority from protocol
- reject some invalid combinations of request lines (e.g. `GET *`)
- modify rendering of OPTIONS and CONNECT so that they don't cause `new
URL` to raise.
Basically just update deno_lockfile, deno_npm, and eszip, and then adapt
to those changes. The main changes were the removal of the lockfile v4
resolution snapshot loading, and a terser formatting for the `os` and
`cpu` fields in the lockfile.
Fixes two issues:
- If a cached packument was out of date and missing a version from the
lockfile, we would fail. Instead we should try again with a forced
re-fetch
- We weren't threading through the workspace patch packages correctly