prjct-cli 1.7.4 → 1.7.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/CHANGELOG.md +35 -0
- package/core/integrations/linear/client.ts +3 -2
- package/dist/bin/prjct.mjs +4 -6
- package/package.json +2 -4
- package/scripts/build.js +0 -169
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,40 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [1.7.5] - 2026-02-07
|
|
4
|
+
|
|
5
|
+
### Refactoring
|
|
6
|
+
|
|
7
|
+
- remove unused deps and lazy-load @linear/sdk (PRJ-291) (#144)
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
## [1.7.5] - 2026-02-07
|
|
11
|
+
|
|
12
|
+
### Changed
|
|
13
|
+
- **Remove unused dependencies and lazy-load heavy optional ones (PRJ-291)**: Removed `lightningcss` (completely unused), moved `esbuild` to devDependencies (build-time only), lazy-loaded `@linear/sdk` via dynamic `import()` so it only loads when Linear commands are invoked.
|
|
14
|
+
|
|
15
|
+
### Implementation Details
|
|
16
|
+
- Removed `lightningcss` from dependencies (zero imports in codebase)
|
|
17
|
+
- Moved `esbuild` from dependencies to devDependencies (only used in `scripts/build.js`)
|
|
18
|
+
- Changed `import { LinearClient } from '@linear/sdk'` to `import type` + dynamic `await import('@linear/sdk')` in `core/integrations/linear/client.ts`
|
|
19
|
+
- Excluded test files from published package via `.npmignore`
|
|
20
|
+
- Removed `scripts/build.js` from `files` field (dist/ ships pre-built)
|
|
21
|
+
|
|
22
|
+
### Learnings
|
|
23
|
+
- `import type` + dynamic `await import()` pattern preserves full type safety while deferring module load to runtime. Type imports are erased at compile time with zero cost.
|
|
24
|
+
|
|
25
|
+
### Test Plan
|
|
26
|
+
|
|
27
|
+
#### For QA
|
|
28
|
+
1. Run `bun test` — 538 tests pass, no regressions
|
|
29
|
+
2. Run `bun run build` — compiles without errors
|
|
30
|
+
3. Run `bun run typecheck` — zero type errors
|
|
31
|
+
4. Run `prjct status` and `prjct linear list` — CLI works normally
|
|
32
|
+
|
|
33
|
+
#### For Users
|
|
34
|
+
**What changed:** Faster install (~75MB fewer dependencies), faster CLI startup (Linear SDK only loaded on demand).
|
|
35
|
+
**How to use:** No changes needed.
|
|
36
|
+
**Breaking changes:** None
|
|
37
|
+
|
|
3
38
|
## [1.7.4] - 2026-02-07
|
|
4
39
|
|
|
5
40
|
### Bug Fixes
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Implements IssueTrackerProvider for Linear using @linear/sdk
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
import { LinearClient as LinearSDK } from '@linear/sdk'
|
|
6
|
+
import type { LinearClient as LinearSDK } from '@linear/sdk'
|
|
7
7
|
import { getErrorMessage } from '../../types/fs'
|
|
8
8
|
import { getCredential } from '../../utils/keychain'
|
|
9
9
|
import type {
|
|
@@ -78,7 +78,8 @@ export class LinearProvider implements IssueTrackerProvider {
|
|
|
78
78
|
throw new Error('LINEAR_API_KEY not configured. Run `p. linear setup` to configure.')
|
|
79
79
|
}
|
|
80
80
|
|
|
81
|
-
|
|
81
|
+
const { LinearClient } = await import('@linear/sdk')
|
|
82
|
+
this.sdk = new LinearClient({ apiKey })
|
|
82
83
|
|
|
83
84
|
// Verify connection silently (no output noise)
|
|
84
85
|
try {
|
package/dist/bin/prjct.mjs
CHANGED
|
@@ -27790,7 +27790,6 @@ var init_keychain = __esm({
|
|
|
27790
27790
|
});
|
|
27791
27791
|
|
|
27792
27792
|
// core/integrations/linear/client.ts
|
|
27793
|
-
import { LinearClient as LinearSDK } from "@linear/sdk";
|
|
27794
27793
|
var LINEAR_STATUS_MAP, LINEAR_PRIORITY_MAP, PRIORITY_TO_LINEAR, LinearProvider, linearProvider;
|
|
27795
27794
|
var init_client = __esm({
|
|
27796
27795
|
"core/integrations/linear/client.ts"() {
|
|
@@ -27843,7 +27842,8 @@ var init_client = __esm({
|
|
|
27843
27842
|
if (!apiKey) {
|
|
27844
27843
|
throw new Error("LINEAR_API_KEY not configured. Run `p. linear setup` to configure.");
|
|
27845
27844
|
}
|
|
27846
|
-
|
|
27845
|
+
const { LinearClient } = await import("@linear/sdk");
|
|
27846
|
+
this.sdk = new LinearClient({ apiKey });
|
|
27847
27847
|
try {
|
|
27848
27848
|
await this.sdk.viewer;
|
|
27849
27849
|
} catch (error) {
|
|
@@ -29142,7 +29142,7 @@ var require_package = __commonJS({
|
|
|
29142
29142
|
"package.json"(exports, module) {
|
|
29143
29143
|
module.exports = {
|
|
29144
29144
|
name: "prjct-cli",
|
|
29145
|
-
version: "1.7.
|
|
29145
|
+
version: "1.7.5",
|
|
29146
29146
|
description: "Context layer for AI agents. Project context for Claude Code, Gemini CLI, and more.",
|
|
29147
29147
|
main: "core/index.ts",
|
|
29148
29148
|
bin: {
|
|
@@ -29198,11 +29198,9 @@ var require_package = __commonJS({
|
|
|
29198
29198
|
chalk: "^4.1.2",
|
|
29199
29199
|
chokidar: "^5.0.0",
|
|
29200
29200
|
"date-fns": "^4.1.0",
|
|
29201
|
-
esbuild: "^0.25.0",
|
|
29202
29201
|
glob: "^13.0.1",
|
|
29203
29202
|
hono: "^4.11.3",
|
|
29204
29203
|
"jsonc-parser": "^3.3.1",
|
|
29205
|
-
lightningcss: "^1.30.2",
|
|
29206
29204
|
prompts: "^2.4.2",
|
|
29207
29205
|
zod: "^3.24.1"
|
|
29208
29206
|
},
|
|
@@ -29211,6 +29209,7 @@ var require_package = __commonJS({
|
|
|
29211
29209
|
"@types/bun": "latest",
|
|
29212
29210
|
"@types/chokidar": "^2.1.7",
|
|
29213
29211
|
"@types/prompts": "^2.4.9",
|
|
29212
|
+
esbuild: "^0.25.0",
|
|
29214
29213
|
lefthook: "^2.1.0",
|
|
29215
29214
|
typescript: "^5.9.3"
|
|
29216
29215
|
},
|
|
@@ -29234,7 +29233,6 @@ var require_package = __commonJS({
|
|
|
29234
29233
|
"dist/",
|
|
29235
29234
|
"templates/",
|
|
29236
29235
|
"scripts/postinstall.js",
|
|
29237
|
-
"scripts/build.js",
|
|
29238
29236
|
"scripts/install.sh",
|
|
29239
29237
|
"LICENSE",
|
|
29240
29238
|
"README.md",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "prjct-cli",
|
|
3
|
-
"version": "1.7.
|
|
3
|
+
"version": "1.7.5",
|
|
4
4
|
"description": "Context layer for AI agents. Project context for Claude Code, Gemini CLI, and more.",
|
|
5
5
|
"main": "core/index.ts",
|
|
6
6
|
"bin": {
|
|
@@ -56,11 +56,9 @@
|
|
|
56
56
|
"chalk": "^4.1.2",
|
|
57
57
|
"chokidar": "^5.0.0",
|
|
58
58
|
"date-fns": "^4.1.0",
|
|
59
|
-
"esbuild": "^0.25.0",
|
|
60
59
|
"glob": "^13.0.1",
|
|
61
60
|
"hono": "^4.11.3",
|
|
62
61
|
"jsonc-parser": "^3.3.1",
|
|
63
|
-
"lightningcss": "^1.30.2",
|
|
64
62
|
"prompts": "^2.4.2",
|
|
65
63
|
"zod": "^3.24.1"
|
|
66
64
|
},
|
|
@@ -69,6 +67,7 @@
|
|
|
69
67
|
"@types/bun": "latest",
|
|
70
68
|
"@types/chokidar": "^2.1.7",
|
|
71
69
|
"@types/prompts": "^2.4.9",
|
|
70
|
+
"esbuild": "^0.25.0",
|
|
72
71
|
"lefthook": "^2.1.0",
|
|
73
72
|
"typescript": "^5.9.3"
|
|
74
73
|
},
|
|
@@ -92,7 +91,6 @@
|
|
|
92
91
|
"dist/",
|
|
93
92
|
"templates/",
|
|
94
93
|
"scripts/postinstall.js",
|
|
95
|
-
"scripts/build.js",
|
|
96
94
|
"scripts/install.sh",
|
|
97
95
|
"LICENSE",
|
|
98
96
|
"README.md",
|
package/scripts/build.js
DELETED
|
@@ -1,169 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Build Script for prjct-cli
|
|
5
|
-
*
|
|
6
|
-
* Compiles TypeScript to JavaScript for Node.js compatibility.
|
|
7
|
-
* Builds:
|
|
8
|
-
* - bin/prjct.mjs (CLI entry point)
|
|
9
|
-
* - core/infrastructure/setup.js (postinstall needs this)
|
|
10
|
-
* - core/infrastructure/command-installer.js
|
|
11
|
-
* - core/infrastructure/editors-config.js
|
|
12
|
-
* - core/utils/version.js
|
|
13
|
-
*
|
|
14
|
-
* @version 2.0.0
|
|
15
|
-
*/
|
|
16
|
-
|
|
17
|
-
const { execSync } = require('node:child_process')
|
|
18
|
-
const fs = require('node:fs')
|
|
19
|
-
const path = require('node:path')
|
|
20
|
-
|
|
21
|
-
const ROOT = path.resolve(__dirname, '..')
|
|
22
|
-
const DIST = path.join(ROOT, 'dist')
|
|
23
|
-
|
|
24
|
-
/**
|
|
25
|
-
* Ensure esbuild is available
|
|
26
|
-
*/
|
|
27
|
-
function ensureEsbuild() {
|
|
28
|
-
try {
|
|
29
|
-
require.resolve('esbuild')
|
|
30
|
-
return true
|
|
31
|
-
} catch {
|
|
32
|
-
console.log('Installing esbuild...')
|
|
33
|
-
try {
|
|
34
|
-
execSync('npm install esbuild --save-dev', { cwd: ROOT, stdio: 'inherit' })
|
|
35
|
-
return true
|
|
36
|
-
} catch (error) {
|
|
37
|
-
console.error('Failed to install esbuild:', error.message)
|
|
38
|
-
return false
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
/**
|
|
44
|
-
* Clean and create dist directory
|
|
45
|
-
*/
|
|
46
|
-
function clean() {
|
|
47
|
-
if (fs.existsSync(DIST)) {
|
|
48
|
-
fs.rmSync(DIST, { recursive: true })
|
|
49
|
-
}
|
|
50
|
-
fs.mkdirSync(DIST, { recursive: true })
|
|
51
|
-
fs.mkdirSync(path.join(DIST, 'bin'), { recursive: true })
|
|
52
|
-
fs.mkdirSync(path.join(DIST, 'core', 'infrastructure'), { recursive: true })
|
|
53
|
-
fs.mkdirSync(path.join(DIST, 'core', 'utils'), { recursive: true })
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
/**
|
|
57
|
-
* Build all modules
|
|
58
|
-
*/
|
|
59
|
-
async function build() {
|
|
60
|
-
const esbuild = require('esbuild')
|
|
61
|
-
|
|
62
|
-
console.log('Building for Node.js...\n')
|
|
63
|
-
|
|
64
|
-
// 1. CLI entry point (ESM)
|
|
65
|
-
console.log(' → bin/prjct.mjs')
|
|
66
|
-
await esbuild.build({
|
|
67
|
-
entryPoints: [path.join(ROOT, 'bin/prjct.ts')],
|
|
68
|
-
outfile: path.join(DIST, 'bin', 'prjct.mjs'),
|
|
69
|
-
bundle: true,
|
|
70
|
-
platform: 'node',
|
|
71
|
-
target: 'node18',
|
|
72
|
-
format: 'esm',
|
|
73
|
-
sourcemap: false,
|
|
74
|
-
minify: false,
|
|
75
|
-
keepNames: true,
|
|
76
|
-
packages: 'external',
|
|
77
|
-
banner: {
|
|
78
|
-
js: `#!/usr/bin/env node
|
|
79
|
-
import { fileURLToPath as __fileURLToPath } from 'url';
|
|
80
|
-
import { dirname as __pathDirname } from 'path';
|
|
81
|
-
const __filename = __fileURLToPath(import.meta.url);
|
|
82
|
-
const __dirname = __pathDirname(__filename);`,
|
|
83
|
-
},
|
|
84
|
-
})
|
|
85
|
-
fs.chmodSync(path.join(DIST, 'bin', 'prjct.mjs'), 0o755)
|
|
86
|
-
|
|
87
|
-
// 2. Setup module (CJS - for postinstall)
|
|
88
|
-
console.log(' → core/infrastructure/setup.js')
|
|
89
|
-
await esbuild.build({
|
|
90
|
-
entryPoints: [path.join(ROOT, 'core/infrastructure/setup.ts')],
|
|
91
|
-
outfile: path.join(DIST, 'core', 'infrastructure', 'setup.js'),
|
|
92
|
-
bundle: true,
|
|
93
|
-
platform: 'node',
|
|
94
|
-
target: 'node18',
|
|
95
|
-
format: 'cjs',
|
|
96
|
-
sourcemap: false,
|
|
97
|
-
minify: false,
|
|
98
|
-
keepNames: true,
|
|
99
|
-
packages: 'external',
|
|
100
|
-
})
|
|
101
|
-
|
|
102
|
-
// 3. Command installer (CJS)
|
|
103
|
-
console.log(' → core/infrastructure/command-installer.js')
|
|
104
|
-
await esbuild.build({
|
|
105
|
-
entryPoints: [path.join(ROOT, 'core/infrastructure/command-installer.ts')],
|
|
106
|
-
outfile: path.join(DIST, 'core', 'infrastructure', 'command-installer.js'),
|
|
107
|
-
bundle: true,
|
|
108
|
-
platform: 'node',
|
|
109
|
-
target: 'node18',
|
|
110
|
-
format: 'cjs',
|
|
111
|
-
sourcemap: false,
|
|
112
|
-
minify: false,
|
|
113
|
-
keepNames: true,
|
|
114
|
-
packages: 'external',
|
|
115
|
-
})
|
|
116
|
-
|
|
117
|
-
// 4. Editors config (CJS)
|
|
118
|
-
console.log(' → core/infrastructure/editors-config.js')
|
|
119
|
-
await esbuild.build({
|
|
120
|
-
entryPoints: [path.join(ROOT, 'core/infrastructure/editors-config.ts')],
|
|
121
|
-
outfile: path.join(DIST, 'core', 'infrastructure', 'editors-config.js'),
|
|
122
|
-
bundle: true,
|
|
123
|
-
platform: 'node',
|
|
124
|
-
target: 'node18',
|
|
125
|
-
format: 'cjs',
|
|
126
|
-
sourcemap: false,
|
|
127
|
-
minify: false,
|
|
128
|
-
keepNames: true,
|
|
129
|
-
packages: 'external',
|
|
130
|
-
})
|
|
131
|
-
|
|
132
|
-
// 5. Version util (CJS)
|
|
133
|
-
console.log(' → core/utils/version.js')
|
|
134
|
-
await esbuild.build({
|
|
135
|
-
entryPoints: [path.join(ROOT, 'core/utils/version.ts')],
|
|
136
|
-
outfile: path.join(DIST, 'core', 'utils', 'version.js'),
|
|
137
|
-
bundle: true,
|
|
138
|
-
platform: 'node',
|
|
139
|
-
target: 'node18',
|
|
140
|
-
format: 'cjs',
|
|
141
|
-
sourcemap: false,
|
|
142
|
-
minify: false,
|
|
143
|
-
keepNames: true,
|
|
144
|
-
packages: 'external',
|
|
145
|
-
})
|
|
146
|
-
|
|
147
|
-
console.log('\nBuild complete!')
|
|
148
|
-
console.log(`Output: ${DIST}/`)
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
/**
|
|
152
|
-
* Main
|
|
153
|
-
*/
|
|
154
|
-
async function main() {
|
|
155
|
-
console.log('prjct-cli build script')
|
|
156
|
-
console.log('======================\n')
|
|
157
|
-
|
|
158
|
-
if (!ensureEsbuild()) {
|
|
159
|
-
process.exit(1)
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
clean()
|
|
163
|
-
await build()
|
|
164
|
-
}
|
|
165
|
-
|
|
166
|
-
main().catch((error) => {
|
|
167
|
-
console.error('Build failed:', error)
|
|
168
|
-
process.exit(1)
|
|
169
|
-
})
|