Skip to content

v8.3.0

Compare
Choose a tag to compare
@github-actions github-actions released this 30 Dec 09:13
· 360 commits to main since this release

Changes

Features

feat: Add untrusted mode to the config loader (#5127)

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.

This is to support: Workspace Trust Extension Guide | Visual Studio Code Extension API


feat: Support calling a function to get the config (#5126)

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 };
}

Dictionary Updates

fix: Upgrade dictionaries (cryptocurrencies) (#5128)

fix: Upgrade dictionaries (cryptocurrencies) (#5128)