Skip to content

Commit b8d753f

Browse files
authored
refactor: update to deno_graph 0.97 (#1166)
### PR Checklist - [x] The PR title follows [conventional commits](https://www.conventionalcommits.org/en/v1.0.0/) - [ ] Is this closing an open issue? If so, link it, else include a proper description of the changes and rason behind them. - [ ] Does the PR have changes to the frontend? If so, include screenshots or a recording of the changes. <br/>If it affect colors, please include screenshots/recording in both light and dark mode. - [ ] Does the PR have changes to the backend? If so, make sure tests are added. <br/>And if changing dababase queries, be sure you have ran `sqlx prepare` and committed the changes in the `.sqlx` directory.
1 parent 172e296 commit b8d753f

File tree

6 files changed

+30
-21
lines changed

6 files changed

+30
-21
lines changed

Cargo.lock

Lines changed: 14 additions & 13 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

api/Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,9 +78,9 @@ deno_semver = "0.8.0"
7878
flate2 = "1"
7979
thiserror = "2"
8080
async-tar = "0.4.2"
81-
deno_graph = "0.95.1"
81+
deno_graph = "0.97.0"
8282
deno_ast = { version = "0.48.0", features = ["view"] }
83-
deno_doc = { version = "=0.178.1", features = ["comrak"] }
83+
deno_doc = { version = "=0.180.0", features = ["comrak"] }
8484
deno_error = "0.6.1"
8585
comrak = { version = "0.29.0", default-features = false }
8686
ammonia = "4.0.0"
@@ -92,7 +92,7 @@ pin-project = "1.1.3"
9292
regex = "1.10.2"
9393
postmark = { version = "=0.10.0", features = ["reqwest-rustls-tls"] }
9494
handlebars = "5.0.0"
95-
jsonc-parser = { version = "0.23", features = ["serde"] }
95+
jsonc-parser = { version = "0.26.3", features = ["serde"] }
9696
sha1 = "0.10.6"
9797
infer = "0.15.0"
9898
x509-parser = { version = "0.15.1", features = ["verify"] }

api/src/analysis.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,8 @@ async fn analyze_package_inner(
163163
locker: None,
164164
skip_dynamic_deps: false,
165165
module_info_cacher: Default::default(),
166+
unstable_bytes_imports: false,
167+
unstable_text_imports: false,
166168
},
167169
)
168170
.await;
@@ -594,6 +596,8 @@ async fn rebuild_npm_tarball_inner(
594596
locker: None,
595597
skip_dynamic_deps: false,
596598
module_info_cacher: Default::default(),
599+
unstable_bytes_imports: false,
600+
unstable_text_imports: false,
597601
},
598602
)
599603
.await;

api/src/api/package.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2003,6 +2003,8 @@ async fn analyze_deps_tree(
20032003
locker: None,
20042004
skip_dynamic_deps: false,
20052005
module_info_cacher: Default::default(),
2006+
unstable_bytes_imports: false,
2007+
unstable_text_imports: false,
20062008
},
20072009
)
20082010
.await;

api/src/npm/tarball.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ pub async fn create_npm_tarball<'a>(
183183
deno_ast::MediaType::JavaScript | deno_ast::MediaType::Mjs => {
184184
let parsed_source = sources.get_parsed_source(&js.specifier).unwrap();
185185
let module_info = sources
186-
.analyze(&js.specifier, js.source.clone(), js.media_type)
186+
.analyze(&js.specifier, js.source.text.clone(), js.media_type)
187187
.await
188188
.unwrap();
189189
let specifier_rewriter = SpecifierRewriter {
@@ -204,7 +204,7 @@ pub async fn create_npm_tarball<'a>(
204204
deno_ast::MediaType::Dts | deno_ast::MediaType::Dmts => {
205205
let parsed_source = sources.get_parsed_source(&js.specifier).unwrap();
206206
let module_info = sources
207-
.analyze(&js.specifier, js.source.clone(), js.media_type)
207+
.analyze(&js.specifier, js.source.text.clone(), js.media_type)
208208
.await
209209
.unwrap();
210210
let specifier_rewriter = SpecifierRewriter {
@@ -241,7 +241,7 @@ pub async fn create_npm_tarball<'a>(
241241
deno_ast::MediaType::TypeScript | deno_ast::MediaType::Mts => {
242242
let parsed_source = sources.get_parsed_source(&js.specifier).unwrap();
243243
let module_info = sources
244-
.analyze(&js.specifier, js.source.clone(), js.media_type)
244+
.analyze(&js.specifier, js.source.text.clone(), js.media_type)
245245
.await
246246
.unwrap();
247247
let specifier_rewriter = SpecifierRewriter {

api/src/publish.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -926,7 +926,8 @@ pub mod tests {
926926
"type": "static",
927927
"kind": "import",
928928
"specifier": "./test.js",
929-
"specifierRange": [[3,15],[3,26]]
929+
"specifierRange": [[3,15],[3,26]],
930+
"sideEffect": true
930931
},
931932
{
932933
"type": "static",
@@ -937,7 +938,8 @@ pub mod tests {
937938
},
938939
"specifier": "./jsr.json",
939940
"specifierRange": [[6,7],[6,19]],
940-
"importAttributes": { "known": { "type" : "json" } }
941+
"importAttributes": { "known": { "type" : "json" } },
942+
"sideEffect": true
941943
}
942944
],
943945
"jsxImportSource": {

0 commit comments

Comments
 (0)