diff options
author | Bartek IwaĆczuk <biwanczuk@gmail.com> | 2024-08-19 21:36:35 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-08-19 22:36:35 +0200 |
commit | b5051e25c219c188f17d499ee4e101a64eb62e37 (patch) | |
tree | 88c6ab12aefd491d52e638c6e5043728412bca9b /cli/cache | |
parent | bf510544ef26b89d4c2ae935893eaf62995ed903 (diff) |
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.
Diffstat (limited to 'cli/cache')
-rw-r--r-- | cli/cache/code_cache.rs | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/cli/cache/code_cache.rs b/cli/cache/code_cache.rs index abcd0d46a..d9e951af6 100644 --- a/cli/cache/code_cache.rs +++ b/cli/cache/code_cache.rs @@ -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( |