mirror of
https://github.com/denoland/deno.git
synced 2025-08-04 10:59:13 +00:00
feat: Deprecate "import assertions" with a warning (#24743)
This commit deprecates "import assertions" proposal that has been replaced with "import attributes". Any time an import assertion is encountered a warning will be printed to the terminal. This warning will be printed for both local and remote files (ie. user code and dependencies). Import assertions support will be removed in Deno 2.
This commit is contained in:
parent
bf510544ef
commit
b5051e25c2
9 changed files with 102 additions and 11 deletions
13
cli/cache/code_cache.rs
vendored
13
cli/cache/code_cache.rs
vendored
|
@ -80,6 +80,10 @@ impl CodeCache {
|
|||
data,
|
||||
));
|
||||
}
|
||||
|
||||
pub fn remove_code_cache(&self, specifier: &str) {
|
||||
Self::ensure_ok(self.inner.remove_code_cache(specifier))
|
||||
}
|
||||
}
|
||||
|
||||
impl code_cache::CodeCache for CodeCache {
|
||||
|
@ -158,6 +162,15 @@ impl CodeCacheInner {
|
|||
self.conn.execute(sql, params)?;
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn remove_code_cache(&self, specifier: &str) -> Result<(), AnyError> {
|
||||
let sql = "
|
||||
DELETE FROM codecache
|
||||
WHERE specifier=$1;";
|
||||
let params = params![specifier];
|
||||
self.conn.execute(sql, params)?;
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
||||
fn serialize_code_cache_type(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue