sku 14.0.1 → 14.0.2
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/CHANGELOG.md
CHANGED
package/dist/config/targets.json
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import chalk from 'chalk';
|
|
2
2
|
import { existsSync } from 'node:fs';
|
|
3
3
|
import { getPathFromCwd } from '../lib/cwd.js';
|
|
4
|
+
import _debug from 'debug';
|
|
5
|
+
const debug = _debug('sku:config');
|
|
4
6
|
let configPath;
|
|
5
7
|
const getConfigPath = () => configPath;
|
|
6
8
|
export const setConfigPath = (path) => {
|
|
@@ -21,16 +23,16 @@ export const resolveAppSkuConfigPath = () => {
|
|
|
21
23
|
if (customSkuConfigPath) {
|
|
22
24
|
const resolvedCustomConfigPath = getPathFromCwd(customSkuConfigPath);
|
|
23
25
|
if (existsSync(resolvedCustomConfigPath)) {
|
|
24
|
-
|
|
26
|
+
debug('Loading custom sku config:', resolvedCustomConfigPath);
|
|
25
27
|
return resolvedCustomConfigPath;
|
|
26
28
|
}
|
|
27
|
-
|
|
29
|
+
debug('Custom sku config file does not exist:', resolvedCustomConfigPath);
|
|
28
30
|
}
|
|
29
31
|
const supportedSkuConfigPath = resolveSupportedSkuConfigPath();
|
|
30
32
|
if (supportedSkuConfigPath) {
|
|
31
|
-
|
|
33
|
+
debug('Loading sku config:', supportedSkuConfigPath);
|
|
32
34
|
return supportedSkuConfigPath;
|
|
33
35
|
}
|
|
34
|
-
|
|
36
|
+
debug(`Failed to find a supported ${chalk.bold('sku.config')} file (supported formats are ${supportedSkuConfigExtensions.map((ext) => `sku.config.${ext}`).join(', ')})`);
|
|
35
37
|
return null;
|
|
36
38
|
};
|
package/dist/context/index.js
CHANGED
|
@@ -8,11 +8,13 @@ import validateConfig from './validateConfig.js';
|
|
|
8
8
|
import defaultCompilePackages from './defaultCompilePackages.js';
|
|
9
9
|
import isCompilePackage from '../lib/isCompilePackage.js';
|
|
10
10
|
import { resolveAppSkuConfigPath } from './configPath.js';
|
|
11
|
+
import _debug from 'debug';
|
|
12
|
+
const debug = _debug('sku:config');
|
|
11
13
|
const jiti = createJiti(import.meta.url);
|
|
12
14
|
const getSkuConfig = async () => {
|
|
13
15
|
const appSkuConfigPath = resolveAppSkuConfigPath();
|
|
14
16
|
if (!appSkuConfigPath) {
|
|
15
|
-
|
|
17
|
+
debug('No sku config file found. Using default configuration.');
|
|
16
18
|
return {
|
|
17
19
|
appSkuConfig: {},
|
|
18
20
|
appSkuConfigPath: null,
|
|
@@ -94,6 +94,7 @@ export const initAction = async (projectName, { verbose }) => {
|
|
|
94
94
|
// Allows `pnpm` to run `sku`'s, and its dependencies', build scripts
|
|
95
95
|
// See https://pnpm.io/package_json#pnpmonlybuiltdependencies
|
|
96
96
|
packageJson.pnpm = {
|
|
97
|
+
// We transitively depend on `esbuild` via Vanilla Extract
|
|
97
98
|
onlyBuiltDependencies: ['sku', '@swc/core', 'esbuild'],
|
|
98
99
|
};
|
|
99
100
|
}
|