From b5e56ef12cdb075bf69dda90152cd408fc88c94a Mon Sep 17 00:00:00 2001 From: sunyiteng Date: Mon, 21 Oct 2024 16:22:30 +0800 Subject: [PATCH] chore: update --- fixtures/pnpm/package.json | 3 ++- pnpm-lock.yaml | 3 +++ tests/resolve_test.rs | 8 ++++---- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/fixtures/pnpm/package.json b/fixtures/pnpm/package.json index c6fede1..12fd900 100644 --- a/fixtures/pnpm/package.json +++ b/fixtures/pnpm/package.json @@ -7,6 +7,7 @@ "ipaddr.js": "2.2.0", "postcss": "8.4.33", "styled-components": "6.1.1", - "mathjs": "13.2.0" + "mathjs": "13.2.0", + "decimal.js": "10.4.3" } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 97250dd..6cd0294 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -32,6 +32,9 @@ importers: axios: specifier: 1.6.2 version: 1.6.2 + decimal.js: + specifier: 10.4.3 + version: 10.4.3 ipaddr.js: specifier: 2.2.0 version: 2.2.0 diff --git a/tests/resolve_test.rs b/tests/resolve_test.rs index f7b2370..6585de0 100644 --- a/tests/resolve_test.rs +++ b/tests/resolve_test.rs @@ -132,11 +132,11 @@ fn ipaddr_js() { } #[test] -fn mathjs() { +fn decimal_js() { let dir = dir(); let path = dir.join("fixtures/pnpm"); let module_path = - dir.join("node_modules/.pnpm/mathjs@13.2.0/node_modules/mathjs/lib/esm/index.js"); + dir.join("node_modules/.pnpm/decimal.js@10.4.3/node_modules/decimal.js/decimal.mjs"); let resolvers = [ // with `extension_alias` @@ -153,14 +153,14 @@ fn mathjs() { ]; for resolver in resolvers { - let resolution = resolver.resolve(&path, "mathjs").map(|r| r.full_path()); + let resolution = resolver.resolve(&path, "decimal.js").map(|r| r.full_path()); assert_eq!(resolution, Ok(module_path.clone())); } } // resolve decimal.js #[test] -fn decimal_js() { +fn decimal_js_from_mathjs() { let dir = dir(); let path = dir.join("node_modules/.pnpm/mathjs@13.2.0/node_modules/mathjs/lib/esm"); let module_path =