summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorMatthew Miller <matthew@millerti.me>2023-08-18 14:52:04 -0700
committerMatthew Miller <matthew@millerti.me>2023-08-18 14:52:04 -0700
commit84462c46fbf7986c7dd9e7056b6aca85af8a4345 (patch)
treeb5e0c3e602cf835b5b4d247a56ea5f209220409f
parent490dd0b5f50c017d7c5c1df036dc3302080f0a3b (diff)
Map typescript-types to npm version
-rw-r--r--packages/server/build_npm.ts7
1 files changed, 5 insertions, 2 deletions
diff --git a/packages/server/build_npm.ts b/packages/server/build_npm.ts
index 5d6790a..57c80eb 100644
--- a/packages/server/build_npm.ts
+++ b/packages/server/build_npm.ts
@@ -5,7 +5,10 @@ const outDir = {
test: './npm-test',
} as const;
const lernaPackageJSON: { version: string } = JSON.parse(
- await Deno.readTextFile('./package.json'),
+ Deno.readTextFileSync('./package.json'),
+);
+const typesPackageJSON: { version: string } = JSON.parse(
+ Deno.readTextFileSync('../typescript-types/npm/package.json'),
);
// Clear both build directories
@@ -155,7 +158,7 @@ function getMappings(): BuildOptions['mappings'] {
// Mapping for '../../typescript-types/src/index.ts' in deps.ts
'../typescript-types/src/index.ts': {
name: '@simplewebauthn/typescript-types',
- version: '^7.4.0',
+ version: `^${typesPackageJSON.version}`,
},
};
}