Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat!: remove skipInstalls config option #22648

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
be95cc5
feat!: allow post upgrade templating by default (#21326)
rarkins Apr 5, 2023
1b5c45b
feat(automerge)!: default to platformAutomerge=true (#21327)
rarkins Apr 5, 2023
82b25a0
feat(platform/gitlab)!: prefer `commit_email` (#21122
viceice Apr 26, 2023
0a1081d
fix(post-upgrade-tasks)!: enable dot option for file filters (#21282)
bgutschke Apr 26, 2023
ac726d6
feat(npm)!: disable rollbackPrs for npm by default (#21970)
rarkins May 5, 2023
8bbd60c
fix(presets)!: remove compatibility:additionalBranchPrefix (#22015)
rarkins May 7, 2023
3c164bf
feat(package-rules)!: remove fuzzy matchPaths matching (#22394)
rarkins May 24, 2023
d9f6967
feat!: merge matchPaths and matchFiles into matchFileNames (#22406)
rarkins May 25, 2023
3bc72f6
remove skipInstall from config/options
RahulGautamSingh Jun 8, 2023
c0efe73
remove skipInstall config option
RahulGautamSingh Jun 8, 2023
6a8c7ad
fix tests
RahulGautamSingh Jun 9, 2023
1169d19
feat!: allow post upgrade templating by default (#21326)
rarkins Apr 5, 2023
a9f5219
feat(automerge)!: default to platformAutomerge=true (#21327)
rarkins Apr 5, 2023
c1b63f6
feat(platform/gitlab)!: prefer `commit_email` (#21122
viceice Apr 26, 2023
ca7357f
fix(post-upgrade-tasks)!: enable dot option for file filters (#21282)
bgutschke Apr 26, 2023
bbc72d9
feat(npm)!: disable rollbackPrs for npm by default (#21970)
rarkins May 5, 2023
3f432a4
fix(presets)!: remove compatibility:additionalBranchPrefix (#22015)
rarkins May 7, 2023
6e95ba7
feat(package-rules)!: remove fuzzy matchPaths matching (#22394)
rarkins May 24, 2023
1351666
feat!: merge matchPaths and matchFiles into matchFileNames (#22406)
rarkins May 25, 2023
567c824
Merge branch 'v36' into fix/remove-skip-installs-option
RahulGautamSingh Jun 12, 2023
6f83ca3
Update lib/config/options/index.ts
RahulGautamSingh Jun 12, 2023
b28f7a9
Update docs/usage/configuration-options.md
RahulGautamSingh Jun 12, 2023
a33b3ec
feat!: merge matchPaths and matchFiles into matchFileNames (#22406)
rarkins May 25, 2023
4e65634
Merge branch 'v36' into fix/remove-skip-installs-option
RahulGautamSingh Jun 12, 2023
107e2bc
feat!: merge matchPaths and matchFiles into matchFileNames (#22406)
rarkins May 25, 2023
fb99631
Merge branch 'v36' into fix/remove-skip-installs-option
RahulGautamSingh Jun 12, 2023
b8890d4
Merge branch 'v36' into fix/remove-skip-installs-option
rarkins Jun 12, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 1 addition & 7 deletions docs/usage/self-hosted-configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ module.exports = {

In the `renovate.json` file, define the commands and files to be included in the final commit.

The command to install dependencies (`npm ci --ignore-scripts`) is needed because, by default, the installation of dependencies is skipped (see the `skipInstalls` global option).
The command to install dependencies (`npm ci --ignore-scripts`) is needed because, by default, the installation of dependencies is skipped.

```json
{
Expand Down Expand Up @@ -798,12 +798,6 @@ It could then be used in a repository config or preset like so:

Secret names must start with an upper or lower case character and can have only characters, digits, or underscores.

## skipInstalls

By default, Renovate will use the most efficient approach to updating package files and lock files, which in most cases skips the need to perform a full module install by the bot.
If this is set to false, then a full install of modules will be done.
This is currently applicable to `npm` and `lerna`/`npm` only, and only used in cases where bugs in `npm` result in incorrect lock files being updated.

## token

## unicodeEmoji
Expand Down
8 changes: 0 additions & 8 deletions lib/config/options/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -729,14 +729,6 @@ const options: RenovateOptions[] = [
description: 'Set to `false` to disable lock file updating.',
type: 'boolean',
},
{
name: 'skipInstalls',
description:
'Skip installing modules/dependencies if lock file updating is possible without a full install.',
type: 'boolean',
default: null,
globalOnly: true,
},
{
name: 'autodiscover',
description: 'Autodiscover all repositories.',
Expand Down
1 change: 0 additions & 1 deletion lib/config/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,6 @@ export interface RenovateConfig
secrets?: Record<string, string>;

constraints?: Record<string, string>;
skipInstalls?: boolean | null;

constraintsFiltering?: ConstraintsFilter;

Expand Down
2 changes: 1 addition & 1 deletion lib/modules/manager/npm/extract/index.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const realFs = jest.requireActual<typeof import('../../../../util/fs')>(
);

const defaultExtractConfig = {
skipInstalls: null,
skipInstalls: true,
} satisfies ExtractConfig;

const input01Content = Fixtures.get('inputs/01.json', '..');
Expand Down
22 changes: 9 additions & 13 deletions lib/modules/manager/npm/extract/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -473,19 +473,15 @@ export async function extractPackageFile(
return null;
}
}
let skipInstalls = config.skipInstalls;
if (skipInstalls === null) {
if ((hasFancyRefs && lockFiles.npmLock) || yarnZeroInstall) {
// https://github.com/npm/cli/issues/1432
// Explanation:
// - npm install --package-lock-only is buggy for transitive deps in file: and npm: references
// - So we set skipInstalls to false if file: or npm: refs are found *and* the user hasn't explicitly set the value already
// - Also, do not skip install if Yarn zero-install is used
logger.debug('Automatically setting skipInstalls to false');
skipInstalls = false;
} else {
skipInstalls = true;
}
let skipInstalls = true; // skip installing modules by default
if ((hasFancyRefs && lockFiles.npmLock) || yarnZeroInstall) {
// https://github.com/npm/cli/issues/1432
// Explanation:
// - npm install --package-lock-only is buggy for transitive deps in file: and npm: references
// - So we set skipInstalls to false if file: or npm: refs are found *and* the user hasn't explicitly set the value already
// - Also, do not skip install if Yarn zero-install is used
logger.debug('Automatically setting skipInstalls to false');
skipInstalls = false;
}

return {
Expand Down
6 changes: 3 additions & 3 deletions lib/modules/manager/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export interface ExtractConfig extends CustomExtractConfig {
registryAliases?: Record<string, string>;
npmrc?: string;
npmrcMerge?: boolean;
skipInstalls?: boolean | null;
skipInstalls?: boolean;
}

export interface CustomExtractConfig extends RegexManagerTemplates {
Expand Down Expand Up @@ -65,7 +65,7 @@ export interface PackageFileContent<T = Record<string, any>>
lockFiles?: string[];
npmrc?: string;
packageFileVersion?: string;
skipInstalls?: boolean | null;
skipInstalls?: boolean;
matchStrings?: string[];
matchStringsStrategy?: MatchStringsStrategy;
}
Expand Down Expand Up @@ -275,7 +275,7 @@ export interface PostUpdateConfig<T = Record<string, any>>
ManagerData<T> {
updatedPackageFiles?: FileChange[];
postUpdateOptions?: string[];
skipInstalls?: boolean | null;
skipInstalls?: boolean;
ignoreScripts?: boolean;

packageFile?: string;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ describe('workers/repository/extract/extract-fingerprint-config', () => {
registryAliases: {
notStable: 'http://some.link.2',
},
skipInstalls: null,
});
expect(
fingerprintConfig.managers.find((manager) => manager.manager === 'regex')
Expand All @@ -66,7 +65,6 @@ describe('workers/repository/extract/extract-fingerprint-config', () => {
registryAliases: {
stable: 'http://some.link',
},
skipInstalls: null,
});
});

Expand All @@ -90,7 +88,6 @@ describe('workers/repository/extract/extract-fingerprint-config', () => {
npmrc: 'some-string',
npmrcMerge: true,
registryAliases: {},
skipInstalls: null,
});
expect(
fingerprintConfig.managers.find(
Expand All @@ -109,7 +106,6 @@ describe('workers/repository/extract/extract-fingerprint-config', () => {
npmrc: 'some-string',
npmrcMerge: true,
registryAliases: {},
skipInstalls: null,
});
expect(
fingerprintConfig.managers.find((manager) => manager.manager === 'regex')
Expand Down