2024-07-02 18:00:16 -04:00
|
|
|
{
|
|
|
|
"tempDir": 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": {
|
|
|
|
"steps": [
|
|
|
|
{
|
2024-08-29 18:57:43 -04:00
|
|
|
"args": [
|
|
|
|
"eval",
|
2024-09-03 06:43:10 -04:00
|
|
|
"Deno.writeTextFileSync('deno.json', `{ \"nodeModulesDir\": \"auto\" }`)"
|
2024-08-29 18:57:43 -04:00
|
|
|
],
|
|
|
|
"output": "[WILDCARD]"
|
|
|
|
},
|
|
|
|
{
|
2024-07-02 18:00:16 -04:00
|
|
|
"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
|
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
2024-08-20 10:55:47 -04:00
|
|
|
|
|
|
|
"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
|
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
|
|
|
|
2024-07-02 18:00:16 -04:00
|
|
|
"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]"
|
|
|
|
},
|
|
|
|
{
|
2024-09-25 21:50:54 -04:00
|
|
|
"args": "run --frozen --allow-import http-dynamic.ts",
|
2024-07-02 18:00:16 -04:00
|
|
|
"output": "frozen_new_dep_dynamic_http.out",
|
|
|
|
"exitCode": 1
|
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|