@doki-land/nifty 0.0.9 → 0.0.11

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@doki-land/nifty",
3
- "version": "0.0.9",
3
+ "version": "0.0.11",
4
4
  "description": "Gitmoji-first commit conventions and release helpers (Node-API + TypeScript)",
5
5
  "type": "module",
6
6
  "license": "MPL-2.0",
@@ -24,11 +24,11 @@
24
24
  "jiti": "^2.4.2"
25
25
  },
26
26
  "optionalDependencies": {
27
- "@doki-land/nifty-win32-x64": "0.0.9",
28
- "@doki-land/nifty-linux-x64": "0.0.9",
29
- "@doki-land/nifty-linux-arm64": "0.0.9",
30
- "@doki-land/nifty-darwin-arm64": "0.0.9",
31
- "@doki-land/nifty-darwin-x64": "0.0.9"
27
+ "@doki-land/nifty-win32-x64": "0.0.11",
28
+ "@doki-land/nifty-linux-x64": "0.0.11",
29
+ "@doki-land/nifty-linux-arm64": "0.0.11",
30
+ "@doki-land/nifty-darwin-arm64": "0.0.11",
31
+ "@doki-land/nifty-darwin-x64": "0.0.11"
32
32
  },
33
33
  "publishConfig": {
34
34
  "access": "public"
@@ -2,6 +2,7 @@ import type { Cli, ParsedOptions } from "@vmz/commander";
2
2
 
3
3
  import { loadNiftyNative } from "../native.js";
4
4
  import { authPayload } from "./authArgs.js";
5
+ import { loadConfig } from "../config/loadConfig.js";
5
6
  import { bootstrapFromOptions } from "./context.js";
6
7
  import { printPublishReport } from "./publish.js";
7
8
  import { authFromOptions, cwdFrom, flag, str, strList } from "./options.js";
@@ -22,7 +23,9 @@ export function registerPublishCommand(cli: Cli): void {
22
23
 
23
24
  export async function cmdPublish(options: ParsedOptions): Promise<number> {
24
25
  await bootstrapFromOptions(options);
26
+ const { config } = await loadConfig({ cwd: cwdFrom(options), createIfMissing: false });
25
27
  const packages = strList(options, "package");
28
+ const fromConfig = config.publish?.packages ?? [];
26
29
  const native = loadNiftyNative();
27
30
  const report = native.publisher["publish-workspace"]({
28
31
  cwd: cwdFrom(options),
@@ -31,8 +34,13 @@ export async function cmdPublish(options: ParsedOptions): Promise<number> {
31
34
  placeholder: flag(options, "placeholder"),
32
35
  tag: str(options, "tag"),
33
36
  access: str(options, "access") ?? "public",
34
- ...(packages.length === 1 ? { only: packages[0] } : {}),
35
- ...(packages.length > 1 ? { packages } : {}),
37
+ ...(packages.length === 1
38
+ ? { only: packages[0] }
39
+ : packages.length > 1
40
+ ? { packages }
41
+ : fromConfig.length > 0
42
+ ? { packages: fromConfig }
43
+ : {}),
36
44
  ...authPayload(authFromOptions(options)),
37
45
  });
38
46
  printPublishReport(report, flag(options, "dry-run"));