-
-
Notifications
You must be signed in to change notification settings - Fork 180
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support plugin config at root level (resolves #260)
- Loading branch information
Showing
22 changed files
with
148 additions
and
18 deletions.
There are no files selected for viewing
This file contains 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 @@ | ||
export default 1; |
This file contains 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 @@ | ||
export default 1; |
This file contains 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,3 @@ | ||
{ | ||
"vitest": { "entry": ["**/*.vitest.ts"] } | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains 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,12 @@ | ||
{ | ||
"name": "@fixtures/plugin-config", | ||
"scripts": { | ||
"test": "vitest" | ||
}, | ||
"devDependencies": { | ||
"vitest": "*" | ||
}, | ||
"workspaces": [ | ||
"packages/*" | ||
] | ||
} |
This file contains 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,6 @@ | ||
{ | ||
"vitest": { "entry": ["**/*.vitest.ts"] }, | ||
"workspaces": { | ||
"packages/*": {} | ||
} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
4 changes: 4 additions & 0 deletions
4
fixtures/workspaces-plugin-config/node_modules/vitest/package.json
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains 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,6 @@ | ||
{ | ||
"name": "@workspaces-plugin-config/root", | ||
"workspaces": [ | ||
"packages/*" | ||
] | ||
} |
This file contains 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 @@ | ||
export default 1; |
3 changes: 3 additions & 0 deletions
3
fixtures/workspaces-plugin-config/packages/backend/index.vitest.ts
This file contains 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,3 @@ | ||
import { test } from 'vitest'; | ||
|
||
test('it', () => {}); |
9 changes: 9 additions & 0 deletions
9
fixtures/workspaces-plugin-config/packages/backend/package.json
This file contains 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,9 @@ | ||
{ | ||
"name": "@workspaces-plugin-config/backend", | ||
"scripts": { | ||
"test": "vitest" | ||
}, | ||
"devDependencies": { | ||
"vitest": "*" | ||
} | ||
} |
This file contains 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 @@ | ||
export default 1; |
1 change: 1 addition & 0 deletions
1
fixtures/workspaces-plugin-config/packages/frontend/index.vitest.ts
This file contains 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 @@ | ||
export default 1; |
9 changes: 9 additions & 0 deletions
9
fixtures/workspaces-plugin-config/packages/frontend/package.json
This file contains 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,9 @@ | ||
{ | ||
"name": "@workspaces-plugin-config/frontend", | ||
"scripts": { | ||
"test": "vitest" | ||
}, | ||
"devDependencies": { | ||
"vitest": "*" | ||
} | ||
} |
This file contains 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 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 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 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 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,21 @@ | ||
import assert from 'node:assert/strict'; | ||
import test from 'node:test'; | ||
import { main } from '../src/index.js'; | ||
import { resolve } from '../src/util/path.js'; | ||
import baseArguments from './helpers/baseArguments.js'; | ||
import baseCounters from './helpers/baseCounters.js'; | ||
|
||
const cwd = resolve('fixtures/plugin-config'); | ||
|
||
test('Use root plugin config', async () => { | ||
const { counters } = await main({ | ||
...baseArguments, | ||
cwd, | ||
}); | ||
|
||
assert.deepEqual(counters, { | ||
...baseCounters, | ||
total: 2, | ||
processed: 2, | ||
}); | ||
}); |
This file contains 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,21 @@ | ||
import assert from 'node:assert/strict'; | ||
import test from 'node:test'; | ||
import { main } from '../src/index.js'; | ||
import { resolve } from '../src/util/path.js'; | ||
import baseArguments from './helpers/baseArguments.js'; | ||
import baseCounters from './helpers/baseCounters.js'; | ||
|
||
const cwd = resolve('fixtures/workspaces-plugin-config'); | ||
|
||
test('Use root plugin config in workspaces', async () => { | ||
const { counters } = await main({ | ||
...baseArguments, | ||
cwd, | ||
}); | ||
|
||
assert.deepEqual(counters, { | ||
...baseCounters, | ||
total: 4, | ||
processed: 4, | ||
}); | ||
}); |