forked from denoland/deno
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Details: denoland/deno_lockfile#8
- Loading branch information
Showing
8 changed files
with
62 additions
and
52 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -370,9 +370,9 @@ fn npm_module_check_then_error() { | |
lockfile.read_json::<deno_lockfile::LockfileContent>(); | ||
|
||
// make the specifier resolve to version 1 | ||
lockfile_content.npm.specifiers.insert( | ||
"@denotest/breaking-change-between-versions".to_string(), | ||
"@denotest/[email protected]".to_string(), | ||
lockfile_content.packages.specifiers.insert( | ||
"npm:@denotest/breaking-change-between-versions".to_string(), | ||
"npm:@denotest/[email protected]".to_string(), | ||
); | ||
lockfile.write_json(&lockfile_content); | ||
temp_dir.write( | ||
|
@@ -385,9 +385,9 @@ fn npm_module_check_then_error() { | |
|
||
// now update the lockfile to use version 2 instead, which should cause a | ||
// type checking error because the oldName no longer exists | ||
lockfile_content.npm.specifiers.insert( | ||
"@denotest/breaking-change-between-versions".to_string(), | ||
"@denotest/[email protected]".to_string(), | ||
lockfile_content.packages.specifiers.insert( | ||
"npm:@denotest/breaking-change-between-versions".to_string(), | ||
"npm:@denotest/[email protected]".to_string(), | ||
); | ||
lockfile.write_json(&lockfile_content); | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1261,7 +1261,7 @@ fn lock_file_missing_top_level_package() { | |
"\n", | ||
"Caused by:\n", | ||
" 0: The lockfile is corrupt. You can recreate it with --lock-write\n", | ||
" 1: Could not find referenced package '[email protected]' in the list of packages.\n" | ||
" 1: Could not find '[email protected]' in the list of packages.\n" | ||
) | ||
); | ||
} | ||
|
@@ -1280,13 +1280,12 @@ fn lock_file_lock_write() { | |
|
||
// write a lock file with borked integrity | ||
let lock_file_content = r#"{ | ||
"version": "2", | ||
"remote": {}, | ||
"npm": { | ||
"version": "3", | ||
"packages": { | ||
"specifiers": { | ||
"[email protected]": "[email protected]" | ||
"npm:[email protected]": "npm:[email protected]" | ||
}, | ||
"packages": { | ||
"npm": { | ||
"[email protected]": { | ||
"integrity": "sha512-+O9Jct8wf++lXxxFc4hc8LsjaSq0HFzzL7cVsw8pRDIPdjKD2mT4ytDZlLuSBZ4cLKZFXIrMGO7DbQCtMJJMKw==", | ||
"dependencies": {} | ||
|
@@ -1472,7 +1471,8 @@ fn lock_file_lock_write() { | |
} | ||
} | ||
} | ||
} | ||
}, | ||
"remote": {} | ||
} | ||
"#; | ||
temp_dir.write("deno.lock", lock_file_content); | ||
|
@@ -1514,17 +1514,17 @@ fn auto_discover_lock_file() { | |
|
||
// write a lock file with borked integrity | ||
let lock_file_content = r#"{ | ||
"version": "2", | ||
"remote": {}, | ||
"npm": { | ||
"specifiers": { "@denotest/bin": "@denotest/[email protected]" }, | ||
"packages": { | ||
"version": "3", | ||
"packages": { | ||
"specifiers": { "npm:@denotest/bin": "npm:@denotest/[email protected]" }, | ||
"npm": { | ||
"@denotest/[email protected]": { | ||
"integrity": "sha512-foobar", | ||
"dependencies": {} | ||
} | ||
} | ||
} | ||
}, | ||
"remote": {} | ||
}"#; | ||
temp_dir.write("deno.lock", lock_file_content); | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -993,7 +993,7 @@ fn lock_redirects() { | |
.run() | ||
.skip_output_check(); | ||
let initial_lockfile_text = r#"{ | ||
"version": "2", | ||
"version": "3", | ||
"redirects": { | ||
"https://localhost:4546/run/001_hello.js": "https://localhost:4545/run/001_hello.js" | ||
}, | ||
|
@@ -1012,7 +1012,7 @@ fn lock_redirects() { | |
|
||
// now try changing where the redirect occurs in the lockfile | ||
temp_dir.write("deno.lock", r#"{ | ||
"version": "2", | ||
"version": "3", | ||
"redirects": { | ||
"https://localhost:4546/run/001_hello.js": "https://localhost:4545/echo.ts" | ||
}, | ||
|
@@ -1044,24 +1044,24 @@ fn lock_redirects() { | |
util::assertions::assert_wildcard_match( | ||
&temp_dir.read_to_string("deno.lock"), | ||
r#"{ | ||
"version": "2", | ||
"redirects": { | ||
"https://localhost:4546/run/001_hello.js": "https://localhost:4545/echo.ts" | ||
}, | ||
"remote": { | ||
"https://localhost:4545/echo.ts": "829eb4d67015a695d70b2a33c78b631b29eea1dbac491a6bfcf394af2a2671c2", | ||
"https://localhost:4545/run/001_hello.js": "c479db5ea26965387423ca438bb977d0b4788d5901efcef52f69871e4c1048c5" | ||
}, | ||
"npm": { | ||
"version": "3", | ||
"packages": { | ||
"specifiers": { | ||
"@denotest/esm-basic": "@denotest/[email protected]" | ||
"npm:@denotest/esm-basic": "npm:@denotest/[email protected]" | ||
}, | ||
"packages": { | ||
"npm": { | ||
"@denotest/[email protected]": { | ||
"integrity": "sha512-[WILDCARD]", | ||
"dependencies": {} | ||
} | ||
} | ||
}, | ||
"redirects": { | ||
"https://localhost:4546/run/001_hello.js": "https://localhost:4545/echo.ts" | ||
}, | ||
"remote": { | ||
"https://localhost:4545/echo.ts": "829eb4d67015a695d70b2a33c78b631b29eea1dbac491a6bfcf394af2a2671c2", | ||
"https://localhost:4545/run/001_hello.js": "c479db5ea26965387423ca438bb977d0b4788d5901efcef52f69871e4c1048c5" | ||
} | ||
} | ||
"#, | ||
|
@@ -4515,9 +4515,16 @@ fn permission_prompt_strips_ansi_codes_and_control_chars() { | |
console.write_line( | ||
r#"Deno.permissions.request({ name: "env", variable: "\rDo you like ice cream? y/n" });"# | ||
); | ||
console.expect( | ||
"┌ ⚠️ Deno requests env access to \"Do you like ice cream? y/n\".", | ||
) | ||
// will be uppercase on windows | ||
let env_name = if cfg!(windows) { | ||
"DO YOU LIKE ICE CREAM? Y/N" | ||
} else { | ||
"Do you like ice cream? y/n" | ||
}; | ||
console.expect(format!( | ||
"┌ ⚠️ Deno requests env access to \"{}\".", | ||
env_name | ||
)) | ||
}); | ||
|
||
util::with_pty(&["repl"], |mut console| { | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.