@doki-land/nifty 0.0.9 → 0.0.12
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 +6 -6
- package/src/cli/publish-cmd.ts +10 -2
- package/src/cli/publish.ts +3 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@doki-land/nifty",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.12",
|
|
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.
|
|
28
|
-
"@doki-land/nifty-linux-x64": "0.0.
|
|
29
|
-
"@doki-land/nifty-linux-arm64": "0.0.
|
|
30
|
-
"@doki-land/nifty-darwin-arm64": "0.0.
|
|
31
|
-
"@doki-land/nifty-darwin-x64": "0.0.
|
|
27
|
+
"@doki-land/nifty-win32-x64": "0.0.12",
|
|
28
|
+
"@doki-land/nifty-linux-x64": "0.0.12",
|
|
29
|
+
"@doki-land/nifty-linux-arm64": "0.0.12",
|
|
30
|
+
"@doki-land/nifty-darwin-arm64": "0.0.12",
|
|
31
|
+
"@doki-land/nifty-darwin-x64": "0.0.12"
|
|
32
32
|
},
|
|
33
33
|
"publishConfig": {
|
|
34
34
|
"access": "public"
|
package/src/cli/publish-cmd.ts
CHANGED
|
@@ -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
|
|
35
|
-
|
|
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"));
|
package/src/cli/publish.ts
CHANGED
|
@@ -99,7 +99,8 @@ Usage:
|
|
|
99
99
|
nifty publish --otp 123456
|
|
100
100
|
nifty publish -C <cwd>
|
|
101
101
|
|
|
102
|
-
--placeholder publishes workspace packages
|
|
103
|
-
(name claim / Trusted Publisher prep). Packages already on npm
|
|
102
|
+
--placeholder publishes publishable workspace packages (non-private) with no registry
|
|
103
|
+
version yet as 0.0.0 (name claim / Trusted Publisher prep). Packages already on npm
|
|
104
|
+
are skipped. Remove private from package.json for packages you intend to ship.
|
|
104
105
|
`);
|
|
105
106
|
}
|