feat: Add untrusted mode to the config loader (#5127)
There are times it is necessary to prevent loading JavaScript based configuration.
It is now possible to switch the config loader into untrusted mode. In this mode, the loader will not load JavaScript files outside of the CSpell configuration.
feat: Support calling a function to get the config (#5126)
With the release of v8.3.0 it will be possible to return a function from cspell.config.js files. This function will be called to get the configuration. It can return a Config Object or Promise that resolves to a Config Object.
Example:
cspell.config.mjs
import { readFile } from 'node:fs/promises';
/**
@returns {Promise<import('@cspell/cspell-types').CSpellUserSettings>}
/
export default async function getConfig() {
const words = (await readFile(new URL('requirements.txt', import.meta.url), 'utf8'))
.replace(/[.,]|([=<>].)/g, ' ')
.split(/\s+/g);
return { id: 'python-imports', words };
}
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Bumps cspell from 8.1.3 to 8.3.0.
Release notes
Sourced from cspell's releases.
... (truncated)
Changelog
Sourced from cspell's changelog.
Commits
019c7cc
v8.3.0dde9289
ci: Workflow Bot -- Update ALL Dependencies (main) (#5130)92916e2
fix: Upgrade dictionaries (cryptocurrencies) (#5128)0ed8c1e
feat: Add untrusted mode to the config loader (#5127)3fd9696
ci: Workflow Bot -- Update ALL Dependencies (main) (#5125)6d083a3
feat: Support calling a function to get the config (#5126)6293413
ci: Workflow Bot -- Update ALL Dependencies (main) (#5124)f342f1e
ci: Workflow Bot -- Update ALL Dependencies (main) (#5121)d3c5ff6
v8.2.429666a6
ci: Fix Lint -- Workflow Bot (#5123)Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting
@dependabot rebase
.Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show