github streetsidesoftware/cspell v8.3.0

latest releases: v8.16.0, v8.15.7, v8.15.6...
10 months ago

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)


Don't miss a new cspell release

NewReleases is sending notifications on new releases.