@hkdigital/lib-core 0.5.73 → 0.5.74
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -2,9 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
import { readdir, readFile, stat } from 'node:fs/promises';
|
|
4
4
|
import { join, relative, resolve, dirname, isAbsolute } from 'node:path';
|
|
5
|
+
import { fileURLToPath } from 'node:url';
|
|
5
6
|
|
|
6
7
|
const PROJECT_ROOT = process.cwd();
|
|
7
8
|
const SRC_DIR = join(PROJECT_ROOT, 'src');
|
|
9
|
+
const SCRIPT_DIR = dirname(fileURLToPath(import.meta.url));
|
|
10
|
+
const LIB_ROOT = dirname(SCRIPT_DIR);
|
|
8
11
|
|
|
9
12
|
/**
|
|
10
13
|
* Scopes to validate for barrel exports
|
|
@@ -895,14 +898,13 @@ async function validateFile(filePath) {
|
|
|
895
898
|
* Main validation function
|
|
896
899
|
*/
|
|
897
900
|
async function main() {
|
|
898
|
-
// Load package version
|
|
899
|
-
const pkgJsonPath = join(
|
|
901
|
+
// Load package version from lib-core's package.json
|
|
902
|
+
const pkgJsonPath = join(LIB_ROOT, 'package.json');
|
|
900
903
|
const pkgJsonContent = await readFile(pkgJsonPath, 'utf-8');
|
|
901
904
|
const pkgJson = JSON.parse(pkgJsonContent);
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
);
|
|
905
|
+
|
|
906
|
+
console.log(`Using script from @hkdigital/lib-core v${pkgJson.version}`);
|
|
907
|
+
console.log(`Validating import paths...`);
|
|
906
908
|
|
|
907
909
|
// Load project aliases from svelte.config.js
|
|
908
910
|
PROJECT_ALIASES = await loadAliases();
|