@alxwlw/stack 1.4.2 → 1.6.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.
@@ -10,9 +10,9 @@
10
10
  "dependency-cruiser": "18.5.0",
11
11
  "vitest": "4.1.11",
12
12
  "@playwright/test": "1.64.0",
13
- "@alxwlw/stack": "1.4.2",
14
- "@alxwlw/oxlint-config": "1.4.2",
15
- "@alxwlw/tsconfig": "1.4.2"
13
+ "@alxwlw/stack": "1.6.0",
14
+ "@alxwlw/oxlint-config": "1.6.0",
15
+ "@alxwlw/tsconfig": "1.6.0"
16
16
  },
17
17
  "libs": {
18
18
  "@nestjs/core": "12.1.2",
@@ -1,4 +1,4 @@
1
- # gitleaks config — canon ruleset. Runs in pre-commit + CI.
1
+ # gitleaks config — canon ruleset. Run it in CI (the stack-check reusable workflow with `gitleaks: true`, or a `gitleaks git` job) or locally.
2
2
  # Reference: https://github.com/gitleaks/gitleaks/blob/master/config/gitleaks.toml
3
3
 
4
4
  # Inherit the default ruleset (catches AWS keys, JWTs, GH tokens,
@@ -12,7 +12,7 @@ id = 'eth-private-key-no-prefix'
12
12
  description = 'Ethereum private key (32 bytes hex, with or without 0x prefix)'
13
13
  regex = '''(?i)(?:eth_?priv|private_?key)\s*[:=]\s*["']?(?:0x)?[a-f0-9]{64}["']?'''
14
14
  tags = ['secret', 'ethereum']
15
- keywords = ['privkey', 'private_key', 'privatekey']
15
+ keywords = ['privkey', 'private_key', 'privatekey', 'eth_priv', 'ethpriv']
16
16
 
17
17
  [allowlist]
18
18
  description = 'Global false-positive filters.'
@@ -44,6 +44,7 @@ paths = [
44
44
  # Historical planning docs — false-positive regex matches in prose
45
45
  # and curl examples. Skip the spec/plan/archive trees.
46
46
  '''docs/(specs|plans|archive)/''',
47
+ '''docs/superpowers/(specs|plans|archive)/''',
47
48
  '''\.superpowers/''',
48
49
  '''docs/ideas/''',
49
50
  '''docs/draft/''',
@@ -4,10 +4,10 @@
4
4
  // has no ignore file by default, so the `gitignore` option below points it there.
5
5
  //
6
6
  // Scope: **semantic** markdown linting only. Formatting (line wrap,
7
- // list marker style, trailing whitespace, etc.) is handled by oxfmt
8
- // via the existing `.moon/tasks/oxfmt.yml` **/*.{md,mdx,yml,yaml,json}
9
- // glob. Rules that overlap with the formatter are disabled here to avoid
10
- // fighting between the two tools.
7
+ // list marker style, trailing whitespace, etc.) is oxfmt's job — the
8
+ // `format` task of the `moon-tasks` group (`.moon/tasks/oxfmt.yml`) or your
9
+ // own oxfmt run. Rules that overlap with the formatter are disabled here to
10
+ // avoid fighting between the two tools.
11
11
  //
12
12
  // Enabled checks target bugs that a formatter can't catch:
13
13
  // - broken heading hierarchy
@@ -1,17 +1,20 @@
1
1
  $schema: 'https://moonrepo.dev/schemas/tasks.json'
2
2
 
3
- # Canon template (seeded once via --with=moon-tasks; repo-owned afterwards).
4
- # NB moon 2.x: a project OVERRIDING this command must set options.mergeArgs:
5
- # 'replace' — otherwise moon APPENDS the inherited args (`bun test` + override
6
- # `bun test src` → `bun test bun test src`).
3
+ # Canon file — sync-managed (group moon-tasks): edits happen in alxwlw/stack, not here.
4
+ # A project without tests overrides `args` with mergeArgs: 'replace' (e.g. bun test --pass-with-no-tests).
5
+
6
+ fileGroups:
7
+ sources:
8
+ - 'src/**/*'
9
+ tests:
10
+ - 'tests/**/*'
7
11
 
8
12
  tasks:
9
13
  test:
10
- command: 'bun test'
14
+ command: 'bun'
15
+ args: ['test']
11
16
  inputs:
12
- - 'src/**/*'
13
- - 'test/**/*'
14
- - 'package.json'
15
- - 'tsconfig.json'
17
+ - '@group(sources)'
18
+ - '@group(tests)'
16
19
  options:
17
- cache: true
20
+ runFromWorkspaceRoot: false
@@ -1,14 +1,25 @@
1
1
  $schema: 'https://moonrepo.dev/schemas/tasks.json'
2
2
 
3
- # Canon template (seeded once via --with=moon-tasks; repo-owned afterwards).
4
- # oxfmt 0.68.0 reads .prettierignore natively — no --ignore-path flag needed.
3
+ # Canon file — sync-managed (group moon-tasks): edits happen in alxwlw/stack, not here.
4
+ # oxfmt reads .prettierignore natively — no --ignore-path flag needed.
5
+
6
+ fileGroups:
7
+ sources:
8
+ - 'src/**/*'
9
+ tests:
10
+ - 'tests/**/*'
11
+ configs:
12
+ - '*.{json,yml,yaml,mjs,cjs,ts}'
5
13
 
6
14
  tasks:
7
15
  format:
8
- command: 'oxfmt --check .'
16
+ command: 'bun'
17
+ args: ['run', '--bun', 'oxfmt', '--check', '.']
9
18
  inputs:
10
- - '**/*.{ts,tsx,js,jsx,mts,json,md,yml,yaml}'
11
- - '/.prettierignore'
19
+ - '@group(sources)'
20
+ - '@group(tests)'
21
+ - '@group(configs)'
12
22
  - '/.oxfmtrc.jsonc'
23
+ - '/.prettierignore'
13
24
  options:
14
- cache: true
25
+ runFromWorkspaceRoot: false
@@ -1,34 +1,32 @@
1
1
  $schema: 'https://moonrepo.dev/schemas/tasks.json'
2
2
 
3
- # Canon template (seeded once via --with=moon-tasks; repo-owned afterwards).
3
+ # Canon file — sync-managed (group moon-tasks): edits happen in alxwlw/stack, not here.
4
4
  # Pair with @alxwlw/oxlint-config presets in the repo root .oxlintrc.json.
5
5
 
6
+ fileGroups:
7
+ sources:
8
+ - 'src/**/*'
9
+
6
10
  tasks:
7
- # Non-mutating check — what CI runs (`moon ci :lint`). `--type-aware` is
8
- # LOAD-BEARING: without it every typescript/* type-aware rule is SILENTLY
9
- # skipped (no error, no warning).
10
11
  lint:
11
- command: 'oxlint --type-aware --report-unused-disable-directives --config
12
- $workspaceRoot/.oxlintrc.json .'
13
- # Type-aware lint needs the project-reference `.d.ts`: unresolved imports
14
- # produce `error`-typed values and the no-unsafe-* rules fire phantom hits.
15
- deps:
16
- - '~:typecheck'
17
- inputs:
18
- - 'src/**/*.{ts,tsx,mts,cts}'
19
- - '/.oxlintrc.json'
20
- options:
21
- cache: true
22
- # Mutating auto-fix — local only (pre-commit hook). NEVER --fix-suggestions in
23
- # automation: tsgolint's require-await "suggestion" rewrites public signatures.
24
- lint-fix:
25
- command: 'oxlint --type-aware --report-unused-disable-directives --fix --config
26
- $workspaceRoot/.oxlintrc.json .'
27
- deps:
28
- - '~:typecheck'
12
+ command: 'bun'
13
+ # --type-aware is LOAD-BEARING: without it every typescript/* type-aware rule is
14
+ # silently skipped (no error, no warning).
15
+ args:
16
+ [
17
+ 'run',
18
+ '--bun',
19
+ 'oxlint',
20
+ '--type-aware',
21
+ '--deny-warnings',
22
+ '--report-unused-disable-directives',
23
+ 'src',
24
+ ]
29
25
  inputs:
30
- - 'src/**/*.{ts,tsx,mts,cts}'
26
+ - '@group(sources)'
27
+ - 'tsconfig.json'
28
+ - '/tsconfig.options.json'
29
+ - '/pnpm-lock.yaml'
31
30
  - '/.oxlintrc.json'
32
31
  options:
33
- cache: false
34
- runInCI: false
32
+ runFromWorkspaceRoot: false
@@ -1,32 +1,29 @@
1
1
  $schema: 'https://moonrepo.dev/schemas/tasks.json'
2
2
 
3
- # Canon template (seeded once by `stack sync --with=moon-tasks`; repo-owned
4
- # afterwards). Pair with @alxwlw/tsconfig/refs|nest presets. Encodes moon 2.x
5
- # footguns paid for in production — keep the comments.
3
+ # Canon file — sync-managed (group moon-tasks): edits happen in alxwlw/stack, not here.
4
+ # Bun is the runtime; pnpm only manages dependencies. A project overriding a task's args
5
+ # sets options.mergeArgs: 'replace' — moon 2.x APPENDS inherited args otherwise.
6
+ # typecheck runs `tsc --noEmit`: projects with `references` (the @alxwlw/tsconfig refs/nest presets)
7
+ # need their references built first — override args with `tsc --build` (mergeArgs: 'replace') or
8
+ # hand-roll the task.
6
9
 
7
10
  fileGroups:
8
11
  sources:
9
12
  - 'src/**/*'
13
+ tests:
14
+ - 'tests/**/*'
10
15
 
11
16
  tasks:
12
17
  typecheck:
13
- command: 'tsc --build'
14
- # Build dependency projects' declarations first, so a project's referenced
15
- # `.tsbuild/*.d.ts` already exist when its own `tsc --build` runs.
16
- deps:
17
- - '^:typecheck'
18
+ command: 'bun'
19
+ # Explicit root compiler: a project-local `typescript` bin (an alias to an older TS, say)
20
+ # would shadow TS 7 in that project's node_modules/.bin.
21
+ args: ['run', '--bun', '$workspaceRoot/node_modules/typescript/bin/tsc', '--noEmit']
18
22
  inputs:
19
- - '@globs(sources)'
23
+ - '@group(sources)'
24
+ - '@group(tests)'
20
25
  - 'tsconfig.json'
21
26
  - '/tsconfig.options.json'
22
- outputs:
23
- - '.tsbuild'
27
+ - '/pnpm-lock.yaml'
24
28
  options:
25
- # `tsc --build` is incremental: an up-to-date project emits nothing, which
26
- # trips moon's "outputs declared but none created" check. cache stays off
27
- # so the build always runs in `^:typecheck` order.
28
- cache: false
29
- # Serialize every `tsc --build` across the run: sibling leaf projects each
30
- # rebuild their TRANSITIVE references, and two processes writing the same
31
- # shared `.tsbuild/*.d.ts` race → intermittent TS6305 on fresh checkouts.
32
- mutex: 'tsc-solution-build'
29
+ runFromWorkspaceRoot: false
@@ -90,28 +90,24 @@
90
90
  "src": "files/moon-tasks/typescript.yml",
91
91
  "dest": ".moon/tasks/typescript.yml",
92
92
  "appliesTo": ["node", "contracts"],
93
- "strategy": "create-if-absent",
94
93
  "group": "moon-tasks"
95
94
  },
96
95
  {
97
96
  "src": "files/moon-tasks/oxlint.yml",
98
97
  "dest": ".moon/tasks/oxlint.yml",
99
98
  "appliesTo": ["node", "contracts"],
100
- "strategy": "create-if-absent",
101
99
  "group": "moon-tasks"
102
100
  },
103
101
  {
104
102
  "src": "files/moon-tasks/oxfmt.yml",
105
103
  "dest": ".moon/tasks/oxfmt.yml",
106
104
  "appliesTo": ["node", "contracts"],
107
- "strategy": "create-if-absent",
108
105
  "group": "moon-tasks"
109
106
  },
110
107
  {
111
108
  "src": "files/moon-tasks/bun-test.yml",
112
109
  "dest": ".moon/tasks/bun-test.yml",
113
110
  "appliesTo": ["node", "contracts"],
114
- "strategy": "create-if-absent",
115
111
  "group": "moon-tasks"
116
112
  },
117
113
  {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alxwlw/stack",
3
- "version": "1.4.2",
3
+ "version": "1.6.0",
4
4
  "license": "MIT",
5
5
  "repository": {
6
6
  "type": "git",