-
Notifications
You must be signed in to change notification settings - Fork 1
fix: read version from package.json, add CI workflow, gitignore package-lock #14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| name: CI | ||
|
|
||
| on: | ||
| pull_request: | ||
| branches: | ||
| - main | ||
|
|
||
| jobs: | ||
| build: | ||
| runs-on: self-hosted | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
|
|
||
| - uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: '22' | ||
|
|
||
| - name: Install dependencies | ||
| working-directory: packages/cli | ||
| run: npm install | ||
|
|
||
| - name: Build | ||
| working-directory: packages/cli | ||
| run: npm run build |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,2 +1,3 @@ | ||
| node_modules/ | ||
| dist/ | ||
| packages/cli/package-lock.json | ||
| Original file line number | Diff line number | Diff line change | ||||||
|---|---|---|---|---|---|---|---|---|
|
|
@@ -9,10 +9,13 @@ import * as os from 'os'; | |||||||
|
|
||||||||
| const program = new Command(); | ||||||||
|
|
||||||||
| // eslint-disable-next-line @typescript-eslint/no-require-imports | ||||||||
| const { version } = require('../../package.json'); | ||||||||
|
Comment on lines
+12
to
+13
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The path to
Here is a suggested change that addresses both points:
Suggested change
|
||||||||
|
|
||||||||
| program | ||||||||
| .name('jules_cli') | ||||||||
| .description('Jules CLI') | ||||||||
| .version('0.1.0'); | ||||||||
| .version(version); | ||||||||
|
|
||||||||
| program | ||||||||
| .command('list') | ||||||||
|
|
||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is generally recommended to commit
package-lock.jsonfor applications, including CLI tools. This ensures reproducible builds for all developers and in CI environments by locking down the exact versions of all dependencies.Ignoring the lock file can lead to different developers or environments using different dependency versions, which may introduce hard-to-debug issues. For a CLI tool, which is an application, committing the lock file is standard practice. I would recommend removing this line and committing the
package-lock.jsonfile to ensure dependency consistency.