Skip to content

Commit fc49b83

Browse files
authored
Merge pull request #15 from swup/fix-install
Fix npm install
2 parents d9086cc + be685db commit fc49b83

3 files changed

Lines changed: 12 additions & 11 deletions

File tree

bin/commands/check.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import { readFile } from 'node:fs/promises';
2+
13
import { echo, error } from '../lib/shell.js';
24
import { resolve } from '../lib/helpers.js';
35

@@ -46,7 +48,6 @@ function checkPluginPackageInfo(pkg) {
4648
}
4749

4850
async function loadPluginPackageInfo() {
49-
const importPath = resolve('package.json');
50-
const { default: pkg } = await import(importPath, { assert: { type: 'json' } });
51-
return pkg;
51+
const importPath = new URL(resolve('package.json'), import.meta.url);
52+
return JSON.parse(await readFile(importPath));
5253
}

package-lock.json

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

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
"prettier": "^2.7.1",
3939
"shelljs": "^0.8.5",
4040
"shelljs-live": "^0.0.5",
41-
"swup": "3.0.0-rc.4"
41+
"swup": "^3.0.0"
4242
},
4343
"prettier": "@swup/prettier-config"
4444
}

0 commit comments

Comments
 (0)