Skip to content
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

feat: support .pnp.js when loading configurations. #1307

Merged
merged 28 commits into from
Jun 5, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
01ae176
feat: support `.pnp.js` when loading configurations.
Jason3S Jun 2, 2021
9a1b480
Update README.md
Jason3S Jun 2, 2021
9948744
ci: fix issue with lerna and test package names
Jason3S Jun 3, 2021
315c809
ci: nest yarn2 test packages to avoid a conflict with lerna / npm
Jason3S Jun 4, 2021
e7a1069
ci: do not spell check generated files.
Jason3S Jun 4, 2021
7b9bc7c
ci: do not spell check yarn files.
Jason3S Jun 4, 2021
c1125c5
dev: improve coverage
Jason3S Jun 4, 2021
e7789ef
test: improve coverage
Jason3S Jun 4, 2021
a1cc90c
test: improve coverage
Jason3S Jun 4, 2021
045ef80
dev: be able to specify the list of .pnp files to search for
Jason3S Jun 5, 2021
87fa7a3
dev: Add PnPSettings definitions
Jason3S Jun 5, 2021
70011a8
ci: make integration-tests dependent upon cspell for build order
Jason3S Jun 5, 2021
ac2e0ed
ci: add cspell dependency to integration tests
Jason3S Jun 5, 2021
6d6422d
dev: Be able to load PnP in sync mode
Jason3S Jun 5, 2021
6a19268
dev: Add settings async PnP loading
Jason3S Jun 5, 2021
05ecb0c
dev: enable support for PnP
Jason3S Jun 5, 2021
ad2734e
ci: remove big yarn files
Jason3S Jun 5, 2021
717a77e
Make sure they are not on gitHub
Jason3S Jun 5, 2021
ec835db
ci: prepare nested yarn packages for cspell-action
Jason3S Jun 5, 2021
a78b5ab
Update CSpellSettingsServer.ts
Jason3S Jun 5, 2021
c3ac03e
Update cspell-action.yml
Jason3S Jun 5, 2021
3a24041
Update cspell-cli.yml
Jason3S Jun 5, 2021
f890676
Do not lint yarn2 test packages
Jason3S Jun 5, 2021
c43da30
Do not automatically build the project.
Jason3S Jun 5, 2021
09055ad
dev: build before linting or testing
Jason3S Jun 5, 2021
831a434
dev: make sure it is possible to build a cli repo
Jason3S Jun 5, 2021
cdb54e1
Update README.md
Jason3S Jun 5, 2021
5cc3e5c
Update package.json
Jason3S Jun 5, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@
**/[Tt]emp
**/[Ss]amples
integration-tests/repositories
test-packages/yarn2
coverage
2 changes: 1 addition & 1 deletion .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
uses: actions/[email protected]

- run: npm ci

- run: npm run build
- run: npm run coverage

- name: Upload coverage Coveralls
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/cspell-action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,5 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
- run: npm run prepare-cspell-action
- uses: streetsidesoftware/[email protected]
1 change: 1 addition & 0 deletions .github/workflows/cspell-cli.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,5 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
- run: npm run prepare-cspell-action
- run: npx cspell@latest "**/*"
1 change: 1 addition & 0 deletions .github/workflows/integration-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ jobs:
node-version: ${{ matrix.node-version }}

- run: npm ci
- run: npm run build
- name: Run Integration Tests ${{ matrix.repo }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,5 @@ jobs:
- uses: actions/[email protected]
- uses: actions/[email protected]
- run: npm ci
- run: npm run build
- run: npm run lint-ci
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
node-version: ${{ matrix.node-version }}

- run: npm ci

- run: npm run build
- run: npm test

- name: verify trace command
Expand Down Expand Up @@ -66,7 +66,7 @@ jobs:
node-version: ${{ matrix.node-version }}

- run: npm ci

- run: npm run build
- run: npm test

- name: verify trace command
Expand Down
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@ lerna.json
tsconfig*.json
packages/*/dist/
**/package-lock.json
coverage
2 changes: 2 additions & 0 deletions cspell-dict.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ liberapay
licia
liriliri
macos
medicalterms
megistos
micromatch
monorepo
Expand All @@ -47,6 +48,7 @@ streetsidesoftware
submodule
tidelift
tsdk
untrusted
webdeveric
wireapp
xregexp
75 changes: 39 additions & 36 deletions cspell.code-workspace
Original file line number Diff line number Diff line change
@@ -1,38 +1,41 @@
{
"folders": [
{
"name": "cspell-monorepo",
"path": "."
},
{
"path": "./integration-tests"
},
{
"path": "./packages/cspell-glob"
},
{
"path": "./packages/cspell-lib"
},
{
"path": "./packages/cspell-tools"
},
{
"path": "./packages/cspell-trie-lib"
},
{
"path": "./packages/cspell-trie"
},
{
"path": "./packages/cspell-trie2-lib"
},
{
"path": "./packages/cspell"
}
],
"settings": {
"typescript.tsdk": "cspell-monorepo/node_modules/typescript/lib",
"cSpell.customWorkspaceDictionaries": [
"workspace"
]
}
"folders": [
{
"name": "cspell-monorepo",
"path": "."
},
{
"path": "./integration-tests"
},
{
"path": "./packages/cspell-glob"
},
{
"path": "./packages/cspell-lib"
},
{
"path": "./packages/cspell-tools"
},
{
"path": "./packages/cspell-trie-lib"
},
{
"path": "./packages/cspell-trie"
},
{
"path": "./packages/cspell-trie2-lib"
},
{
"path": "./packages/cspell-types"
},
{
"path": "./packages/cspell"
}
],
"settings": {
"typescript.tsdk": "cspell-monorepo/node_modules/typescript/lib",
"cSpell.customWorkspaceDictionaries": [
"workspace"
]
}
}
5 changes: 5 additions & 0 deletions cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@
"**/tsconfig.json",
"test-packages/test-cspell-tools/src/*.txt",
"cspell.json",
".yarn",
".pnp.{js,cjs}",
"integration-tests/config/config.json",
"integration-tests/config/repositories/**",
"integration-tests/repositories/**",
Expand All @@ -44,5 +46,8 @@
],
"ignoreWords": [
"commitcomment"
],
"words": [
"medicalterms"
]
}
32 changes: 32 additions & 0 deletions cspell.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -452,6 +452,22 @@
},
"type": "array"
},
"pnpFiles": {
"default": [
".pnp.js",
".pnp.cjs"
],
"description": "The PnP files to search for. Note: `.mjs` files are not currently supported.",
"items": {
"type": "string"
},
"type": "array"
},
"usePnP": {
"default": false,
"description": "Packages managers like Yarn 2 use a `.pnp.cjs` file to assist in loading packages stored in the repository.\n\nWhen true, the spell checker will search up the directory structure for the existence of a PnP file and load it.",
"type": "boolean"
},
"words": {
"description": "list of words to be always considered correct",
"items": {
Expand Down Expand Up @@ -744,6 +760,17 @@
},
"type": "array"
},
"pnpFiles": {
"default": [
".pnp.js",
".pnp.cjs"
],
"description": "The PnP files to search for. Note: `.mjs` files are not currently supported.",
"items": {
"type": "string"
},
"type": "array"
},
"showStatus": {
"description": "Show status",
"type": "boolean"
Expand All @@ -752,6 +779,11 @@
"description": "Delay in ms after a document has changed before checking it for spelling errors.",
"type": "number"
},
"usePnP": {
"default": false,
"description": "Packages managers like Yarn 2 use a `.pnp.cjs` file to assist in loading packages stored in the repository.\n\nWhen true, the spell checker will search up the directory structure for the existence of a PnP file and load it.",
"type": "boolean"
},
"userWords": {
"description": "Words to add to global dictionary -- should only be in the user config file.",
"items": {
Expand Down
Loading