@pure-ds/core 0.4.29 → 0.4.32
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 +1 -1
- package/packages/pds-cli/bin/generate-css-data.mjs +1 -1
- package/packages/pds-cli/bin/generate-manifest.mjs +1 -1
- package/packages/pds-cli/bin/pds-build-icons.mjs +2 -2
- package/packages/pds-cli/bin/pds-static.mjs +2 -2
- package/packages/pds-cli/bin/pds.mjs +1 -1
- package/packages/pds-cli/bin/postinstall.mjs +18 -1
- package/readme.md +2 -2
- /package/packages/pds-cli/lib/{asset-roots.js → asset-roots.mjs} +0 -0
- /package/packages/pds-cli/lib/{fs-writer.js → fs-writer.mjs} +0 -0
package/package.json
CHANGED
|
@@ -555,7 +555,7 @@ async function generateCSSData(targetDir) {
|
|
|
555
555
|
export { generateCSSData };
|
|
556
556
|
|
|
557
557
|
// Run if called directly
|
|
558
|
-
if (process.argv[1] && process.argv[1].endsWith('generate-css-data.js')) {
|
|
558
|
+
if (process.argv[1] && (process.argv[1].endsWith('generate-css-data.mjs') || process.argv[1].endsWith('generate-css-data.js'))) {
|
|
559
559
|
const targetDir = process.argv[2] || null;
|
|
560
560
|
generateCSSData(targetDir).then(success => {
|
|
561
561
|
process.exit(success ? 0 : 1);
|
|
@@ -344,7 +344,7 @@ async function generateManifest(targetDir) {
|
|
|
344
344
|
export { generateManifest };
|
|
345
345
|
|
|
346
346
|
// Run if called directly
|
|
347
|
-
if (process.argv[1] && process.argv[1].endsWith('generate-manifest.js')) {
|
|
347
|
+
if (process.argv[1] && (process.argv[1].endsWith('generate-manifest.mjs') || process.argv[1].endsWith('generate-manifest.js'))) {
|
|
348
348
|
const targetDir = process.argv[2] || null;
|
|
349
349
|
generateManifest(targetDir).then(success => {
|
|
350
350
|
process.exit(success ? 0 : 1);
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
import { readFile, writeFile, mkdir, access } from 'fs/promises';
|
|
13
13
|
import path from 'path';
|
|
14
14
|
import { fileURLToPath, pathToFileURL } from 'url';
|
|
15
|
-
import { resolvePublicAssetDirectory, ensurePdsPath } from '../lib/asset-roots.
|
|
15
|
+
import { resolvePublicAssetDirectory, ensurePdsPath } from '../lib/asset-roots.mjs';
|
|
16
16
|
|
|
17
17
|
const __filename = fileURLToPath(import.meta.url);
|
|
18
18
|
const __dirname = path.dirname(__filename);
|
|
@@ -144,7 +144,7 @@ if (process.argv[1]) {
|
|
|
144
144
|
const scriptPath = fileURLToPath(import.meta.url);
|
|
145
145
|
const argPath = process.argv[1];
|
|
146
146
|
// Check if this is the main module being executed
|
|
147
|
-
if (argPath === scriptPath || argPath.endsWith('pds-build-icons.js') || argPath.endsWith('pds-build-icons')) {
|
|
147
|
+
if (argPath === scriptPath || argPath.endsWith('pds-build-icons.mjs') || argPath.endsWith('pds-build-icons.js') || argPath.endsWith('pds-build-icons')) {
|
|
148
148
|
main();
|
|
149
149
|
}
|
|
150
150
|
}
|
|
@@ -31,7 +31,7 @@ import {
|
|
|
31
31
|
isUrlLike,
|
|
32
32
|
getPublicRootCandidate,
|
|
33
33
|
ensurePdsPath,
|
|
34
|
-
} from '../lib/asset-roots.
|
|
34
|
+
} from '../lib/asset-roots.mjs';
|
|
35
35
|
|
|
36
36
|
const __filename = fileURLToPath(import.meta.url);
|
|
37
37
|
const __dirname = path.dirname(__filename);
|
|
@@ -573,7 +573,7 @@ if (process.argv[1]) {
|
|
|
573
573
|
const scriptPath = fileURLToPath(import.meta.url);
|
|
574
574
|
const argPath = process.argv[1];
|
|
575
575
|
// Check if this is the main module being executed
|
|
576
|
-
if (argPath === scriptPath || argPath.endsWith('pds-static.js') || argPath.endsWith('pds-export')) {
|
|
576
|
+
if (argPath === scriptPath || argPath.endsWith('pds-static.mjs') || argPath.endsWith('pds-static.js') || argPath.endsWith('pds-export')) {
|
|
577
577
|
main();
|
|
578
578
|
}
|
|
579
579
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { generateFromFile, generate, watch as watchConfig } from '../../../src/node-api/pds-api.js';
|
|
3
|
-
import { writeFilesAtomic } from '../lib/fs-writer.
|
|
3
|
+
import { writeFilesAtomic } from '../lib/fs-writer.mjs';
|
|
4
4
|
import fs from 'fs';
|
|
5
5
|
import path from 'path';
|
|
6
6
|
|
|
@@ -385,6 +385,23 @@ async function copyPdsAssets() {
|
|
|
385
385
|
const consumerRoot = await findConsumerRoot();
|
|
386
386
|
console.log('🧪 Consumer root:', consumerRoot);
|
|
387
387
|
|
|
388
|
+
// Check if consumer package.json has "type": "module"
|
|
389
|
+
try {
|
|
390
|
+
const consumerPkgPath = path.join(consumerRoot, 'package.json');
|
|
391
|
+
const consumerPkg = JSON.parse(await readFile(consumerPkgPath, 'utf8'));
|
|
392
|
+
|
|
393
|
+
if (consumerPkg.type !== 'module') {
|
|
394
|
+
console.error('\n❌ ERROR: @pure-ds/core requires ES modules.\n');
|
|
395
|
+
console.error('Add this to your package.json:\n');
|
|
396
|
+
console.error(' "type": "module"\n');
|
|
397
|
+
console.error('Then run: npm install\n');
|
|
398
|
+
process.exit(1);
|
|
399
|
+
}
|
|
400
|
+
} catch (e) {
|
|
401
|
+
console.error('❌ Could not read consumer package.json:', e.message);
|
|
402
|
+
process.exit(1);
|
|
403
|
+
}
|
|
404
|
+
|
|
388
405
|
// Allow opting out explicitly (useful for local dev / linking)
|
|
389
406
|
if (
|
|
390
407
|
process.env.PDS_SKIP_POSTINSTALL === '1' ||
|
|
@@ -452,7 +469,7 @@ async function copyPdsAssets() {
|
|
|
452
469
|
console.log('📦 To generate static assets run: npm run pds:export');
|
|
453
470
|
} else {
|
|
454
471
|
console.log('🚀 Running pds:export automatically...');
|
|
455
|
-
const staticModuleUrl = pathToFileURL(path.join(__dirname, 'pds-static.
|
|
472
|
+
const staticModuleUrl = pathToFileURL(path.join(__dirname, 'pds-static.mjs')).href;
|
|
456
473
|
const previousEnv = {
|
|
457
474
|
PDS_POSTINSTALL: process.env.PDS_POSTINSTALL,
|
|
458
475
|
PDS_LOG_STREAM: process.env.PDS_LOG_STREAM,
|
package/readme.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Pure Design System (PDS)
|
|
2
2
|
|
|
3
|
-
> ⚠️ **Beta Software** - APIs are stabilizing but may still change. Pin versions in production: `"@pure-ds/core": "~0.
|
|
3
|
+
> ⚠️ **Beta Software** - APIs are stabilizing but may still change. Pin versions in production: `"@pure-ds/core": "~0.4.30"`
|
|
4
4
|
|
|
5
5
|
[](https://github.com/mvneerven/pure-ds/actions/workflows/ci.yml)
|
|
6
6
|
[](#license)
|
|
@@ -1889,7 +1889,7 @@ export default {
|
|
|
1889
1889
|
|
|
1890
1890
|
1. Verify components directory exists
|
|
1891
1891
|
2. Check import map for `#pds/lit` (required for Lit components - see below)
|
|
1892
|
-
3. Manually sync: `node node_modules/pure-ds/packages/pds-cli/bin/postinstall.
|
|
1892
|
+
3. Manually sync: `node node_modules/pure-ds/packages/pds-cli/bin/postinstall.mjs`
|
|
1893
1893
|
4. Check browser console for errors
|
|
1894
1894
|
|
|
1895
1895
|
### Lit Components Not Working
|
|
File without changes
|
|
File without changes
|