@pnp/cli-microsoft365 11.8.0-beta.6d1d954 → 11.8.0-beta.90f5865

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.
@@ -624,7 +624,7 @@ export const versions = {
624
624
  fix: 'npm i -g yo@7'
625
625
  }
626
626
  },
627
- '1.23.0-rc.0': {
627
+ '1.23.0': {
628
628
  heft: {
629
629
  range: '^1',
630
630
  fix: 'npm i -g @rushstack/heft@1'
@@ -16,4 +16,4 @@ export default [
16
16
  new FN002022_DEVDEP_typescript('~5.8.0'),
17
17
  new FN021001_PKG_spfx_deps_versions_match_project_version(true)
18
18
  ];
19
- //# sourceMappingURL=doctor-1.23.0-rc.0.js.map
19
+ //# sourceMappingURL=doctor-1.23.0.js.map
@@ -77,7 +77,7 @@ class SpfxProjectDoctorCommand extends BaseProjectCommand {
77
77
  '1.22.0',
78
78
  '1.22.1',
79
79
  '1.22.2',
80
- '1.23.0-rc.0'
80
+ '1.23.0'
81
81
  ];
82
82
  __classPrivateFieldGet(this, _SpfxProjectDoctorCommand_instances, "m", _SpfxProjectDoctorCommand_initTelemetry).call(this);
83
83
  __classPrivateFieldGet(this, _SpfxProjectDoctorCommand_instances, "m", _SpfxProjectDoctorCommand_initOptions).call(this);
@@ -1,7 +1,7 @@
1
1
  import { DependencyRule } from "./DependencyRule.js";
2
2
  export class FN002035_DEVDEP_types_heft_jest extends DependencyRule {
3
- constructor(packageVersion) {
4
- super('@types/heft-jest', packageVersion, true);
3
+ constructor(packageVersion, add = true) {
4
+ super('@types/heft-jest', packageVersion, true, false, add);
5
5
  }
6
6
  get id() {
7
7
  return 'FN002035';
@@ -0,0 +1,10 @@
1
+ import { DependencyRule } from "./DependencyRule.js";
2
+ export class FN002036_DEVDEP_types_jest extends DependencyRule {
3
+ constructor(packageVersion) {
4
+ super('@types/jest', packageVersion, true);
5
+ }
6
+ get id() {
7
+ return 'FN002036';
8
+ }
9
+ }
10
+ //# sourceMappingURL=FN002036_DEVDEP_types_jest.js.map
@@ -6,5 +6,28 @@ export class FN027001_OVERRIDES_rushstack_heft extends DependencyRule {
6
6
  get id() {
7
7
  return 'FN027001';
8
8
  }
9
+ visit(project, findings) {
10
+ // If an override entry for the package already exists in package.json,
11
+ // emit an extra finding to remove the existing override first. This avoids
12
+ // having to use a separate remove-override rule (e.g. FN027002) in the upgrade scripts.
13
+ if (project.packageJson?.overrides?.[this.packageName] &&
14
+ project.packageJson.overrides[this.packageName] !== this.packageVersion) {
15
+ const node = this.getAstNodeFromFile(project.packageJson, `overrides.${this.packageName}`);
16
+ findings.push({
17
+ id: `${this.id}_REMOVE`,
18
+ title: this.packageName,
19
+ description: `Remove existing SharePoint Framework override dependency package ${this.packageName}`,
20
+ occurrences: [{
21
+ file: this.file,
22
+ resolution: `removeOverride overrides.${this.packageName}`,
23
+ position: this.getPositionFromNode(node)
24
+ }],
25
+ resolutionType: 'cmd',
26
+ severity: 'Required',
27
+ supersedes: []
28
+ });
29
+ }
30
+ super.visit(project, findings);
31
+ }
9
32
  }
10
33
  //# sourceMappingURL=FN027001_OVERRIDES_rushstack_heft.js.map
@@ -28,39 +28,43 @@ import { FN002030_DEVDEP_microsoft_spfx_web_build_rig } from './rules/FN002030_D
28
28
  import { FN002031_DEVDEP_rushstack_heft } from './rules/FN002031_DEVDEP_rushstack_heft.js';
29
29
  import { FN002032_DEVDEP_typescript_eslint_parser } from './rules/FN002032_DEVDEP_typescript_eslint_parser.js';
30
30
  import { FN002034_DEVDEP_microsoft_spfx_heft_plugins } from './rules/FN002034_DEVDEP_microsoft_spfx_heft_plugins.js';
31
+ import { FN002035_DEVDEP_types_heft_jest } from './rules/FN002035_DEVDEP_types_heft_jest.js';
32
+ import { FN002036_DEVDEP_types_jest } from './rules/FN002036_DEVDEP_types_jest.js';
31
33
  import { FN010001_YORC_version } from './rules/FN010001_YORC_version.js';
32
34
  import { FN015008_FILE_eslintrc_js } from './rules/FN015008_FILE_eslintrc_js.js';
33
35
  import { FN015016_FILE_eslint_config_js } from './rules/FN015016_FILE_eslint_config_js.js';
36
+ import { FN022001_SCSS_remove_fabric_react } from './rules/FN022001_SCSS_remove_fabric_react.js';
37
+ import { FN022002_SCSS_add_fabric_react } from './rules/FN022002_SCSS_add_fabric_react.js';
34
38
  import { FN027001_OVERRIDES_rushstack_heft } from './rules/FN027001_OVERRIDES_rushstack_heft.js';
35
39
  export default [
36
- new FN001001_DEP_microsoft_sp_core_library('1.23.0-rc.0'),
37
- new FN001002_DEP_microsoft_sp_lodash_subset('1.23.0-rc.0'),
38
- new FN001003_DEP_microsoft_sp_office_ui_fabric_core('1.23.0-rc.0'),
39
- new FN001004_DEP_microsoft_sp_webpart_base('1.23.0-rc.0'),
40
- new FN001011_DEP_microsoft_sp_dialog('1.23.0-rc.0'),
41
- new FN001012_DEP_microsoft_sp_application_base('1.23.0-rc.0'),
42
- new FN001014_DEP_microsoft_sp_listview_extensibility('1.23.0-rc.0'),
43
- new FN001021_DEP_microsoft_sp_property_pane('1.23.0-rc.0'),
44
- new FN001023_DEP_microsoft_sp_component_base('1.23.0-rc.0'),
45
- new FN001024_DEP_microsoft_sp_diagnostics('1.23.0-rc.0'),
46
- new FN001025_DEP_microsoft_sp_dynamic_data('1.23.0-rc.0'),
47
- new FN001026_DEP_microsoft_sp_extension_base('1.23.0-rc.0'),
48
- new FN001027_DEP_microsoft_sp_http('1.23.0-rc.0'),
49
- new FN001028_DEP_microsoft_sp_list_subscription('1.23.0-rc.0'),
50
- new FN001029_DEP_microsoft_sp_loader('1.23.0-rc.0'),
51
- new FN001030_DEP_microsoft_sp_module_interfaces('1.23.0-rc.0'),
52
- new FN001031_DEP_microsoft_sp_odata_types('1.23.0-rc.0'),
53
- new FN001032_DEP_microsoft_sp_page_context('1.23.0-rc.0'),
54
- new FN001013_DEP_microsoft_decorators('1.23.0-rc.0'),
55
- new FN001034_DEP_microsoft_sp_adaptive_card_extension_base('1.23.0-rc.0'),
56
- new FN002002_DEVDEP_microsoft_sp_module_interfaces('1.23.0-rc.0'),
57
- new FN002022_DEVDEP_microsoft_eslint_plugin_spfx('1.23.0-rc.0'),
58
- new FN002023_DEVDEP_microsoft_eslint_config_spfx('1.23.0-rc.0'),
59
- new FN002030_DEVDEP_microsoft_spfx_web_build_rig('1.23.0-rc.0'),
60
- new FN002034_DEVDEP_microsoft_spfx_heft_plugins('1.23.0-rc.0'),
61
- new FN010001_YORC_version('1.23.0-rc.0'),
62
- new FN002031_DEVDEP_rushstack_heft('1.2.7'),
63
- new FN027001_OVERRIDES_rushstack_heft('1.2.7'),
40
+ new FN001001_DEP_microsoft_sp_core_library('1.23.0'),
41
+ new FN001002_DEP_microsoft_sp_lodash_subset('1.23.0'),
42
+ new FN001003_DEP_microsoft_sp_office_ui_fabric_core('1.23.0'),
43
+ new FN001004_DEP_microsoft_sp_webpart_base('1.23.0'),
44
+ new FN001011_DEP_microsoft_sp_dialog('1.23.0'),
45
+ new FN001012_DEP_microsoft_sp_application_base('1.23.0'),
46
+ new FN001014_DEP_microsoft_sp_listview_extensibility('1.23.0'),
47
+ new FN001021_DEP_microsoft_sp_property_pane('1.23.0'),
48
+ new FN001023_DEP_microsoft_sp_component_base('1.23.0'),
49
+ new FN001024_DEP_microsoft_sp_diagnostics('1.23.0'),
50
+ new FN001025_DEP_microsoft_sp_dynamic_data('1.23.0'),
51
+ new FN001026_DEP_microsoft_sp_extension_base('1.23.0'),
52
+ new FN001027_DEP_microsoft_sp_http('1.23.0'),
53
+ new FN001028_DEP_microsoft_sp_list_subscription('1.23.0'),
54
+ new FN001029_DEP_microsoft_sp_loader('1.23.0'),
55
+ new FN001030_DEP_microsoft_sp_module_interfaces('1.23.0'),
56
+ new FN001031_DEP_microsoft_sp_odata_types('1.23.0'),
57
+ new FN001032_DEP_microsoft_sp_page_context('1.23.0'),
58
+ new FN001013_DEP_microsoft_decorators('1.23.0'),
59
+ new FN001034_DEP_microsoft_sp_adaptive_card_extension_base('1.23.0'),
60
+ new FN002002_DEVDEP_microsoft_sp_module_interfaces('1.23.0'),
61
+ new FN002022_DEVDEP_microsoft_eslint_plugin_spfx('1.23.0'),
62
+ new FN002023_DEVDEP_microsoft_eslint_config_spfx('1.23.0'),
63
+ new FN002030_DEVDEP_microsoft_spfx_web_build_rig('1.23.0'),
64
+ new FN002034_DEVDEP_microsoft_spfx_heft_plugins('1.23.0'),
65
+ new FN010001_YORC_version('1.23.0'),
66
+ new FN002031_DEVDEP_rushstack_heft('1.2.17'),
67
+ new FN027001_OVERRIDES_rushstack_heft('1.2.17'),
64
68
  new FN002025_DEVDEP_eslint_plugin_react_hooks('5.2.0'),
65
69
  new FN002024_DEVDEP_eslint('9.37.0'),
66
70
  new FN015016_FILE_eslint_config_js(true, `const spfxProfile = require('@microsoft/eslint-config-spfx/lib/flat-profiles/react');
@@ -79,6 +83,10 @@ module.exports = [
79
83
  ];`),
80
84
  new FN015008_FILE_eslintrc_js(false),
81
85
  new FN002021_DEVDEP_rushstack_eslint_config('4.5.2', false),
82
- new FN002032_DEVDEP_typescript_eslint_parser('8.46.2', false)
86
+ new FN002032_DEVDEP_typescript_eslint_parser('8.46.2', false),
87
+ new FN002035_DEVDEP_types_heft_jest('1.0.2', false),
88
+ new FN002036_DEVDEP_types_jest('30.0.0'),
89
+ new FN022001_SCSS_remove_fabric_react('~@fluentui/react/dist/sass/References.scss'),
90
+ new FN022002_SCSS_add_fabric_react('pkg:@fluentui/react/dist/sass/References.scss')
83
91
  ];
84
- //# sourceMappingURL=upgrade-1.23.0-rc.0.js.map
92
+ //# sourceMappingURL=upgrade-1.23.0.js.map
@@ -1,8 +1,8 @@
1
1
  import fs from 'fs';
2
2
  import os from 'os';
3
3
  import path from 'path';
4
- // uncomment to support upgrading to preview releases
5
- import { prerelease } from 'semver';
4
+ // Uncomment to support upgrading to preview releases
5
+ // import { prerelease } from 'semver';
6
6
  import { z } from 'zod';
7
7
  import { CommandError, globalOptionsZod } from '../../../../Command.js';
8
8
  import { fsUtil } from '../../../../utils/fsUtil.js';
@@ -86,7 +86,7 @@ class SpfxProjectUpgradeCommand extends BaseProjectCommand {
86
86
  '1.22.0',
87
87
  '1.22.1',
88
88
  '1.22.2',
89
- '1.23.0-rc.0'
89
+ '1.23.0'
90
90
  ];
91
91
  }
92
92
  async commandAction(logger, args) {
@@ -95,16 +95,16 @@ class SpfxProjectUpgradeCommand extends BaseProjectCommand {
95
95
  throw new CommandError(`Couldn't find project root folder`, SpfxProjectUpgradeCommand.ERROR_NO_PROJECT_ROOT_FOLDER);
96
96
  }
97
97
  this.toVersion = args.options.toVersion ? args.options.toVersion : this.supportedVersions[this.supportedVersions.length - 1];
98
- // uncomment to support upgrading to preview releases
99
- if (!args.options.toVersion &&
100
- !args.options.preview &&
101
- prerelease(this.toVersion)) {
102
- // no version and no preview specified while the current version to
103
- // upgrade to is a prerelease so let's grab the first non-preview version
104
- // since we're supporting only one preview version, it's sufficient for
105
- // us to take second to last version
106
- this.toVersion = this.supportedVersions[this.supportedVersions.length - 2];
107
- }
98
+ // Uncomment to support upgrading to preview releases
99
+ // if (!args.options.toVersion &&
100
+ // !args.options.preview &&
101
+ // prerelease(this.toVersion)) {
102
+ // // no version and no preview specified while the current version to
103
+ // // upgrade to is a prerelease so let's grab the first non-preview version
104
+ // // since we're supporting only one preview version, it's sufficient for
105
+ // // us to take second to last version
106
+ // this.toVersion = this.supportedVersions[this.supportedVersions.length - 2];
107
+ // }
108
108
  this.packageManager = args.options.packageManager || 'npm';
109
109
  this.shell = args.options.shell || 'powershell';
110
110
  if (this.supportedVersions.indexOf(this.toVersion) < 0) {
@@ -2,6 +2,7 @@ const packageCommands = {
2
2
  npm: {
3
3
  install: 'npm i -SE',
4
4
  installDev: 'npm i -DE',
5
+ installLockFile: 'npm i',
5
6
  uninstall: 'npm un -S',
6
7
  uninstallDev: 'npm un -D',
7
8
  override: 'npm pkg set',
@@ -10,6 +11,7 @@ const packageCommands = {
10
11
  pnpm: {
11
12
  install: 'pnpm i -E',
12
13
  installDev: 'pnpm i -DE',
14
+ installLockFile: 'pnpm i',
13
15
  uninstall: 'pnpm un',
14
16
  uninstallDev: 'pnpm un',
15
17
  override: 'pnpm pkg set',
@@ -56,16 +58,18 @@ export const packageManager = {
56
58
  },
57
59
  reducePackageManagerCommand({ packagesDepExact, packagesDevExact, packagesDepUn, packagesDevUn, packagesOverride, packagesOverrideRemove, packageMgr }) {
58
60
  const commandsToExecute = [];
59
- // override commands must come first to ensure that install/uninstall operations
60
- // use the correct package version when an override is added or removed for a
61
- // package that is being updated, installed, or uninstalled
61
+ // removeOverride comes first to clear stale overrides before any install/uninstall
62
62
  // uninstall commands must come before install commands otherwise there is a
63
63
  // chance that whatever we recommended to install will be immediately uninstalled
64
+ // override (add) comes last so it is applied after all
65
+ // install/uninstall operations have completed
64
66
  if (packagesOverrideRemove.length > 0) {
65
67
  commandsToExecute.push(`${packageManager.getPackageManagerCommand('removeOverride', packageMgr)} ${packagesOverrideRemove.join(' ')}`);
66
- }
67
- if (packagesOverride.length > 0) {
68
- commandsToExecute.push(`${packageManager.getPackageManagerCommand('override', packageMgr)} ${packagesOverride.join(' ')}`);
68
+ // removeOverride only updates package.json; run a plain install to update the lock file
69
+ // only needed when no other install/uninstall commands will already update the lock file
70
+ if (packagesDepUn.length === 0 && packagesDevUn.length === 0 && packagesDepExact.length === 0 && packagesDevExact.length === 0 && packagesOverride.length === 0) {
71
+ commandsToExecute.push(packageManager.getPackageManagerCommand('installLockFile', packageMgr));
72
+ }
69
73
  }
70
74
  if (packagesDepUn.length > 0) {
71
75
  commandsToExecute.push(`${packageManager.getPackageManagerCommand('uninstall', packageMgr)} ${packagesDepUn.join(' ')}`);
@@ -79,6 +83,11 @@ export const packageManager = {
79
83
  if (packagesDevExact.length > 0) {
80
84
  commandsToExecute.push(`${packageManager.getPackageManagerCommand('installDev', packageMgr)} ${packagesDevExact.join(' ')}`);
81
85
  }
86
+ if (packagesOverride.length > 0) {
87
+ commandsToExecute.push(`${packageManager.getPackageManagerCommand('override', packageMgr)} ${packagesOverride.join(' ')}`);
88
+ // override only updates package.json; run a plain install to update the lock file
89
+ commandsToExecute.push(packageManager.getPackageManagerCommand('installLockFile', packageMgr));
90
+ }
82
91
  return commandsToExecute;
83
92
  }
84
93
  };
@@ -45,7 +45,7 @@ m365 spfx project upgrade [options]
45
45
 
46
46
  ## Remarks
47
47
 
48
- The `spfx project upgrade` command helps you upgrade your SharePoint Framework project to the specified version. If no version is specified, the command will upgrade to the latest version of the SharePoint Framework it supports (v1.23.0-rc.0).
48
+ The `spfx project upgrade` command helps you upgrade your SharePoint Framework project to the specified version. If no version is specified, the command will upgrade to the latest version of the SharePoint Framework it supports (v1.23.0).
49
49
 
50
50
  This command doesn't change your project files. Instead, it gives you a report with all steps necessary to upgrade your project to the specified version of the SharePoint Framework. Changing project files is error-prone, especially when it comes to updating your solution's code. This is why at this moment, this command produces a report that you can use yourself to perform the necessary updates and verify that everything is working as expected.
51
51