-
Notifications
You must be signed in to change notification settings - Fork 15
fix(plugin-typescript): include extended options #1074
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
Merged
Merged
Changes from 11 commits
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
3f16848
fix(plugin-typescript): include extended options
BioPhoton 51c755b
test(plugin-typescript): fix path for windows
BioPhoton 16eab1f
test(plugin-typescript-e2e): update snapshot
BioPhoton a440788
test(plugin-typescript-e2e): update test config
BioPhoton 38c09e6
test(plugin-typescript): fix path for windows
BioPhoton bd6e003
test(plugin-typescript-e2e): fix path for windows
BioPhoton 686ab91
fix(plugin-typescript-e2e): fix lint
BioPhoton 062d9be
test(plugin-typescript-e2e): fix path for windows robust variant
BioPhoton f8220d9
test(plugin-typescript-e2e): fix path for windows robust variant 2
BioPhoton 18f397c
test(plugin-typescript-e2e): fix path for windows robust variant 3
BioPhoton 8210562
test(plugin-typescript-e2e): remove comments
BioPhoton 8a63794
Update e2e/plugin-typescript-e2e/tests/collect.e2e.test.ts
BioPhoton 25d636d
Update packages/plugin-typescript/src/lib/runner/utils.ts
BioPhoton c03338f
test: adjust test helper for message transform
BioPhoton 7e1e45c
test(plugin-typescript): adjust checks
BioPhoton 87851bb
test(plugin-typescript-e2e): adjust checks
BioPhoton 6ec8df3
test(plugin-typescript-e2e): adjust checks 2
BioPhoton a0b5814
chore: add cloud-id
BioPhoton 574beaa
chore(plugin-typescript-e2e): adjust checks for windows
BioPhoton 2e1f646
chore(plugin-typescript-e2e): adjust checks for windows 3
BioPhoton 5b22c58
chore: remove nx cloud id
BioPhoton e96b718
fix: adjust targets
BioPhoton af8634d
Update packages/plugin-typescript/src/lib/runner/runner.int.test.ts
BioPhoton 68350d8
fix: format
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
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
7 changes: 7 additions & 0 deletions
7
packages/plugin-typescript/mocks/fixtures/basic-setup/tsconfig.extends-base.json
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,7 @@ | ||
| { | ||
| "compilerOptions": { | ||
| "rootDir": "./src", | ||
| "verbatimModuleSyntax": false | ||
| }, | ||
| "include": ["src/**/*.ts"] | ||
| } |
8 changes: 8 additions & 0 deletions
8
packages/plugin-typescript/mocks/fixtures/basic-setup/tsconfig.extends-extending.json
BioPhoton marked this conversation as resolved.
Show resolved
Hide resolved
|
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,8 @@ | ||
| { | ||
| "extends": "./tsconfig.extends-base.json", | ||
| "compilerOptions": { | ||
| "verbatimModuleSyntax": true, | ||
| "module": "CommonJS" | ||
| }, | ||
| "exclude": ["src/*-errors/**/*.ts"] | ||
| } |
35 changes: 28 additions & 7 deletions
35
packages/plugin-typescript/src/lib/runner/runner.int.test.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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,15 +1,36 @@ | ||
| import { describe, expect } from 'vitest'; | ||
| import { osAgnosticPath } from '@code-pushup/test-utils'; | ||
| import { getAudits } from '../utils.js'; | ||
| import { createRunnerFunction } from './runner.js'; | ||
|
|
||
| describe('createRunnerFunction', () => { | ||
| it('should create valid audit outputs when called', async () => { | ||
| await expect( | ||
| createRunnerFunction({ | ||
| tsconfig: | ||
| 'packages/plugin-typescript/mocks/fixtures/basic-setup/tsconfig.all-audits.json', | ||
| expectedAudits: getAudits(), | ||
| })(() => void 0), | ||
| ).resolves.toMatchSnapshot(); | ||
| const runnerFunction = createRunnerFunction({ | ||
| tsconfig: | ||
| 'packages/plugin-typescript/mocks/fixtures/basic-setup/tsconfig.all-audits.json', | ||
| expectedAudits: getAudits(), | ||
| }); | ||
|
|
||
| const result = await runnerFunction(); | ||
|
|
||
| const sanitizedResult = result.map(audit => ({ | ||
| ...audit, | ||
| ...(audit.details && { | ||
| details: { | ||
| ...audit.details, | ||
| issues: audit.details.issues?.map(issue => ({ | ||
| ...issue, | ||
| ...(issue.source && { | ||
| source: { | ||
| ...issue.source, | ||
| file: osAgnosticPath(issue.source.file), | ||
| }, | ||
| }), | ||
| })), | ||
| }, | ||
| }), | ||
| })); | ||
|
|
||
| await expect(sanitizedResult).toMatchSnapshot(); | ||
BioPhoton marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| }, 35_000); | ||
| }); | ||
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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.