auklet 0.0.29 → 0.1.0

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/README.md CHANGED
@@ -126,6 +126,7 @@ auk publish
126
126
  auk publish --filter @scope/ui
127
127
  auk publish --version patch --dry-run
128
128
  auk publish --no-format
129
+ auk publish --no-git
129
130
  auk publish --otp 123456
130
131
  auk owner add alice
131
132
  auk owner add alice --filter @scope/ui --otp 123456
@@ -148,6 +149,8 @@ auk owner add <user...>
148
149
 
149
150
  `--no-format` disables auklet's publish output formatter for that run. It is not
150
151
  configured in `package.json`.
152
+ `--no-git` skips auklet's release commit and tag for that run. The publish flow
153
+ still checks that the git worktree is clean unless `--allow-dirty` is also set.
151
154
  Before writing versions, auklet checks npm authentication from each target
152
155
  package directory. Package-local `.npmrc` files and
153
156
  `package.json#publishConfig.registry` are respected.
@@ -430,4 +433,4 @@ Notes:
430
433
 
431
434
  - `pnpm build` rewrites `dist`.
432
435
  - `pnpm run format` formats `bin`, `src`, `dist`, `examples`, and related files.
433
- - Read `TESTING.md` before changing tests.
436
+ - Read `docs/testing.md` before changing tests.
@@ -9,6 +9,7 @@ const publishFlags = new Set([
9
9
  'version',
10
10
  'dry-run',
11
11
  'format',
12
+ 'git',
12
13
  'otp',
13
14
  'ignore-scripts',
14
15
  'allow-dirty',
@@ -16,11 +17,12 @@ const publishFlags = new Set([
16
17
  const ownerFlags = new Set(['_', 'filter', 'package', 'otp']);
17
18
  export async function runPublishCli(args) {
18
19
  const cliArgs = stripLeadingArgsSeparator(args);
19
- validateNoPrefixedFlags(cliArgs, new Set(['--no-format']));
20
+ validateNoPrefixedFlags(cliArgs, new Set(['--no-format', '--no-git']));
20
21
  const argv = minimist(cliArgs, {
21
22
  string: ['filter', 'version', 'otp'],
22
- boolean: ['dry-run', 'format', 'ignore-scripts', 'allow-dirty'],
23
+ boolean: ['dry-run', 'format', 'git', 'ignore-scripts', 'allow-dirty'],
23
24
  default: {
25
+ git: true,
24
26
  format: true,
25
27
  },
26
28
  });
@@ -31,11 +33,12 @@ export async function runPublishCli(args) {
31
33
  await ensurePnpm();
32
34
  await new PublishRunner({
33
35
  cwd: process.cwd(),
36
+ otp: stringOption(argv.otp),
34
37
  filters: toArray(argv.filter),
35
38
  version: stringOption(argv.version),
36
- dryRun: argv['dry-run'] === true,
39
+ git: argv.git !== false,
37
40
  format: argv.format !== false,
38
- otp: stringOption(argv.otp),
41
+ dryRun: argv['dry-run'] === true,
39
42
  allowDirty: argv['allow-dirty'] === true,
40
43
  ignoreScripts: argv['ignore-scripts'] === true,
41
44
  }).run();
@@ -18,6 +18,10 @@ export class ReleaseGitController {
18
18
  }
19
19
  async commitAndTag(plan) {
20
20
  const git = await isGitRepository(plan.root);
21
+ if (git && this.options.git === false) {
22
+ this.warnOnce('--no-git enabled, skipping git commit and tag.');
23
+ return;
24
+ }
21
25
  if (git && this.options.allowDirty) {
22
26
  this.warnOnce('--allow-dirty enabled, skipping git commit and tag.');
23
27
  return;
@@ -43,13 +43,14 @@ export type WorkspacePackage = {
43
43
  };
44
44
  export type PublishOptions = {
45
45
  cwd: string;
46
- filters: Array<string>;
47
- version?: string;
48
46
  dryRun: boolean;
49
47
  format: boolean;
50
- otp?: string;
51
- ignoreScripts: boolean;
52
48
  allowDirty: boolean;
49
+ ignoreScripts: boolean;
50
+ filters: Array<string>;
51
+ git?: boolean;
52
+ otp?: string;
53
+ version?: string;
53
54
  };
54
55
  export type OwnerOptions = {
55
56
  cwd: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "auklet",
3
- "version": "0.0.29",
3
+ "version": "0.1.0",
4
4
  "type": "module",
5
5
  "author": "chentao.arthur",
6
6
  "description": "Build utilities for TypeScript packages and module CSS output.",
@@ -99,7 +99,7 @@
99
99
  "dev:registry-login": "npm adduser --registry http://127.0.0.1:4873 --auth-type=legacy",
100
100
  "dev:examples": "pnpm --filter './examples/*' --if-present dev",
101
101
  "build:examples": "pnpm --filter './examples/*' build",
102
- "format:md": "prettier --write \"*.md\" \"examples/**/*.md\"",
103
- "format": "prettier --write \"package.json\" \"pnpm-workspace.yaml\" \"(bin|src|dist|examples)/**/*.{js,mjs,cjs,ts,tsx,json,md,yaml,css}\""
102
+ "format:md": "prettier --write \"*.md\" \"docs/**/*.md\" \"examples/**/*.md\"",
103
+ "format": "prettier --write \"package.json\" \"pnpm-workspace.yaml\" \"*.md\" \"docs/**/*.md\" \"(bin|src|dist|examples)/**/*.{js,mjs,cjs,ts,tsx,json,md,yaml,css}\""
104
104
  }
105
105
  }