@storybook/cli
Version:
Storybook CLI: Develop, document, and test UI components in isolation
69 lines (65 loc) • 2.35 kB
JavaScript
import CJS_COMPAT_NODE_URL_k5dk07v6ua from 'node:url';
import CJS_COMPAT_NODE_PATH_k5dk07v6ua from 'node:path';
import CJS_COMPAT_NODE_MODULE_k5dk07v6ua from "node:module";
var __filename = CJS_COMPAT_NODE_URL_k5dk07v6ua.fileURLToPath(import.meta.url);
var __dirname = CJS_COMPAT_NODE_PATH_k5dk07v6ua.dirname(__filename);
var require = CJS_COMPAT_NODE_MODULE_k5dk07v6ua.createRequire(import.meta.url);
// ------------------------------------------------------------
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
// ------------------------------------------------------------
import {
findOutdatedPackage
} from "./chunk-W4IOJB54.js";
import "./chunk-3V4K2OAZ.js";
import "./chunk-BQPSG2W7.js";
import "./chunk-D3CPWTNB.js";
import "./chunk-3NRJWWYC.js";
// src/autoblock/block-dependencies-versions.ts
import { dedent } from "ts-dedent";
var minimalVersionsMap = {
"@angular/core": "18.0.0",
"react-scripts": "5.0.0",
next: "14.1.0",
preact: "10.0.0",
svelte: "5.0.0",
vue: "3.0.0",
vite: "5.0.0"
}, blocker = {
id: "dependenciesVersions",
async check({ packageManager }) {
return findOutdatedPackage(minimalVersionsMap, { packageManager });
},
log(data) {
switch (data.packageName) {
case "@angular/core":
return {
title: "Angular 18 support removed",
message: dedent`
Support for Angular < 18 has been removed.
Please see the migration guide for more information:
`,
link: "https://angular.dev/update-guide"
};
case "next":
return {
title: "Next.js 14.1 support removed",
message: dedent`
Support for Next.js < 14.1 has been removed.
Please see the migration guide for more information:
`,
link: "https://nextjs.org/docs/pages/building-your-application/upgrading/version-13"
};
default:
return {
title: `${data.packageName} version < ${data.minimumVersion} support removed`,
message: dedent`
Support for ${data.packageName} version < ${data.minimumVersion} has been removed.
Storybook needs a minimum version of ${data.minimumVersion}, but you have version ${data.installedVersion}.
`
};
}
}
};
export {
blocker
};