@pandacss/node 0.15.4 → 0.15.5

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/dist/index.d.mts CHANGED
@@ -25,7 +25,7 @@ declare const getOutputEngine: ({ paths, runtime: { path, fs }, }: Generator & {
25
25
  hooks: PandaHookable;
26
26
  }) => {
27
27
  empty(): void;
28
- write(output: Artifact | undefined): Promise<void[] | undefined>;
28
+ write(output: Artifact | undefined): Promise<PromiseSettledResult<void>[] | undefined>;
29
29
  };
30
30
 
31
31
  declare const createContext: (conf: ConfigResultWithHooks) => PandaContext;
package/dist/index.d.ts CHANGED
@@ -25,7 +25,7 @@ declare const getOutputEngine: ({ paths, runtime: { path, fs }, }: Generator & {
25
25
  hooks: PandaHookable;
26
26
  }) => {
27
27
  empty(): void;
28
- write(output: Artifact | undefined): Promise<void[] | undefined>;
28
+ write(output: Artifact | undefined): Promise<PromiseSettledResult<void>[] | undefined>;
29
29
  };
30
30
 
31
31
  declare const createContext: (conf: ConfigResultWithHooks) => PandaContext;
package/dist/index.js CHANGED
@@ -926,7 +926,7 @@ var getOutputEngine = ({
926
926
  return;
927
927
  const { dir = paths.root, files } = output;
928
928
  fs.ensureDirSync(path2.join(...dir));
929
- return Promise.all(
929
+ return Promise.allSettled(
930
930
  files.map(async ({ file, code }) => {
931
931
  const absPath = path2.join(...dir, file);
932
932
  if (code) {
@@ -2362,15 +2362,15 @@ function extractFile(ctx, file) {
2362
2362
  );
2363
2363
  }
2364
2364
  function extractFiles(ctx) {
2365
- return Promise.all(ctx.getFiles().map((file) => writeFileChunk(ctx, file)));
2365
+ return Promise.allSettled(ctx.getFiles().map((file) => writeFileChunk(ctx, file)));
2366
2366
  }
2367
2367
  var randomWords = ["Sweet", "Divine", "Pandalicious", "Super"];
2368
2368
  var pickRandom = (arr) => arr[Math.floor(Math.random() * arr.length)];
2369
2369
  async function emitArtifacts(ctx) {
2370
2370
  if (ctx.config.clean)
2371
2371
  ctx.output.empty();
2372
- await Promise.all(ctx.getArtifacts().map(ctx.output.write));
2373
- ctx.hooks.callHook("generator:done");
2372
+ await Promise.allSettled(ctx.getArtifacts().map(ctx.output.write));
2373
+ void ctx.hooks.callHook("generator:done");
2374
2374
  return {
2375
2375
  box: createBox({
2376
2376
  content: ctx.messages.codegenComplete(),
@@ -2563,7 +2563,7 @@ var Builder = class {
2563
2563
  extract = async () => {
2564
2564
  const ctx = this.getContextOrThrow();
2565
2565
  const done = import_logger4.logger.time.info("Extracted in");
2566
- await Promise.all(ctx.getFiles().map((file) => this.extractFile(ctx, file)));
2566
+ await Promise.allSettled(ctx.getFiles().map((file) => this.extractFile(ctx, file)));
2567
2567
  done();
2568
2568
  };
2569
2569
  toString = () => {
@@ -2627,7 +2627,7 @@ async function debugFiles(ctx, options) {
2627
2627
  await fs.writeFile(`${outdir}/config.json`, JSON.stringify(ctx.config, null, 2));
2628
2628
  }
2629
2629
  const filesWithCss = [];
2630
- await Promise.all(
2630
+ await Promise.allSettled(
2631
2631
  files.map(async (file) => {
2632
2632
  const measure = import_logger5.logger.time.debug(`Parsed ${file}`);
2633
2633
  const result = ctx.project.parseSourceFile(file);
@@ -2649,7 +2649,7 @@ async function debugFiles(ctx, options) {
2649
2649
  const cssPath = `${relative3}/${parsedPath.name}.css`.replaceAll(path2.sep, "__");
2650
2650
  import_logger5.logger.info("cli", `Writing ${import_logger5.colors.bold(`${outdir}/${astJsonPath}`)}`);
2651
2651
  import_logger5.logger.info("cli", `Writing ${import_logger5.colors.bold(`${outdir}/${cssPath}`)}`);
2652
- return Promise.all([
2652
+ return Promise.allSettled([
2653
2653
  fs.writeFile(`${outdir}/${astJsonPath}`, JSON.stringify(result.toJSON(), null, 2)),
2654
2654
  fs.writeFile(`${outdir}/${cssPath}`, css)
2655
2655
  ]);
package/dist/index.mjs CHANGED
@@ -912,7 +912,7 @@ var getOutputEngine = ({
912
912
  return;
913
913
  const { dir = paths.root, files } = output;
914
914
  fs.ensureDirSync(path2.join(...dir));
915
- return Promise.all(
915
+ return Promise.allSettled(
916
916
  files.map(async ({ file, code }) => {
917
917
  const absPath = path2.join(...dir, file);
918
918
  if (code) {
@@ -2348,15 +2348,15 @@ function extractFile(ctx, file) {
2348
2348
  );
2349
2349
  }
2350
2350
  function extractFiles(ctx) {
2351
- return Promise.all(ctx.getFiles().map((file) => writeFileChunk(ctx, file)));
2351
+ return Promise.allSettled(ctx.getFiles().map((file) => writeFileChunk(ctx, file)));
2352
2352
  }
2353
2353
  var randomWords = ["Sweet", "Divine", "Pandalicious", "Super"];
2354
2354
  var pickRandom = (arr) => arr[Math.floor(Math.random() * arr.length)];
2355
2355
  async function emitArtifacts(ctx) {
2356
2356
  if (ctx.config.clean)
2357
2357
  ctx.output.empty();
2358
- await Promise.all(ctx.getArtifacts().map(ctx.output.write));
2359
- ctx.hooks.callHook("generator:done");
2358
+ await Promise.allSettled(ctx.getArtifacts().map(ctx.output.write));
2359
+ void ctx.hooks.callHook("generator:done");
2360
2360
  return {
2361
2361
  box: createBox({
2362
2362
  content: ctx.messages.codegenComplete(),
@@ -2549,7 +2549,7 @@ var Builder = class {
2549
2549
  extract = async () => {
2550
2550
  const ctx = this.getContextOrThrow();
2551
2551
  const done = logger4.time.info("Extracted in");
2552
- await Promise.all(ctx.getFiles().map((file) => this.extractFile(ctx, file)));
2552
+ await Promise.allSettled(ctx.getFiles().map((file) => this.extractFile(ctx, file)));
2553
2553
  done();
2554
2554
  };
2555
2555
  toString = () => {
@@ -2613,7 +2613,7 @@ async function debugFiles(ctx, options) {
2613
2613
  await fs.writeFile(`${outdir}/config.json`, JSON.stringify(ctx.config, null, 2));
2614
2614
  }
2615
2615
  const filesWithCss = [];
2616
- await Promise.all(
2616
+ await Promise.allSettled(
2617
2617
  files.map(async (file) => {
2618
2618
  const measure = logger5.time.debug(`Parsed ${file}`);
2619
2619
  const result = ctx.project.parseSourceFile(file);
@@ -2635,7 +2635,7 @@ async function debugFiles(ctx, options) {
2635
2635
  const cssPath = `${relative3}/${parsedPath.name}.css`.replaceAll(path2.sep, "__");
2636
2636
  logger5.info("cli", `Writing ${colors.bold(`${outdir}/${astJsonPath}`)}`);
2637
2637
  logger5.info("cli", `Writing ${colors.bold(`${outdir}/${cssPath}`)}`);
2638
- return Promise.all([
2638
+ return Promise.allSettled([
2639
2639
  fs.writeFile(`${outdir}/${astJsonPath}`, JSON.stringify(result.toJSON(), null, 2)),
2640
2640
  fs.writeFile(`${outdir}/${cssPath}`, css)
2641
2641
  ]);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pandacss/node",
3
- "version": "0.15.4",
3
+ "version": "0.15.5",
4
4
  "description": "The core css panda library",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -34,17 +34,17 @@
34
34
  "ts-morph": "19.0.0",
35
35
  "ts-pattern": "5.0.5",
36
36
  "tsconfck": "^2.1.2",
37
- "@pandacss/config": "0.15.4",
38
- "@pandacss/core": "0.15.4",
39
- "@pandacss/error": "0.15.4",
40
- "@pandacss/extractor": "0.15.4",
41
- "@pandacss/generator": "0.15.4",
42
- "@pandacss/is-valid-prop": "0.15.4",
43
- "@pandacss/logger": "0.15.4",
44
- "@pandacss/parser": "0.15.4",
45
- "@pandacss/shared": "0.15.4",
46
- "@pandacss/token-dictionary": "0.15.4",
47
- "@pandacss/types": "0.15.4"
37
+ "@pandacss/config": "0.15.5",
38
+ "@pandacss/core": "0.15.5",
39
+ "@pandacss/error": "0.15.5",
40
+ "@pandacss/extractor": "0.15.5",
41
+ "@pandacss/generator": "0.15.5",
42
+ "@pandacss/is-valid-prop": "0.15.5",
43
+ "@pandacss/logger": "0.15.5",
44
+ "@pandacss/parser": "0.15.5",
45
+ "@pandacss/shared": "0.15.5",
46
+ "@pandacss/token-dictionary": "0.15.5",
47
+ "@pandacss/types": "0.15.5"
48
48
  },
49
49
  "devDependencies": {
50
50
  "@types/fs-extra": "11.0.2",
@@ -53,7 +53,7 @@
53
53
  "@types/lodash.merge": "4.6.7",
54
54
  "@types/pluralize": "0.0.30",
55
55
  "boxen": "^7.1.1",
56
- "@pandacss/fixture": "0.15.4"
56
+ "@pandacss/fixture": "0.15.5"
57
57
  },
58
58
  "scripts": {
59
59
  "build": "tsup src/index.ts --format=cjs,esm --shims --dts",