-
Couldn't load subscription status.
- Fork 2
General Repo Updates #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
Changes from all commits
7f279b9
9077b5b
7dd81d5
5ecbaca
4df46f5
399f190
7b2fc76
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,2 @@ | ||
| # Format | ||
| 9077b5b81d266818af4a25b90c78e0e7d03620a3 |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| name: Format Check | ||
|
|
||
| on: | ||
| push: | ||
| branches: [main] | ||
| pull_request: | ||
| workflow_dispatch: | ||
|
|
||
| jobs: | ||
| format-check: | ||
| name: Format Check | ||
| runs-on: ubuntu-latest | ||
|
|
||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@v5 | ||
|
|
||
| - name: Setup Node.js | ||
| uses: actions/setup-node@v6 | ||
| with: | ||
| node-version: 24 | ||
| cache: 'npm' | ||
|
|
||
| - name: Install dependencies | ||
| run: npm ci | ||
|
|
||
| - name: Run format check | ||
| run: npm run format:check | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,18 +1,18 @@ | ||
| export const DEFAULT_CONFIG = { | ||
| rest: true, | ||
| graphqlSchema: { | ||
| files: '*.graphql' | ||
| files: '*.graphql', | ||
| }, | ||
| roles: { | ||
| files: 'roles.yaml' | ||
| files: 'roles.yaml', | ||
| }, | ||
| jsResource: { | ||
| files: 'resources.js' | ||
| files: 'resources.js', | ||
| }, | ||
| fastifyRoutes: { | ||
| files: 'routes/*.js' | ||
| files: 'routes/*.js', | ||
| }, | ||
| static: { | ||
| files: 'web/**' | ||
| } | ||
| }; | ||
| files: 'web/**', | ||
| }, | ||
| }; |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,7 @@ | ||
| import { Scope } from "./Scope"; | ||
| import { Scope } from './Scope'; | ||
|
|
||
| export interface PluginModule { | ||
| handleApplication: (scope: Scope) => void | Promise<void>; | ||
| defaultTimeout?: number; | ||
| suppressHandleApplicationWarning?: boolean; | ||
| } | ||
| } |
| Original file line number | Diff line number | Diff line change | ||
|---|---|---|---|---|
|
|
@@ -160,7 +160,13 @@ export class Scope extends EventEmitter { | |||
|
|
||||
| #getFilesOption(): FileAndURLPathConfig | undefined { | ||||
| const config = this.options.getAll(); | ||||
| if (config && typeof config === 'object' && config !== null && !Array.isArray(config) && 'files' in config /*&& validate config.files*/) { | ||||
| if ( | ||||
| config && | ||||
| typeof config === 'object' && | ||||
| config !== null && | ||||
|
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. This line is unnecessary.
Suggested change
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. I'd like to refrain from making core changes in this pr; only reason this code is changing is cause of the format. We can make edits like this separately. |
||||
| !Array.isArray(config) && | ||||
| 'files' in config /*&& validate config.files*/ | ||||
| ) { | ||||
| return { | ||||
| files: config.files as FilesOption, | ||||
| urlPath: config.urlPath as string | undefined, | ||||
|
|
||||
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.
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.
Whats the difference compared to the default? The other workflows don't specify these types. Just curious
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's just something I started doing a couple years ago because a project I worked on would run CI for both push and pull requests, effectively running CI twice. I didn't know GH workflows back then and whoever set up the triggers didn't either! I fixed it by explicitly set the types and branches (main), then things started to behave. So I just looked into what the valid types are and turns out that pened, synchronize, and reopened are the default types! So, nevermind, you can ignore this. :)