-
Notifications
You must be signed in to change notification settings - Fork 6
Add CI checks for common workspace #12
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
Open
duck-master
wants to merge
23
commits into
sipec:main
Choose a base branch
from
duck-master:add-common-ci-checks
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
777a0c7
run prettier
duck-master 31b1684
run npm init @eslint/config
duck-master b9a430e
explicitly add eslint config
duck-master 2c51cb3
rewrite jest.config.js to use import-style dependencies
duck-master 61ac83c
disable @typescript-eslint/no-explicit-any for now
duck-master 65d91e0
change _apiTypeCheck to a type declaration and remove underscore in s…
duck-master d112dce
remove parameter name from ws.onopen
duck-master ef85bdb
move jest.config.js to jest.config.mjs; run prettier again
duck-master 909edf0
Revert "move jest.config.js to jest.config.mjs; run prettier again"
duck-master 2eddb73
use resolveJsonModules in tsconfig.json; run prettier a third time
duck-master 4dd1ce0
sidestep json altogether with tsconfig.js
duck-master 0c5df93
explicitly add tsconfig.js
duck-master 4eed39c
disable @typescript-eslint/no-unused-expressions
duck-master f749619
remove another require-style import; set esModuleInterop to true
duck-master 289eea1
remove unused variables
duck-master bad5851
make is-prod.ts import a default import
duck-master f9fac4f
limit while loop for binary search
duck-master 4a1ad60
remove ts-ignore
duck-master 00a6aee
fix type error by stringifying path in src/util/api.ts
duck-master bafcbc6
run prettier
duck-master 5036ebd
introduce ci-common.yml
duck-master f876cb1
undo changes to yarn.lock
duck-master 04df078
fix tsc command in CI, binarysearch iteration loop bound
duck-master File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,66 @@ | ||
| name: CI checks for common workspace | ||
|
|
||
| on: | ||
| pull_request: | ||
| branches: ['main'] | ||
| paths: ['common/**/*', '!**/*.{txt,md}'] | ||
| push: | ||
| branches: ['main'] | ||
| paths: ['common/**/*', '!**/*.{txt,md}'] | ||
|
|
||
| defaults: | ||
| run: | ||
| working-directory: 'common' | ||
| jobs: | ||
| test: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - uses: actions/setup-node@v4 | ||
| with: | ||
| cache: 'yarn' | ||
| - name: Install yarn | ||
| run: npm install -g yarn | ||
| - name: Install dependencies | ||
| run: yarn | ||
| - name: Run tests | ||
| run: yarn test | ||
| eslint: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - uses: actions/setup-node@v4 | ||
| with: | ||
| cache: 'yarn' | ||
| - name: Install yarn | ||
| run: npm install -g yarn | ||
| - name: Install dependencies | ||
| run: yarn | ||
| - name: Run ESLint | ||
| run: yarn eslint . | ||
| prettier: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - uses: actions/setup-node@v4 | ||
| with: | ||
| cache: 'yarn' | ||
| - name: Install yarn | ||
| run: npm install -g yarn | ||
| - name: Install dependencies | ||
| run: yarn | ||
| - name: Run Prettier | ||
| run: yarn prettier . --check --ignore-unknown | ||
| typecheck: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - uses: actions/setup-node@v4 | ||
| with: | ||
| cache: 'yarn' | ||
| - name: Install yarn | ||
| run: npm install -g yarn | ||
| - name: Install dependencies | ||
| run: yarn | ||
| - name: Run tsc to check types | ||
| run: yarn tsc --noEmit --strict |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| import globals from 'globals' | ||
| import pluginJs from '@eslint/js' | ||
| import tseslint from 'typescript-eslint' | ||
|
|
||
| /** @type {import('eslint').Linter.Config[]} */ | ||
| export default [ | ||
| { files: ['**/*.{js,mjs,cjs,ts}'] }, | ||
| { languageOptions: { globals: { ...globals.browser, ...globals.node } } }, | ||
| pluginJs.configs.recommended, | ||
| ...tseslint.configs.recommended, | ||
| { | ||
| rules: { | ||
| '@typescript-eslint/no-explicit-any': 'off', // disable this particular rule for now, since the `any` annotations are very tricky to get rid of | ||
| '@typescript-eslint/no-unused-expressions': 'off', // turn this off too for now, otherwise ESLint says "Cannot read properties of undefined" | ||
| }, | ||
| }, | ||
| ] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,7 @@ | ||
| export const safeJsonParse = (json: string | undefined | null) => { | ||
| try { | ||
| return JSON.parse(json ?? '') | ||
| } catch (e) { | ||
| return JSON.parse(json ?? '') | ||
| } catch { | ||
| return null | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| // hacky workaround for not being able to import tsconfig.json directly | ||
| export default { | ||
| compilerOptions: { | ||
| rootDir: 'src', | ||
| composite: true, | ||
| module: 'commonjs', | ||
| moduleResolution: 'node', | ||
| noImplicitReturns: true, | ||
| outDir: 'lib', | ||
| tsBuildInfoFile: 'lib/tsconfig.tsbuildinfo', | ||
| sourceMap: true, | ||
| strict: true, | ||
| target: 'es2022', | ||
| skipLibCheck: true, | ||
| paths: { | ||
| 'common/*': ['./src/*', '../lib/*'], | ||
| }, | ||
| resolveJsonModule: true, | ||
| esModuleInterop: true, | ||
| }, | ||
| include: ['src/**/*.ts'], | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
💡 Verification agent
🧩 Analysis chain
Verify ESLint dependency versions for compatibility and security.
The ESLint-related dependencies look reasonable, but ensure these versions are compatible with each other and free from known vulnerabilities.
Also applies to: 33-34, 37-38
🏁 Script executed:
Length of output: 697
🏁 Script executed:
Length of output: 1505
ESLint dependencies compatibility confirmed; add a lockfile for security auditing
eslint^8.57.0 || ^9.0.0(9.32.0 satisfies this)npm auditcannot run. Please generate a package-lock.json (e.g.npm i --package-lock-only) and rerunnpm audit --audit-level=moderateto surface any vulnerabilities.Also applies to: lines 33–34, 37–38
🤖 Prompt for AI Agents