From df7ab3b30c454afe03541bcddfa312080b1aa9e9 Mon Sep 17 00:00:00 2001 From: Katy Bowman Date: Wed, 30 Sep 2026 17:02:43 -0400 Subject: [PATCH] feat!: stop generating npm-shrinkwrap.json and oclif.lock files in sf-prepack BREAKING CHANGE: sf-prepack will no longer generate npm-shrinkwrap.json or oclif.lock files --- bin/sf-prepack.js | 16 ---------------- utils/standardize-files.js | 4 ++-- utils/standardize-pjson.js | 2 +- 3 files changed, 3 insertions(+), 19 deletions(-) diff --git a/bin/sf-prepack.js b/bin/sf-prepack.js index d892e61..c9f3e07 100755 --- a/bin/sf-prepack.js +++ b/bin/sf-prepack.js @@ -19,7 +19,6 @@ const chalk = require('chalk'); const shell = require('../utils/shelljs'); const { determineProjectType } = require('../utils/project-type'); const packageRoot = require('../utils/package-path'); -const { semverIsLessThan } = require('../utils/semver'); shell.exec('yarn build'); @@ -28,21 +27,6 @@ const projectType = determineProjectType(packageRoot); if (projectType !== 'other') { if (shell.which('oclif')) { shell.exec('oclif manifest'); - - if (projectType !== 'core-plugin') { - const version = shell.exec('oclif --version', { silent: true }).stdout.trim().replace('oclif/', '').split(' ')[0]; - if (semverIsLessThan(version, '3.14.0')) { - console.log( - chalk.yellow('Warning:'), - - `oclif version ${version} is less than 3.14.0. Please upgrade to 3.14.0 or higher to generate oclif.lock file.` - ); - } else { - shell.exec('oclif lock'); - } - - shell.exec('npm shrinkwrap'); - } } else if (shell.which('oclif-dev')) { console.log(chalk.yellow('Warning:'), 'oclif-dev is deprecated. Please use oclif instead.'); shell.exec('oclif-dev manifest'); diff --git a/utils/standardize-files.js b/utils/standardize-files.js index 93b51b9..6d287d1 100644 --- a/utils/standardize-files.js +++ b/utils/standardize-files.js @@ -36,9 +36,9 @@ const IGNORES = [ { pattern: '.eslintcache', section: 'CLEAN ALL' }, { pattern: '.wireit', section: 'CLEAN ALL' }, { pattern: '*.tsbuildinfo', section: 'CLEAN ALL' }, - { pattern: 'npm-shrinkwrap.json', section: 'CLEAN', plugin: true }, + { pattern: 'npm-shrinkwrap.json', section: 'CLEAN' }, { pattern: 'oclif.manifest.json', section: 'CLEAN', plugin: true }, - { pattern: 'oclif.lock', section: 'CLEAN', plugin: true }, + { pattern: 'oclif.lock', section: 'CLEAN' }, ]; function isDifferent(sourcePath, targetPath) { diff --git a/utils/standardize-pjson.js b/utils/standardize-pjson.js index 20f3b79..ea9f9ec 100644 --- a/utils/standardize-pjson.js +++ b/utils/standardize-pjson.js @@ -24,7 +24,7 @@ const { determineProjectType } = require('./project-type'); const PLUGIN_FILES = ['/messages', '/oclif.manifest.json']; const CORE_PLUGIN_FILES_BLOCK_LIST = ['/oclif.lock', '/npm-shrinkwrap.json']; -const JIT_PLUGIN_FILES = ['/messages', '/oclif.manifest.json', '/oclif.lock', '/npm-shrinkwrap.json']; +const JIT_PLUGIN_FILES = ['/messages', '/oclif.manifest.json']; module.exports = (packageRoot = require('./package-path')) => { const config = resolveConfig(packageRoot);