From c3292a9f4d43dcecaf14f6c7b19f066b38039314 Mon Sep 17 00:00:00 2001 From: Phillip Barta Date: Sun, 8 Oct 2023 16:01:46 +0200 Subject: [PATCH] feat: add migration to bring stylelint-config-standard packages up to date --- packages/nx-stylelint/migrations.json | 13 +++++++++++++ .../src/generators/init/generator.spec.ts | 2 +- .../src/generators/scss/generator.spec.ts | 2 +- packages/nx-stylelint/src/utils/versions.ts | 4 ++-- 4 files changed, 17 insertions(+), 4 deletions(-) diff --git a/packages/nx-stylelint/migrations.json b/packages/nx-stylelint/migrations.json index 61cc3c3f..f322b160 100644 --- a/packages/nx-stylelint/migrations.json +++ b/packages/nx-stylelint/migrations.json @@ -109,6 +109,19 @@ "alwaysAddToPackageJson": false } } + }, + "16.0.0": { + "version": "16.0.0-beta.0", + "packages": { + "stylelint-config-standard": { + "version": "^34.0.0", + "alwaysAddToPackageJson": false + }, + "stylelint-config-standard-scss": { + "version": "^11.0.0", + "alwaysAddToPackageJson": false + } + } } } } diff --git a/packages/nx-stylelint/src/generators/init/generator.spec.ts b/packages/nx-stylelint/src/generators/init/generator.spec.ts index b0916be1..5662757d 100644 --- a/packages/nx-stylelint/src/generators/init/generator.spec.ts +++ b/packages/nx-stylelint/src/generators/init/generator.spec.ts @@ -21,7 +21,7 @@ describe('nx-stylelint:init generator', () => { const packagejson = readJson(tree, 'package.json'); expect(packagejson.devDependencies['stylelint']).toBe('^15.0.0'); - expect(packagejson.devDependencies['stylelint-config-standard']).toBe('^30.0.0'); + expect(packagejson.devDependencies['stylelint-config-standard']).toBe('^34.0.0'); const stylelintrc = readJson(tree, '.stylelintrc.json'); expect(stylelintrc.ignoreFiles?.length).toBe(1); diff --git a/packages/nx-stylelint/src/generators/scss/generator.spec.ts b/packages/nx-stylelint/src/generators/scss/generator.spec.ts index 4e37be1d..25b89a76 100644 --- a/packages/nx-stylelint/src/generators/scss/generator.spec.ts +++ b/packages/nx-stylelint/src/generators/scss/generator.spec.ts @@ -44,7 +44,7 @@ describe('scss generator', () => { const packageJson = readJson(tree, 'package.json'); - expect(packageJson.devDependencies['stylelint-config-standard-scss']).toBe('^7.0.0'); + expect(packageJson.devDependencies['stylelint-config-standard-scss']).toBe('^11.0.0'); }); it('should update root and project stylelint configurations', async () => { diff --git a/packages/nx-stylelint/src/utils/versions.ts b/packages/nx-stylelint/src/utils/versions.ts index 5bc6994a..39e341f3 100644 --- a/packages/nx-stylelint/src/utils/versions.ts +++ b/packages/nx-stylelint/src/utils/versions.ts @@ -1,7 +1,7 @@ // Versions export const stylelintVersion = '^15.0.0'; -export const stylelintConfigStandardVersion = '^30.0.0'; -export const stylelintConfigStandardScssVersion = '^7.0.0'; +export const stylelintConfigStandardVersion = '^34.0.0'; +export const stylelintConfigStandardScssVersion = '^11.0.0'; /** Stylelint Visual Studio Code plugin identifier */ export const stylelintVSCodeExtension = 'stylelint.vscode-stylelint';