From cc71147a19bbc22be9d51d9a1760743ee34d2384 Mon Sep 17 00:00:00 2001 From: Thomas Boutell Date: Wed, 10 Jan 2024 12:05:20 -0500 Subject: [PATCH] release 3.0.1 --- CHANGELOG.md | 7 ++++++- lib/checkUpdates.js | 43 ------------------------------------------- package.json | 6 ++---- 3 files changed, 8 insertions(+), 48 deletions(-) delete mode 100644 lib/checkUpdates.js diff --git a/CHANGELOG.md b/CHANGELOG.md index 07b94c8..dbaf02f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,12 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -## Unreleased +## 3.0.1 (2024-01-10) + +### Changed + +- Removed logic to automatically detect out of date stylelint plugins. Unfortunately, this [fails in an +unrecoverable way with the latest versions of some stylelint plugins](https://github.com/nodejs/node/issues/33460), breaking `npm install`. ## [3.0.0] - 2023-06-21 diff --git a/lib/checkUpdates.js b/lib/checkUpdates.js deleted file mode 100644 index a711f0a..0000000 --- a/lib/checkUpdates.js +++ /dev/null @@ -1,43 +0,0 @@ -const pkg = require('../package.json'); - -const getInstalledVersion = ({ name, version }) => { - const installedVersion = require(`${name}/package.json`).version; - return version === installedVersion ? false : installedVersion; -}; - -const getVersionNumber = string => { - const semver = /[~^><=x]/gi; - return string.replace(semver, ''); -}; - -const checkUpdates = () => { - console.log(`\nstylelint-config-apostrophe:\n - Checking for stylelint-config updates...`); - - const { dependencies } = pkg; - - const availableUpdates = {}; - - Object.keys(dependencies).forEach(dependency => { - const name = dependency; - const version = getVersionNumber(dependencies[dependency]); - - const updateAvailable = getInstalledVersion({ - name, - version - }); - if (updateAvailable) { - availableUpdates[name] = updateAvailable; - } - }); - - if (Object.keys(availableUpdates).length) { - console.log(` - Updates available for the following configs: \n -${JSON.stringify(availableUpdates, null, 4)}\n`); - } else { - console.log(' 🎉 Stylelint config is up to date.'); - } -}; - -module.exports.check = checkUpdates(); diff --git a/package.json b/package.json index de20289..019b54c 100644 --- a/package.json +++ b/package.json @@ -1,11 +1,9 @@ { "name": "stylelint-config-apostrophe", - "version": "3.0.0", + "version": "3.0.1", "description": "stylelint configuration for apostrophe and related core modules", "main": "index.js", "scripts": { - "postinstall": "npm run check", - "check": "node ./lib/checkUpdates", "compare": "node ./lib/index", "eslint": "npx eslint .", "stylelint": "npx stylelint 'test/*.scss' --custom-syntax postcss-scss --config .stylelintrc.json", @@ -39,4 +37,4 @@ "mocha": "^10.2.0", "postcss-scss": "^4.0.6" } -} +} \ No newline at end of file