1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2025-01-10 08:09:06 -05:00
denoland-deno/tests/specs/lockfile/frozen_lockfile/__test__.jsonc
Bartek Iwańczuk b1c6142f74
BREAKING: DENO_FUTURE=1 by default, or welcome to Deno 2.0 (#25213)
This commit effectively turns Deno into Deno 2.0.

This is done by forcing `DENO_FUTURE=1` env var, that was available in
the past few months to try Deno 2 changes.

This commit contains several breaking changes scheduled for Deno 2:
- all deprecated JavaScript APIs are not available any more, mostly
`Deno.*` APIs
- `window` global is removed
- FFI, WebGPU and FS APIs are now stable and don't require
`--unstable-*` flags
- import assertions are no longer supported
- "bring your own node modules" is enabled by default

This is the first commit in a series that are scheduled before the Deno
2 release.

Follow up work is tracked in
https://github.com/denoland/deno/issues/25241.

---------

Co-authored-by: Asher Gomez <ashersaupingomez@gmail.com>
Co-authored-by: Nayeem Rahman <nayeemrmn99@gmail.com>
Co-authored-by: Nathan Whitaker <nathan@deno.com>
2024-08-30 13:58:58 -04:00

195 lines
4.6 KiB
Text

{
"tempDir": true,
// TODO(2.0): re-enable after DENO_FUTURE=1 by default lands
"ignore": true,
"tests": {
"error_with_new_npm_dep": {
"steps": [
{
"args": "cache add.ts",
"output": "[WILDCARD]"
},
{
// sub.ts imports from an npm package
// that's not in the lockfile
"args": "run --frozen sub.ts",
"output": "frozen_new_dep_run.out",
"exitCode": 1
},
{
"args": "cache --frozen sub.ts",
"output": "frozen_new_dep_cache.out",
"exitCode": 1
},
{
// update the lockfile
"args": "cache sub.ts",
"output": "update_lockfile.out"
},
{
"args": "run --frozen sub.ts",
"output": "3 - 2 = 1\n"
}
]
},
"error_with_new_jsr_dep": {
"steps": [
{
"args": "cache jsr.ts",
"output": "[WILDCARD]"
},
{
"args": "run --frozen jsr2.ts",
"output": "frozen_new_dep_jsr_run.out",
"exitCode": 1
},
{
"args": "cache --frozen jsr2.ts",
"output": "frozen_new_dep_jsr_cache.out",
"exitCode": 1
},
{
// update the lockfile
"args": "cache jsr2.ts",
"output": ""
},
{
"args": "run --frozen jsr2.ts",
"output": "1 + 2 = 3\n"
}
]
},
"error_when_package_json_changed": {
"envs": {
"DENO_FUTURE": "1"
},
"steps": [
{
"args": [
"eval",
"Deno.writeTextFileSync('deno.json', `{ \"nodeModules\": \"local-auto\" }`)"
],
"output": "[WILDCARD]"
},
{
"args": "cache add.ts",
"output": "[WILDCARD]"
},
{
"args": [
"eval",
"Deno.writeTextFileSync(\"package.json\", JSON.stringify({ dependencies: { \"@denotest/bin\": \"0.7.0\" } }))"
],
"output": ""
},
{
"args": "cache --frozen add.ts",
"output": "frozen_package_json_changed.out",
"exitCode": 1
},
{
"args": "install --frozen",
"output": "frozen_package_json_changed_install.out",
"exitCode": 1
}
]
},
"no_error_when_in_lockfile": {
"steps": [
{
"args": "cache add.ts",
"output": "[WILDCARD]"
},
{
"args": "run --frozen add.ts",
"output": "1 + 2 = 3\n"
}
]
},
"errors_if_creates_lockfile": {
"steps": [
{
"args": [
"eval",
"Deno.statSync('lock.json')"
],
"output": "[WILDCARD]NotFound[WILDCARD]",
"exitCode": 1
},
{
"args": "run --frozen add.ts",
"output": "no_lockfile_run.out",
"exitCode": 1
}
]
},
"lockfile_config": {
"steps": [
{
"args": [
"eval",
"Deno.writeTextFileSync('deno.json', JSON.stringify({ lock: { frozen: true }, ...JSON.parse(Deno.readTextFileSync('deno.json')) }))"
],
"output": ""
},
{
"args": "cache --frozen=false add.ts",
"output": "[WILDCARD]"
},
{
// sub.ts imports from an npm package
// that's not in the lockfile
"args": "run sub.ts",
"output": "frozen_new_dep_run.out",
"exitCode": 1
},
{
"args": "cache sub.ts",
"output": "frozen_new_dep_cache.out",
"exitCode": 1
}
]
},
"non_analyzable_dynamic_npm": {
"steps": [
{
"args": "cache add.ts",
"output": "[WILDCARD]"
},
{
"args": "run --frozen sub-dynamic.ts",
"output": "frozen_new_dep_dynamic_npm.out",
"exitCode": 1
}
]
},
"non_analyzable_dynamic_jsr": {
"steps": [
{
"args": "cache add.ts",
"output": "[WILDCARD]"
},
{
"args": "run --frozen --allow-net jsr-dynamic.ts",
"output": "frozen_new_dep_dynamic_jsr.out",
"exitCode": 1
}
]
},
"non_analyzable_dynamic_http": {
"steps": [
{
"args": "cache add.ts",
"output": "[WILDCARD]"
},
{
"args": "run --frozen --allow-net http-dynamic.ts",
"output": "frozen_new_dep_dynamic_http.out",
"exitCode": 1
}
]
}
}
}