@yarnpkg/plugin-essentials 4.5.0 → 4.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -15,6 +15,7 @@ export default class AddCommand extends BaseCommand {
15
15
  preferDev: boolean;
16
16
  interactive: boolean | undefined;
17
17
  cached: boolean;
18
+ noTimeGate: boolean;
18
19
  mode: InstallMode | undefined;
19
20
  silent: boolean | undefined;
20
21
  packages: string[];
@@ -46,6 +46,9 @@ class AddCommand extends cli_1.BaseCommand {
46
46
  this.cached = clipanion_1.Option.Boolean(`--cached`, false, {
47
47
  description: `Reuse the highest version already used somewhere within the project`,
48
48
  });
49
+ this.noTimeGate = clipanion_1.Option.Boolean(`--no-time-gate`, false, {
50
+ description: `Disable the minimum release age check for this command`,
51
+ });
49
52
  this.mode = clipanion_1.Option.String(`--mode`, {
50
53
  description: `Change what artifacts installs generate`,
51
54
  validator: t.isEnum(core_2.InstallMode),
@@ -55,6 +58,8 @@ class AddCommand extends cli_1.BaseCommand {
55
58
  }
56
59
  async execute() {
57
60
  const configuration = await core_1.Configuration.find(this.context.cwd, this.context.plugins);
61
+ if (this.noTimeGate)
62
+ configuration.useWithSource(`<cli>`, { npmMinimalAgeGate: `0` }, configuration.startingCwd, { overwrite: true });
58
63
  const { project, workspace } = await core_2.Project.find(configuration, this.context.cwd);
59
64
  const cache = await core_1.Cache.find(configuration);
60
65
  if (!workspace)
@@ -29,6 +29,10 @@ const LOCKFILE_MIGRATION_RULES = [{
29
29
  selector: v => v < 9,
30
30
  name: `enableScripts`,
31
31
  value: true,
32
+ }, {
33
+ selector: v => v < 10,
34
+ name: `npmMinimalAgeGate`,
35
+ value: `0`,
32
36
  }];
33
37
  // eslint-disable-next-line arca/no-default-export
34
38
  class YarnCommand extends cli_1.BaseCommand {
@@ -11,6 +11,7 @@ export default class UpCommand extends BaseCommand {
11
11
  tilde: boolean;
12
12
  caret: boolean;
13
13
  recursive: boolean;
14
+ noTimeGate: boolean;
14
15
  mode: InstallMode | undefined;
15
16
  patterns: string[];
16
17
  static schema: t.LooseValidator<{
@@ -32,6 +32,9 @@ class UpCommand extends cli_1.BaseCommand {
32
32
  this.recursive = clipanion_1.Option.Boolean(`-R,--recursive`, false, {
33
33
  description: `Resolve again ALL resolutions for those packages`,
34
34
  });
35
+ this.noTimeGate = clipanion_1.Option.Boolean(`--no-time-gate`, false, {
36
+ description: `Disable the minimum release age check for this command`,
37
+ });
35
38
  this.mode = clipanion_1.Option.String(`--mode`, {
36
39
  description: `Change what artifacts installs generate`,
37
40
  validator: t.isEnum(core_2.InstallMode),
@@ -48,6 +51,8 @@ class UpCommand extends cli_1.BaseCommand {
48
51
  }
49
52
  async executeUpRecursive() {
50
53
  const configuration = await core_3.Configuration.find(this.context.cwd, this.context.plugins);
54
+ if (this.noTimeGate)
55
+ configuration.useWithSource(`<cli>`, { npmMinimalAgeGate: `0` }, configuration.startingCwd, { overwrite: true });
51
56
  const { project, workspace } = await core_2.Project.find(configuration, this.context.cwd);
52
57
  const cache = await core_3.Cache.find(configuration);
53
58
  if (!workspace)
@@ -84,6 +89,8 @@ class UpCommand extends cli_1.BaseCommand {
84
89
  }
85
90
  async executeUpClassic() {
86
91
  const configuration = await core_3.Configuration.find(this.context.cwd, this.context.plugins);
92
+ if (this.noTimeGate)
93
+ configuration.useWithSource(`<cli>`, { npmMinimalAgeGate: `0` }, configuration.startingCwd, { overwrite: true });
87
94
  const { project, workspace } = await core_2.Project.find(configuration, this.context.cwd);
88
95
  const cache = await core_3.Cache.find(configuration);
89
96
  if (!workspace)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yarnpkg/plugin-essentials",
3
- "version": "4.5.0",
3
+ "version": "4.6.0",
4
4
  "license": "BSD-2-Clause",
5
5
  "main": "./lib/index.js",
6
6
  "exports": {
@@ -20,15 +20,15 @@
20
20
  "typanion": "^3.14.0"
21
21
  },
22
22
  "peerDependencies": {
23
- "@yarnpkg/cli": "^4.14.0",
24
- "@yarnpkg/core": "^4.7.0",
23
+ "@yarnpkg/cli": "^4.15.0",
24
+ "@yarnpkg/core": "^4.8.0",
25
25
  "@yarnpkg/plugin-git": "^3.2.0"
26
26
  },
27
27
  "devDependencies": {
28
28
  "@types/micromatch": "^4.0.1",
29
29
  "@types/semver": "^7.1.0",
30
- "@yarnpkg/cli": "^4.14.0",
31
- "@yarnpkg/core": "^4.7.0",
30
+ "@yarnpkg/cli": "^4.15.0",
31
+ "@yarnpkg/core": "^4.8.0",
32
32
  "@yarnpkg/plugin-git": "^3.2.0"
33
33
  },
34
34
  "repository": {