Skip to content

Commit

Permalink
refactor: fullPath sync compat
Browse files Browse the repository at this point in the history
  • Loading branch information
turadg committed Feb 11, 2025
1 parent bded8da commit 0748119
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
5 changes: 2 additions & 3 deletions packages/boot/tools/supports.ts
Original file line number Diff line number Diff line change
Expand Up @@ -115,9 +115,8 @@ export const getNodeTestVaultsConfig = async ({
defaultManagerType = 'local' as ManagerType,
discriminator = '',
}) => {
const fullPath = importMetaResolve(specifier, import.meta.url).then(
u => new URL(u).pathname,
);
const fullPath = new URL(importMetaResolve(specifier, import.meta.url))
.pathname;
const config: SwingSetConfig & { coreProposals?: any[] } = NonNullish(
await loadSwingsetConfigFile(fullPath),
);
Expand Down
5 changes: 2 additions & 3 deletions packages/builders/test/inter-proposals.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,8 @@ const test = anyTest;
const makeTestContext = t => {
/** @param {string} specifier */
const loadConfig = async specifier => {
const fullPath = importMetaResolve(specifier, import.meta.url).then(
u => new URL(u).pathname,
);
const fullPath = new URL(importMetaResolve(specifier, import.meta.url))
.pathname;
t.is(typeof fullPath, 'string');
const txt = await ambientFs.promises.readFile(fullPath, 'utf-8');
t.is(typeof txt, 'string');
Expand Down

0 comments on commit 0748119

Please sign in to comment.