@microsoft/generator-sharepoint 1.21.0 → 1.22.0-beta.1

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.
Files changed (41) hide show
  1. package/lib/common/BaseGenerator.js +16 -7
  2. package/lib/common/ConfigJsonManager.js +1 -1
  3. package/lib/common/JsonManager.js +1 -1
  4. package/lib/common/PackageJsonManager.js +16 -1
  5. package/lib/common/PackageSolutionJsonManager.js +1 -1
  6. package/lib/common/ServeJsonManager.js +1 -1
  7. package/lib/common/TeamsManifestJsonManager.js +1 -1
  8. package/lib/common/YeomanConfiguration.js +6 -6
  9. package/lib/common/dependencies.json +66 -63
  10. package/lib/common/spsay.js +6 -6
  11. package/lib/common/utilities.js +1 -1
  12. package/lib/generators/adaptiveCardExtension/BaseAdaptiveCardExtensionGenerator.js +1 -1
  13. package/lib/generators/adaptiveCardExtension/index.js +1 -1
  14. package/lib/generators/app/index.js +15 -6
  15. package/lib/generators/applicationCustomizer/index.js +1 -1
  16. package/lib/generators/commandSet/index.js +1 -1
  17. package/lib/generators/component/BaseComponentGenerator.js +1 -1
  18. package/lib/generators/component/index.js +1 -1
  19. package/lib/generators/dataVisualizationAdaptiveCardExtension/index.js +1 -1
  20. package/lib/generators/dataVisualizationAdaptiveCardExtension/templates/none/{componentClassName}.ts +2 -2
  21. package/lib/generators/extension/BaseExtensionGenerator.js +1 -1
  22. package/lib/generators/extension/index.js +1 -1
  23. package/lib/generators/fieldCustomizer/index.js +1 -1
  24. package/lib/generators/formCustomizer/index.js +1 -1
  25. package/lib/generators/genericAdaptiveCardExtension/index.js +1 -1
  26. package/lib/generators/genericAdaptiveCardExtension/templates/none/{componentClassName}.ts +2 -2
  27. package/lib/generators/library/index.js +1 -1
  28. package/lib/generators/searchAdaptiveCardExtension/index.js +1 -1
  29. package/lib/generators/searchAdaptiveCardExtension/templates/none/{componentClassName}.ts +2 -2
  30. package/lib/generators/searchQueryModifier/index.js +1 -1
  31. package/lib/generators/solution/heft.package.json +3 -1
  32. package/lib/generators/solution/index.js +20 -19
  33. package/lib/generators/solution/templates/base/README.md +1 -1
  34. package/lib/generators/solution/templates/base/_gitignore +4 -0
  35. package/lib/generators/solution/templates/heft/config/heft.json +41 -0
  36. package/lib/generators/solution/templates/heft/config/jest.config.json +57 -0
  37. package/lib/generators/solution/templates/heft/config/sass.json +5 -0
  38. package/lib/generators/solution/templates/heft/config/typescript.json +2 -14
  39. package/lib/generators/webpart/index.js +1 -1
  40. package/package.json +12 -11
  41. /package/lib/generators/solution/templates/{base → gulp}/config/sass.json +0 -0
@@ -158,6 +158,9 @@ class BaseGenerator extends _yeomangenerator.default {
158
158
  this._addResolutionsIfApplicable([
159
159
  '@types/react'
160
160
  ]);
161
+ this._addOverridesIfApplicable([
162
+ '@rushstack/heft'
163
+ ]);
161
164
  }
162
165
  nameIsDependencyGroup(name) {
163
166
  const dependenciesByDependencyGroup = this._ensureDependenciesByDependencyGroup();
@@ -191,13 +194,19 @@ class BaseGenerator extends _yeomangenerator.default {
191
194
  }
192
195
  });
193
196
  }
197
+ _addOverridesIfApplicable(packages) {
198
+ for (const packageName of packages){
199
+ let packageVersion;
200
+ if (packageVersion = this.packageJsonManager.mergedDependencies[packageName]) {
201
+ this.packageJsonManager.addOverride(packageName, packageVersion);
202
+ }
203
+ }
204
+ }
194
205
  _addResolutionsIfApplicable(packages) {
195
- if (this.packageJsonManager.data.dependencies) {
196
- for (const packageName of packages){
197
- let packageVersion;
198
- if (packageVersion = this.packageJsonManager.data.dependencies[packageName]) {
199
- this.packageJsonManager.addResolution(packageName, packageVersion);
200
- }
206
+ for (const packageName of packages){
207
+ let packageVersion;
208
+ if (packageVersion = this.packageJsonManager.mergedDependencies[packageName]) {
209
+ this.packageJsonManager.addResolution(packageName, packageVersion);
201
210
  }
202
211
  }
203
212
  }
@@ -272,4 +281,4 @@ class BaseGenerator extends _yeomangenerator.default {
272
281
  _define_property(BaseGenerator, "generatorPackageJson", _nodecorelibrary.JsonFile.load(`${__dirname}/../../package.json`));
273
282
  _define_property(BaseGenerator, "_hasCheckedForUpdates", false);
274
283
 
275
- //#sourceMappingUrl=./BaseGenerator.js.map
284
+ //# sourceMappingURL=./BaseGenerator.js.map
@@ -105,4 +105,4 @@ class ConfigJsonManager extends _JsonManager.JsonManager {
105
105
  }
106
106
  _define_property(ConfigJsonManager, "_instance", void 0);
107
107
 
108
- //#sourceMappingUrl=./ConfigJsonManager.js.map
108
+ //# sourceMappingURL=./ConfigJsonManager.js.map
@@ -91,4 +91,4 @@ class JsonManager {
91
91
  }
92
92
  }
93
93
 
94
- //#sourceMappingUrl=./JsonManager.js.map
94
+ //# sourceMappingURL=./JsonManager.js.map
@@ -63,7 +63,22 @@ class PackageJsonManager extends _JsonManager.JsonManager {
63
63
  }
64
64
  PackageJsonManager.instance.data.resolutions[dependency] = resolution;
65
65
  }
66
+ addOverride(dependency, version) {
67
+ if (!PackageJsonManager.instance.data.overrides) {
68
+ PackageJsonManager.instance.data.overrides = {};
69
+ }
70
+ PackageJsonManager.instance.data.overrides[dependency] = version;
71
+ }
72
+ get mergedDependencies() {
73
+ const dependencies = {
74
+ ...this.data.optionalDependencies,
75
+ ...this.data.peerDependencies,
76
+ ...this.data.devDependencies,
77
+ ...this.data.dependencies
78
+ };
79
+ return dependencies;
80
+ }
66
81
  }
67
82
  _define_property(PackageJsonManager, "_instance", void 0);
68
83
 
69
- //#sourceMappingUrl=./PackageJsonManager.js.map
84
+ //# sourceMappingURL=./PackageJsonManager.js.map
@@ -152,4 +152,4 @@ class PackageSolutionJsonManager extends _JsonManager.JsonManager {
152
152
  }
153
153
  _define_property(PackageSolutionJsonManager, "_instance", void 0);
154
154
 
155
- //#sourceMappingUrl=./PackageSolutionJsonManager.js.map
155
+ //# sourceMappingURL=./PackageSolutionJsonManager.js.map
@@ -110,4 +110,4 @@ class ServeJsonManager extends _JsonManager.JsonManager {
110
110
  }
111
111
  _define_property(ServeJsonManager, "_instance", void 0);
112
112
 
113
- //#sourceMappingUrl=./ServeJsonManager.js.map
113
+ //# sourceMappingURL=./ServeJsonManager.js.map
@@ -63,4 +63,4 @@ class TeamsManifestJsonManager extends _JsonManager.JsonManager {
63
63
  }
64
64
  _define_property(TeamsManifestJsonManager, "_instance", void 0);
65
65
 
66
- //#sourceMappingUrl=./TeamsManifestJsonManager.js.map
66
+ //# sourceMappingURL=./TeamsManifestJsonManager.js.map
@@ -29,7 +29,7 @@ const _strings = {
29
29
  libraryId: 'libraryId',
30
30
  environment: 'environment',
31
31
  packageManager: 'packageManager',
32
- useHeft: 'useHeft'
32
+ useGulp: 'useGulp'
33
33
  };
34
34
  class YeomanConfiguration {
35
35
  static setStore(yeomanConfiguration) {
@@ -65,13 +65,13 @@ class YeomanConfiguration {
65
65
  static set packageManager(value) {
66
66
  YeomanConfiguration._store.set(_strings.packageManager, value);
67
67
  }
68
- static get useHeft() {
69
- return YeomanConfiguration._store.get(_strings.useHeft);
68
+ static get useGulp() {
69
+ return YeomanConfiguration._store.get(_strings.useGulp);
70
70
  }
71
- static set useHeft(value) {
72
- YeomanConfiguration._store.set(_strings.useHeft, value);
71
+ static set useGulp(value) {
72
+ YeomanConfiguration._store.set(_strings.useGulp, value);
73
73
  }
74
74
  }
75
75
  _define_property(YeomanConfiguration, "_store", void 0);
76
76
 
77
- //#sourceMappingUrl=./YeomanConfiguration.js.map
77
+ //# sourceMappingURL=./YeomanConfiguration.js.map
@@ -2,30 +2,30 @@
2
2
  "adaptiveCardExtension": {
3
3
  "standard": {
4
4
  "dependencies": {
5
- "@microsoft/sp-core-library": "1.21.0",
6
- "@microsoft/sp-property-pane": "1.21.0",
7
- "@microsoft/sp-adaptive-card-extension-base": "1.21.0"
5
+ "@microsoft/sp-core-library": "1.22.0-beta.1",
6
+ "@microsoft/sp-property-pane": "1.22.0-beta.1",
7
+ "@microsoft/sp-adaptive-card-extension-base": "1.22.0-beta.1"
8
8
  },
9
9
  "devDependencies": {
10
- "@microsoft/sp-module-interfaces": "1.21.0"
10
+ "@microsoft/sp-module-interfaces": "1.22.0-beta.1"
11
11
  }
12
12
  },
13
13
  "plusBeta": {
14
14
  "dependencies": {
15
- "@microsoft/sp-core-library": "1.21.0",
16
- "@microsoft/sp-property-pane": "1.21.0",
17
- "@microsoft/sp-adaptive-card-extension-base": "1.21.0"
15
+ "@microsoft/sp-core-library": "1.22.0-beta.1",
16
+ "@microsoft/sp-property-pane": "1.22.0-beta.1",
17
+ "@microsoft/sp-adaptive-card-extension-base": "1.22.0-beta.1"
18
18
  },
19
19
  "devDependencies": {
20
- "@microsoft/sp-module-interfaces": "1.21.0"
20
+ "@microsoft/sp-module-interfaces": "1.22.0-beta.1"
21
21
  }
22
22
  }
23
23
  },
24
24
  "applicationCustomizer": {
25
25
  "standard": {
26
26
  "dependencies": {
27
- "@microsoft/sp-dialog": "1.21.0",
28
- "@microsoft/sp-application-base": "1.21.0"
27
+ "@microsoft/sp-dialog": "1.22.0-beta.1",
28
+ "@microsoft/sp-application-base": "1.22.0-beta.1"
29
29
  }
30
30
  },
31
31
  "plusBeta": null
@@ -33,8 +33,8 @@
33
33
  "applicationCustomizerPlusBeta": {
34
34
  "standard": {
35
35
  "dependencies": {
36
- "@microsoft/sp-dialog": "1.21.0",
37
- "@microsoft/sp-application-base": "1.21.0"
36
+ "@microsoft/sp-dialog": "1.22.0-beta.1",
37
+ "@microsoft/sp-application-base": "1.22.0-beta.1"
38
38
  }
39
39
  },
40
40
  "plusBeta": null
@@ -42,8 +42,8 @@
42
42
  "commandSet": {
43
43
  "standard": {
44
44
  "dependencies": {
45
- "@microsoft/sp-listview-extensibility": "1.21.0",
46
- "@microsoft/sp-dialog": "1.21.0"
45
+ "@microsoft/sp-listview-extensibility": "1.22.0-beta.1",
46
+ "@microsoft/sp-dialog": "1.22.0-beta.1"
47
47
  }
48
48
  },
49
49
  "plusBeta": null
@@ -51,8 +51,8 @@
51
51
  "commandSetPlusBeta": {
52
52
  "standard": {
53
53
  "dependencies": {
54
- "@microsoft/sp-listview-extensibility": "1.21.0",
55
- "@microsoft/sp-dialog": "1.21.0"
54
+ "@microsoft/sp-listview-extensibility": "1.22.0-beta.1",
55
+ "@microsoft/sp-dialog": "1.22.0-beta.1"
56
56
  }
57
57
  },
58
58
  "plusBeta": null
@@ -60,27 +60,27 @@
60
60
  "extension": {
61
61
  "standard": {
62
62
  "dependencies": {
63
- "@microsoft/sp-core-library": "1.21.0",
64
- "@microsoft/decorators": "1.21.0"
63
+ "@microsoft/sp-core-library": "1.22.0-beta.1",
64
+ "@microsoft/decorators": "1.22.0-beta.1"
65
65
  },
66
66
  "devDependencies": {
67
- "@microsoft/sp-module-interfaces": "1.21.0"
67
+ "@microsoft/sp-module-interfaces": "1.22.0-beta.1"
68
68
  }
69
69
  },
70
70
  "plusBeta": {
71
71
  "dependencies": {
72
- "@microsoft/sp-core-library": "1.21.0",
73
- "@microsoft/decorators": "1.21.0"
72
+ "@microsoft/sp-core-library": "1.22.0-beta.1",
73
+ "@microsoft/decorators": "1.22.0-beta.1"
74
74
  },
75
75
  "devDependencies": {
76
- "@microsoft/sp-module-interfaces": "1.21.0"
76
+ "@microsoft/sp-module-interfaces": "1.22.0-beta.1"
77
77
  }
78
78
  }
79
79
  },
80
80
  "fieldCustomizer": {
81
81
  "standard": {
82
82
  "dependencies": {
83
- "@microsoft/sp-listview-extensibility": "1.21.0"
83
+ "@microsoft/sp-listview-extensibility": "1.22.0-beta.1"
84
84
  }
85
85
  },
86
86
  "plusBeta": null
@@ -88,7 +88,7 @@
88
88
  "fieldCustomizerPlusBeta": {
89
89
  "standard": {
90
90
  "dependencies": {
91
- "@microsoft/sp-listview-extensibility": "1.21.0"
91
+ "@microsoft/sp-listview-extensibility": "1.22.0-beta.1"
92
92
  }
93
93
  },
94
94
  "plusBeta": null
@@ -97,13 +97,13 @@
97
97
  "standard": {
98
98
  "dependencies": {},
99
99
  "devDependencies": {
100
- "@microsoft/sp-module-interfaces": "1.21.0"
100
+ "@microsoft/sp-module-interfaces": "1.22.0-beta.1"
101
101
  }
102
102
  },
103
103
  "plusBeta": {
104
104
  "dependencies": {},
105
105
  "devDependencies": {
106
- "@microsoft/sp-module-interfaces": "1.21.0"
106
+ "@microsoft/sp-module-interfaces": "1.22.0-beta.1"
107
107
  }
108
108
  }
109
109
  },
@@ -125,7 +125,7 @@
125
125
  "searchQueryModifier": {
126
126
  "standard": {
127
127
  "dependencies": {
128
- "@microsoft/sp-search-extensibility": "1.21.0"
128
+ "@microsoft/sp-search-extensibility": "1.22.0-beta.1"
129
129
  }
130
130
  },
131
131
  "plusBeta": null
@@ -133,7 +133,7 @@
133
133
  "searchQueryModifierPlusBeta": {
134
134
  "standard": {
135
135
  "dependencies": {
136
- "@microsoft/sp-search-extensibility": "1.21.0"
136
+ "@microsoft/sp-search-extensibility": "1.22.0-beta.1"
137
137
  }
138
138
  },
139
139
  "plusBeta": null
@@ -141,29 +141,29 @@
141
141
  "webpart": {
142
142
  "standard": {
143
143
  "dependencies": {
144
- "@microsoft/sp-core-library": "1.21.0",
145
- "@microsoft/sp-component-base": "1.21.0",
146
- "@microsoft/sp-property-pane": "1.21.0",
147
- "@microsoft/sp-webpart-base": "1.21.0",
148
- "@microsoft/sp-lodash-subset": "1.21.0",
149
- "@microsoft/sp-office-ui-fabric-core": "1.21.0"
144
+ "@microsoft/sp-core-library": "1.22.0-beta.1",
145
+ "@microsoft/sp-component-base": "1.22.0-beta.1",
146
+ "@microsoft/sp-property-pane": "1.22.0-beta.1",
147
+ "@microsoft/sp-webpart-base": "1.22.0-beta.1",
148
+ "@microsoft/sp-lodash-subset": "1.22.0-beta.1",
149
+ "@microsoft/sp-office-ui-fabric-core": "1.22.0-beta.1"
150
150
  },
151
151
  "devDependencies": {
152
- "@microsoft/sp-module-interfaces": "1.21.0",
152
+ "@microsoft/sp-module-interfaces": "1.22.0-beta.1",
153
153
  "@fluentui/react": "^8.106.4"
154
154
  }
155
155
  },
156
156
  "plusBeta": {
157
157
  "dependencies": {
158
- "@microsoft/sp-core-library": "1.21.0",
159
- "@microsoft/sp-component-base": "1.21.0",
160
- "@microsoft/sp-property-pane": "1.21.0",
161
- "@microsoft/sp-webpart-base": "1.21.0",
162
- "@microsoft/sp-lodash-subset": "1.21.0",
163
- "@microsoft/sp-office-ui-fabric-core": "1.21.0"
158
+ "@microsoft/sp-core-library": "1.22.0-beta.1",
159
+ "@microsoft/sp-component-base": "1.22.0-beta.1",
160
+ "@microsoft/sp-property-pane": "1.22.0-beta.1",
161
+ "@microsoft/sp-webpart-base": "1.22.0-beta.1",
162
+ "@microsoft/sp-lodash-subset": "1.22.0-beta.1",
163
+ "@microsoft/sp-office-ui-fabric-core": "1.22.0-beta.1"
164
164
  },
165
165
  "devDependencies": {
166
- "@microsoft/sp-module-interfaces": "1.21.0"
166
+ "@microsoft/sp-module-interfaces": "1.22.0-beta.1"
167
167
  }
168
168
  }
169
169
  },
@@ -173,14 +173,16 @@
173
173
  "tslib": "2.3.1"
174
174
  },
175
175
  "devDependencies": {
176
- "@microsoft/rush-stack-compiler-5.3": "0.1.0",
177
- "@rushstack/eslint-config": "4.0.1",
178
- "@microsoft/eslint-plugin-spfx": "1.21.0",
179
- "@microsoft/eslint-config-spfx": "1.21.0",
180
- "@microsoft/spfx-web-build-rig": "1.21.0",
181
- "@rushstack/heft": "0.71.0",
176
+ "@rushstack/eslint-config": "4.3.0",
177
+ "@microsoft/eslint-plugin-spfx": "1.22.0-beta.1",
178
+ "@microsoft/eslint-config-spfx": "1.22.0-beta.1",
179
+ "@microsoft/spfx-web-build-rig": "1.22.0-beta.1",
180
+ "@rushstack/heft": "0.73.6",
182
181
  "@types/webpack-env": "~1.15.2",
183
- "eslint": "8.57.1"
182
+ "@typescript-eslint/parser": "8.26.1",
183
+ "eslint": "8.57.1",
184
+ "jest-junit": "12.3.0",
185
+ "typescript": "5.3.3"
184
186
  }
185
187
  },
186
188
  "plusBeta": null
@@ -192,11 +194,12 @@
192
194
  },
193
195
  "devDependencies": {
194
196
  "@microsoft/rush-stack-compiler-5.3": "0.1.0",
195
- "@rushstack/eslint-config": "4.0.1",
196
- "@microsoft/eslint-plugin-spfx": "1.21.0",
197
- "@microsoft/eslint-config-spfx": "1.21.0",
198
- "@microsoft/sp-build-web": "1.21.0",
197
+ "@rushstack/eslint-config": "4.3.0",
198
+ "@microsoft/eslint-plugin-spfx": "1.22.0-beta.1",
199
+ "@microsoft/eslint-config-spfx": "1.22.0-beta.1",
200
+ "@microsoft/sp-build-web": "1.22.0-beta.1",
199
201
  "@types/webpack-env": "~1.15.2",
202
+ "@typescript-eslint/parser": "8.26.1",
200
203
  "ajv": "^6.12.5",
201
204
  "eslint": "8.57.1",
202
205
  "gulp": "4.0.2",
@@ -211,24 +214,24 @@
211
214
  "formCustomizer": {
212
215
  "standard": {
213
216
  "dependencies": {
214
- "@microsoft/sp-core-library": "1.21.0",
215
- "@microsoft/sp-listview-extensibility": "1.21.0",
216
- "@microsoft/sp-lodash-subset": "1.21.0",
217
- "@microsoft/sp-office-ui-fabric-core": "1.21.0"
217
+ "@microsoft/sp-core-library": "1.22.0-beta.1",
218
+ "@microsoft/sp-listview-extensibility": "1.22.0-beta.1",
219
+ "@microsoft/sp-lodash-subset": "1.22.0-beta.1",
220
+ "@microsoft/sp-office-ui-fabric-core": "1.22.0-beta.1"
218
221
  },
219
222
  "devDependencies": {
220
- "@microsoft/sp-module-interfaces": "1.21.0"
223
+ "@microsoft/sp-module-interfaces": "1.22.0-beta.1"
221
224
  }
222
225
  },
223
226
  "plusBeta": {
224
227
  "dependencies": {
225
- "@microsoft/sp-core-library": "1.21.0",
226
- "@microsoft/sp-listview-extensibility": "1.21.0",
227
- "@microsoft/sp-lodash-subset": "1.21.0",
228
- "@microsoft/sp-office-ui-fabric-core": "1.21.0"
228
+ "@microsoft/sp-core-library": "1.22.0-beta.1",
229
+ "@microsoft/sp-listview-extensibility": "1.22.0-beta.1",
230
+ "@microsoft/sp-lodash-subset": "1.22.0-beta.1",
231
+ "@microsoft/sp-office-ui-fabric-core": "1.22.0-beta.1"
229
232
  },
230
233
  "devDependencies": {
231
- "@microsoft/sp-module-interfaces": "1.21.0"
234
+ "@microsoft/sp-module-interfaces": "1.22.0-beta.1"
232
235
  }
233
236
  }
234
237
  }
@@ -32,16 +32,16 @@ function times(n, character) {
32
32
  function space(n) {
33
33
  return times(n, ' ');
34
34
  }
35
- function getWords(solutionName, useHeft) {
35
+ function getWords(solutionName, useGulp) {
36
36
  const words = [
37
37
  `Congratulations!`,
38
38
  `Solution ${solutionName} is created.`,
39
- `Run ${useHeft ? 'npm run start' : 'gulp serve'} to play with it!`
39
+ `Run ${useGulp ? 'gulp serve' : 'npm run start'} to play with it!`
40
40
  ];
41
41
  const colorWords = [
42
42
  `Congratulations!`,
43
43
  `Solution ${_colors.default.cyan(solutionName)} is created.`,
44
- `Run ${_colors.default.yellow(useHeft ? 'npm run start' : 'gulp serve')} to play with it!`
44
+ `Run ${_colors.default.yellow(useGulp ? 'gulp serve' : 'npm run start')} to play with it!`
45
45
  ];
46
46
  const maxLength = Math.max.apply(undefined, words.map((word)=>word.length));
47
47
  const formatted = colorWords.map((word, index)=>{
@@ -59,11 +59,11 @@ function getWords(solutionName, useHeft) {
59
59
  ]);
60
60
  return wrapped;
61
61
  }
62
- function spsay(solutionName, useHeft) {
62
+ function spsay(solutionName, useGulp) {
63
63
  const colorLogo = logo.map((line)=>_colors.default.cyan(line));
64
- const words = getWords(solutionName, useHeft);
64
+ const words = getWords(solutionName, useGulp);
65
65
  const lines = _lodash.default.zip(colorLogo, words).map((parts)=>parts.join(''));
66
66
  return '\n' + lines.join('\n') + '\n';
67
67
  }
68
68
 
69
- //#sourceMappingUrl=./spsay.js.map
69
+ //# sourceMappingURL=./spsay.js.map
@@ -144,4 +144,4 @@ function compose(generator, base, options) {
144
144
  }), options);
145
145
  }
146
146
 
147
- //#sourceMappingUrl=./utilities.js.map
147
+ //# sourceMappingURL=./utilities.js.map
@@ -99,4 +99,4 @@ class BaseACEGenerator extends _BaseComponentGenerator.BaseComponentGenerator {
99
99
  }
100
100
  }
101
101
 
102
- //#sourceMappingUrl=./BaseAdaptiveCardExtensionGenerator.js.map
102
+ //# sourceMappingURL=./BaseAdaptiveCardExtensionGenerator.js.map
@@ -154,4 +154,4 @@ module.exports = AdaptiveCardExtensionSelectorGenerator;
154
154
  module.exports.defineOptions = defineOptions;
155
155
  module.exports.composeWith = composeWith;
156
156
 
157
- //#sourceMappingUrl=./index.js.map
157
+ //# sourceMappingURL=./index.js.map
@@ -109,6 +109,17 @@ function composeWith(base, options) {
109
109
  this.env.cwd = this.destinationRoot();
110
110
  this.config.set('whichFolder', 'subdir');
111
111
  }
112
+ // check that we aren't attempting to use Gulp with a Heft solution (or vice versa)
113
+ if (this.options.useGulp) {
114
+ // check that the solution is a gulp solution// check the old option
115
+ if (this.config.get('useHeft') || this.config.get('useGulp') === false) {
116
+ throw new Error('Cannot use the --use-gulp flag as this solution was previously generated with Heft tooling.');
117
+ }
118
+ } else {
119
+ if (this.config.get('useHeft') === false || this.config.get('useGulp')) {
120
+ throw new Error('Cannot generate using Heft tooling as this project was previously generated using Gulp. Please use --use-gulp flag.');
121
+ }
122
+ }
112
123
  if (this.options.solutionName !== undefined) {
113
124
  this.config.set('solutionName', this.options.solutionName);
114
125
  }
@@ -127,9 +138,7 @@ function composeWith(base, options) {
127
138
  if (this.options.isDomainIsolated !== undefined) {
128
139
  this.config.set('isDomainIsolated', this.options.isDomainIsolated);
129
140
  }
130
- if (this.options.useHeft !== undefined) {
131
- this.config.set('useHeft', this.options.useHeft);
132
- }
141
+ this.config.set('useGulp', !!this.options.useGulp);
133
142
  if (this.options.componentType !== undefined) {
134
143
  this.config.set('componentType', this.options.componentType);
135
144
  } else {
@@ -201,8 +210,8 @@ function composeWith(base, options) {
201
210
  /* no-op */ }
202
211
  end() {
203
212
  const libraryName = _YeomanConfiguration.YeomanConfiguration.libraryName;
204
- const useHeft = _YeomanConfiguration.YeomanConfiguration.useHeft;
205
- this.log((0, _spsay.default)(libraryName, useHeft));
213
+ const useGulp = _YeomanConfiguration.YeomanConfiguration.useGulp;
214
+ this.log((0, _spsay.default)(libraryName, useGulp));
206
215
  }
207
216
  _provideRetirementNote() {
208
217
  this.log(_colors.default.bold(`See ${_colors.default.underline(_colors.default.blue('https://aka.ms/spfx-yeoman-info'))} for more information on how to use this generator.`));
@@ -260,4 +269,4 @@ function composeWith(base, options) {
260
269
  module.exports = AppGenerator;
261
270
  module.exports.composeWith = composeWith;
262
271
 
263
- //#sourceMappingUrl=./index.js.map
272
+ //# sourceMappingURL=./index.js.map
@@ -141,4 +141,4 @@ module.exports = ApplicationCustomizerGenerator;
141
141
  module.exports.defineOptions = defineOptions;
142
142
  module.exports.composeWith = composeWith;
143
143
 
144
- //#sourceMappingUrl=./index.js.map
144
+ //# sourceMappingURL=./index.js.map
@@ -142,4 +142,4 @@ module.exports = CommandSetGenerator;
142
142
  module.exports.defineOptions = defineOptions;
143
143
  module.exports.composeWith = composeWith;
144
144
 
145
- //#sourceMappingUrl=./index.js.map
145
+ //# sourceMappingURL=./index.js.map
@@ -278,4 +278,4 @@ function normalizeComponentNames(componentNameUnescaped, componentType) {
278
278
  };
279
279
  }
280
280
 
281
- //#sourceMappingUrl=./BaseComponentGenerator.js.map
281
+ //# sourceMappingURL=./BaseComponentGenerator.js.map
@@ -178,4 +178,4 @@ module.exports = ComponentSelectorGenerator;
178
178
  module.exports.defineOptions = defineOptions;
179
179
  module.exports.composeWith = composeWith;
180
180
 
181
- //#sourceMappingUrl=./index.js.map
181
+ //# sourceMappingURL=./index.js.map
@@ -109,4 +109,4 @@ module.exports = DataVisualizationAdaptiveCardExtensionGenerator;
109
109
  module.exports.defineOptions = defineOptions;
110
110
  module.exports.composeWith = composeWith;
111
111
 
112
- //#sourceMappingUrl=./index.js.map
112
+ //# sourceMappingURL=./index.js.map
@@ -19,7 +19,7 @@ export default class <%= componentClassName %> extends BaseAdaptiveCardExtension
19
19
  I<%= componentClassName %>Props,
20
20
  I<%= componentClassName %>State
21
21
  > {
22
- private _deferredPropertyPane: <%= componentName %>PropertyPane;
22
+ private _deferredPropertyPane: <%= componentName %>PropertyPane | undefined;
23
23
 
24
24
  public onInit(): Promise<void> {
25
25
  this.state = { };
@@ -49,6 +49,6 @@ export default class <%= componentClassName %> extends BaseAdaptiveCardExtension
49
49
  }
50
50
 
51
51
  protected getPropertyPaneConfiguration(): IPropertyPaneConfiguration {
52
- return this._deferredPropertyPane?.getPropertyPaneConfiguration();
52
+ return this._deferredPropertyPane?.getPropertyPaneConfiguration() ?? super.getPropertyPaneConfiguration();
53
53
  }
54
54
  }
@@ -138,4 +138,4 @@ class BaseExtensionGenerator extends _BaseComponentGenerator.BaseComponentGenera
138
138
  }
139
139
  }
140
140
 
141
- //#sourceMappingUrl=./BaseExtensionGenerator.js.map
141
+ //# sourceMappingURL=./BaseExtensionGenerator.js.map
@@ -167,4 +167,4 @@ module.exports = ExtensionSelectorGenerator;
167
167
  module.exports.defineOptions = defineOptions;
168
168
  module.exports.composeWith = composeWith;
169
169
 
170
- //#sourceMappingUrl=./index.js.map
170
+ //# sourceMappingURL=./index.js.map
@@ -155,4 +155,4 @@ module.exports = FieldCustomizerGenerator;
155
155
  module.exports.defineOptions = defineOptions;
156
156
  module.exports.composeWith = composeWith;
157
157
 
158
- //#sourceMappingUrl=./index.js.map
158
+ //# sourceMappingURL=./index.js.map
@@ -186,4 +186,4 @@ module.exports = FormCustomizerGenerator;
186
186
  module.exports.defineOptions = defineOptions;
187
187
  module.exports.composeWith = composeWith;
188
188
 
189
- //#sourceMappingUrl=./index.js.map
189
+ //# sourceMappingURL=./index.js.map
@@ -142,4 +142,4 @@ module.exports = GenericAdaptiveCardExtensionGenerator;
142
142
  module.exports.defineOptions = defineOptions;
143
143
  module.exports.composeWith = composeWith;
144
144
 
145
- //#sourceMappingUrl=./index.js.map
145
+ //# sourceMappingURL=./index.js.map
@@ -18,7 +18,7 @@ export default class <%= componentClassName %> extends BaseAdaptiveCardExtension
18
18
  I<%= componentClassName %>Props,
19
19
  I<%= componentClassName %>State
20
20
  > {
21
- private _deferredPropertyPane: <%= componentName %>PropertyPane;
21
+ private _deferredPropertyPane: <%= componentName %>PropertyPane | undefined;
22
22
 
23
23
  public onInit(): Promise<void> {
24
24
  this.state = { };
@@ -48,6 +48,6 @@ export default class <%= componentClassName %> extends BaseAdaptiveCardExtension
48
48
  }
49
49
 
50
50
  protected getPropertyPaneConfiguration(): IPropertyPaneConfiguration {
51
- return this._deferredPropertyPane?.getPropertyPaneConfiguration();
51
+ return this._deferredPropertyPane?.getPropertyPaneConfiguration() ?? super.getPropertyPaneConfiguration();
52
52
  }
53
53
  }
@@ -138,4 +138,4 @@ module.exports = LibraryGenerator;
138
138
  module.exports.defineOptions = defineOptions;
139
139
  module.exports.composeWith = composeWith;
140
140
 
141
- //#sourceMappingUrl=./index.js.map
141
+ //# sourceMappingURL=./index.js.map
@@ -109,4 +109,4 @@ module.exports = SearchAdaptiveCardExtensionGenerator;
109
109
  module.exports.defineOptions = defineOptions;
110
110
  module.exports.composeWith = composeWith;
111
111
 
112
- //#sourceMappingUrl=./index.js.map
112
+ //# sourceMappingURL=./index.js.map
@@ -25,7 +25,7 @@ export default class <%= componentClassName %> extends BaseAdaptiveCardExtension
25
25
  I<%= componentClassName %>Props,
26
26
  I<%= componentClassName %>State
27
27
  > {
28
- private _deferredPropertyPane: <%= componentName %>PropertyPane;
28
+ private _deferredPropertyPane: <%= componentName %>PropertyPane | undefined;
29
29
 
30
30
  public onInit(): Promise<void> {
31
31
  this.state = { };
@@ -78,6 +78,6 @@ export default class <%= componentClassName %> extends BaseAdaptiveCardExtension
78
78
  }
79
79
 
80
80
  protected getPropertyPaneConfiguration(): IPropertyPaneConfiguration {
81
- return this._deferredPropertyPane?.getPropertyPaneConfiguration();
81
+ return this._deferredPropertyPane?.getPropertyPaneConfiguration() ?? super.getPropertyPaneConfiguration();
82
82
  }
83
83
  }
@@ -141,4 +141,4 @@ module.exports = SearchQueryModifierGenerator;
141
141
  module.exports.defineOptions = defineOptions;
142
142
  module.exports.composeWith = composeWith;
143
143
 
144
- //#sourceMappingUrl=./index.js.map
144
+ //# sourceMappingURL=./index.js.map
@@ -7,11 +7,13 @@
7
7
  },
8
8
  "scripts": {
9
9
  "build": "heft test --clean",
10
+ "test": "heft test",
10
11
  "clean": "heft clean",
11
12
  "deploy": "heft dev-deploy",
12
13
  "start": "heft start --clean",
13
14
  "build-watch": "heft build --lite",
14
15
  "package-solution": "heft package-solution",
15
- "deploy-azure-storage": "heft deploy-azure-storage"
16
+ "deploy-azure-storage": "heft deploy-azure-storage",
17
+ "eject-webpack": "heft eject-webpack"
16
18
  }
17
19
  }
@@ -103,9 +103,10 @@ function defineOptions(generator) {
103
103
  description: 'If specified, the solution will have permissions to access web APIs ' + 'that are unique not shared with other components in the tenant',
104
104
  type: Boolean
105
105
  });
106
- generator.option('use-heft', {
107
- description: 'If specified, the solution will build the project using Heft',
108
- type: Boolean
106
+ generator.option('use-gulp', {
107
+ description: 'If specified, the solution will build the project using the legacy Gulp tooling',
108
+ type: Boolean,
109
+ default: false
109
110
  });
110
111
  }
111
112
  class SolutionGenerator extends _BaseGenerator.BaseGenerator {
@@ -157,19 +158,19 @@ class SolutionGenerator extends _BaseGenerator.BaseGenerator {
157
158
  } else {
158
159
  isDomainIsolated = false;
159
160
  }
160
- // allows to set --use-heft false
161
- let useHeft = answers.useHeft;
162
- const useHeftConfig = this.config.get('useHeft');
163
- if (useHeftConfig !== undefined) {
164
- if (typeof useHeftConfig === 'string') {
165
- useHeft = useHeftConfig.toLowerCase() === 'true';
161
+ // allows to set --use-gulp false
162
+ let useGulp = false;
163
+ const useGulpConfig = this.config.get('useGulp');
164
+ if (useGulpConfig !== undefined) {
165
+ if (typeof useGulpConfig === 'string') {
166
+ useGulp = useGulpConfig.toLowerCase() === 'true';
166
167
  } else {
167
- useHeft = useHeftConfig;
168
+ useGulp = useGulpConfig;
168
169
  }
169
170
  }
170
171
  const isPlusBeta = this.config.get('plusBeta');
171
172
  this.context.solutionName = solutionName;
172
- this.context.useHeft = !!useHeft;
173
+ this.context.useGulp = useGulp;
173
174
  this.context.libraryName = _lodash.kebabCase(this.context.solutionName);
174
175
  this.context.libraryId = _utilities.generateGuid();
175
176
  this.context.solutionShortDescription = solutionShortDescription;
@@ -183,9 +184,9 @@ class SolutionGenerator extends _BaseGenerator.BaseGenerator {
183
184
  _YeomanConfiguration.YeomanConfiguration.libraryId = this.context.libraryId;
184
185
  _YeomanConfiguration.YeomanConfiguration.environment = environment;
185
186
  _YeomanConfiguration.YeomanConfiguration.packageManager = this.config.get('packageManager') || _YeomanConfiguration.YeomanConfiguration.packageManager || 'npm';
186
- _YeomanConfiguration.YeomanConfiguration.useHeft = !!useHeft;
187
+ _YeomanConfiguration.YeomanConfiguration.useGulp = useGulp;
187
188
  this.config.set('solutionName', solutionName);
188
- this.config.set('useHeft', useHeft);
189
+ this.config.set('useGulp', useGulp);
189
190
  this.config.set('environment', environment);
190
191
  this.config.set('solutionShortDescription', solutionShortDescription);
191
192
  this.config.set('skipFeatureDeployment', skipFeatureDeployment);
@@ -201,16 +202,16 @@ class SolutionGenerator extends _BaseGenerator.BaseGenerator {
201
202
  }
202
203
  configuring() {
203
204
  if (this._shouldExecute()) {
204
- const packageJsonTemplate = this.context.useHeft ? require('./heft.package.json') : require('./non-heft.package.json');
205
+ const packageJsonTemplate = !this.context.useGulp ? require('./heft.package.json') : require('./non-heft.package.json');
205
206
  if (this.packageJsonManager.data) {
206
207
  this.log(`Overwriting an existing "package.json"`);
207
208
  }
208
209
  packageJsonTemplate.name = this.context.libraryName;
209
210
  this.packageJsonManager.set(packageJsonTemplate);
210
- if (this.context.useHeft) {
211
- this.ensureDependencyGroup('useHeft');
212
- } else {
211
+ if (this.context.useGulp) {
213
212
  this.ensureDependencyGroup('useGulp');
213
+ } else {
214
+ this.ensureDependencyGroup('useHeft');
214
215
  }
215
216
  if (this.configJson.data) {
216
217
  this.log(`Overwriting an existing "config.json"`);
@@ -231,7 +232,7 @@ class SolutionGenerator extends _BaseGenerator.BaseGenerator {
231
232
  super.writing(false);
232
233
  const dest = this.destinationRoot();
233
234
  this.copyTemplate(_path.join(this.sourceRoot(), 'base'), dest);
234
- if (this.context.useHeft) {
235
+ if (!this.context.useGulp) {
235
236
  this.copyTemplate(_path.join(this.sourceRoot(), 'heft'), dest);
236
237
  } else {
237
238
  this.copyTemplate(_path.join(this.sourceRoot(), 'gulp'), dest);
@@ -268,4 +269,4 @@ module.exports = SolutionGenerator;
268
269
  module.exports.composeWith = composeWith;
269
270
  module.exports.defineOptions = defineOptions;
270
271
 
271
- //#sourceMappingUrl=./index.js.map
272
+ //# sourceMappingURL=./index.js.map
@@ -46,7 +46,7 @@ Short summary on functionality and used technologies.
46
46
  - Ensure that you are at the solution folder
47
47
  - in the command-line run:
48
48
  - **npm install**
49
- - **<% if(useHeft){ %>heft start<% } else { %>gulp serve<% } %>**
49
+ - **<% if(!useGulp){ %>npm run start<% } else { %>gulp serve<% } %>**
50
50
 
51
51
  > Include any additional steps as needed.
52
52
 
@@ -9,6 +9,10 @@ node_modules
9
9
  # Build generated files
10
10
  dist
11
11
  lib
12
+ lib-dts
13
+ lib-commonjs
14
+ lib-esm
15
+ jest-output
12
16
  release
13
17
  solution
14
18
  temp
@@ -0,0 +1,41 @@
1
+ {
2
+ "$schema": "https://developer.microsoft.com/json-schemas/heft/v0/heft.schema.json",
3
+
4
+ "extends": "@microsoft/spfx-web-build-rig/profiles/default/config/heft.json",
5
+
6
+ "phasesByName": {
7
+ "build": {
8
+ "tasksByName": {
9
+ // copies the localization js files to the lib folder
10
+ "copy-strings": {
11
+ "taskPlugin": {
12
+ "pluginPackage": "@rushstack/heft",
13
+ "pluginName": "copy-files-plugin",
14
+ "options": {
15
+ "copyOperations": [
16
+ {
17
+ "sourcePath": "./src",
18
+ "destinationFolders": ["./lib", "./lib-commonjs"],
19
+ "fileExtensions": [".js"]
20
+ }
21
+ ]
22
+ }
23
+ }
24
+ }
25
+ }
26
+ },
27
+ "eject-webpack": {
28
+ "tasksByName": {
29
+ "eject-webpack": {
30
+ "taskPlugin": {
31
+ "pluginPackage": "@rushstack/heft",
32
+ "pluginName": "run-script-plugin",
33
+ "options": {
34
+ "scriptPath": "node_modules/@microsoft/spfx-heft-plugins/lib-commonjs/plugins/ejectWebpackPlugin/EjectWebpackPlugin.js"
35
+ }
36
+ }
37
+ }
38
+ }
39
+ }
40
+ }
41
+ }
@@ -0,0 +1,57 @@
1
+ {
2
+ "extends": "@rushstack/heft-jest-plugin/includes/jest-shared.config.json",
3
+
4
+ "roots": ["<rootDir>/lib"],
5
+
6
+ "testMatch": ["<rootDir>/lib/**/*.test.js"],
7
+
8
+ "collectCoverageFrom": [
9
+ "lib/**/*.js",
10
+ "!lib/**/*.d.ts",
11
+ "!lib/**/*.test.js",
12
+ "!lib/**/test/**",
13
+ "!lib/**/__tests__/**",
14
+ "!lib/**/__fixtures__/**",
15
+ "!lib/**/__mocks__/**"
16
+ ],
17
+
18
+ "transformIgnorePatterns": ["[\\/]lib[\\/](.*)\\.js$"],
19
+
20
+ "testEnvironment": "jest-environment-jsdom",
21
+ "testEnvironmentOptions": {
22
+ "customExportConditions": ["require", "node", "umd"]
23
+ },
24
+
25
+ "moduleFileExtensions": ["cjs", "js", "json", "node", "css"],
26
+
27
+ // Enable code coverage for Jest
28
+ "collectCoverage": true,
29
+ "coverageDirectory": "<rootDir>/jest-output/coverage",
30
+ "coverageReporters": [
31
+ [
32
+ "cobertura",
33
+ {
34
+ "file": "cobertura/cobertura-coverage.xml"
35
+ }
36
+ ],
37
+ "html",
38
+ "json-summary"
39
+ ],
40
+
41
+ // Use v8 coverage provider to avoid Babel
42
+ "coverageProvider": "v8",
43
+
44
+ // Enable junit reporting for Jest
45
+ "reporters": [
46
+ "default",
47
+ [
48
+ "jest-junit",
49
+ {
50
+ "outputDirectory": "<rootDir>/jest-output",
51
+ "outputName": "JUnit.xml", // QTest expects this casing.
52
+ "classNameTemplate": "{classname} > ",
53
+ "titleTemplate": "{title} ({filepath})"
54
+ }
55
+ ]
56
+ ]
57
+ }
@@ -0,0 +1,5 @@
1
+ {
2
+ "$schema": "https://developer.microsoft.com/json-schemas/heft/v0/heft-sass-plugin.schema.json",
3
+
4
+ "extends": "@microsoft/spfx-web-build-rig/profiles/default/config/sass.json"
5
+ }
@@ -2,20 +2,8 @@
2
2
  "extends": "@microsoft/spfx-web-build-rig/profiles/default/config/typescript.json",
3
3
 
4
4
  "staticAssetsToCopy": {
5
- "fileExtensions": [
6
- ".resx",
7
- ".sass",
8
- ".scss",
9
- ".css",
10
- ".jpg",
11
- ".png",
12
- ".woff",
13
- ".eot",
14
- ".ttf",
15
- ".svg",
16
- ".gif"
17
- ],
5
+ "fileExtensions": [".resx", ".jpg", ".png", ".woff", ".eot", ".ttf", ".svg", ".gif"],
18
6
 
19
7
  "includeGlobs": ["webparts/*/loc/*.js"]
20
8
  }
21
- }
9
+ }
@@ -145,4 +145,4 @@ module.exports = WebpartGenerator;
145
145
  module.exports.defineOptions = defineOptions;
146
146
  module.exports.composeWith = composeWith;
147
147
 
148
- //#sourceMappingUrl=./index.js.map
148
+ //# sourceMappingURL=./index.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@microsoft/generator-sharepoint",
3
- "version": "1.21.0",
3
+ "version": "1.22.0-beta.1",
4
4
  "description": "Yeoman generator for the SharePoint Framework",
5
5
  "engines": {
6
6
  "node": ">=22.14.0 < 23.0.0"
@@ -34,31 +34,32 @@
34
34
  }
35
35
  },
36
36
  "dependencies": {
37
- "@rushstack/node-core-library": "5.12.0",
38
- "@rushstack/terminal": "0.15.1",
37
+ "@rushstack/node-core-library": "5.13.1",
38
+ "@rushstack/terminal": "0.15.3",
39
39
  "colors": "~1.2.1",
40
40
  "lodash": "4.17.21",
41
- "mem-fs": "2.2.1",
41
+ "mem-fs": "^4.1.2",
42
42
  "update-notifier": "5.1.0",
43
43
  "uuid": "^9.0.0",
44
44
  "yeoman-generator": "5.10.0",
45
45
  "yosay": "2.0.2",
46
- "@microsoft/spfx-heft-plugins": "1.21.0"
46
+ "@microsoft/spfx-heft-plugins": "1.22.0-beta.1"
47
47
  },
48
48
  "devDependencies": {
49
- "@microsoft/rush-lib": "5.150.0",
50
- "@rushstack/heft": "0.71.0",
51
- "@rushstack/heft-isolated-typescript-transpile-plugin": "0.1.1",
52
- "@rushstack/heft-typescript-plugin": "0.8.0",
49
+ "@rushstack/heft": "0.73.6",
50
+ "@rushstack/heft-isolated-typescript-transpile-plugin": "0.1.14",
51
+ "@rushstack/heft-typescript-plugin": "0.9.7",
53
52
  "@types/inquirer": "7.3.1",
54
53
  "@types/lodash": "4.14.117",
55
- "@types/mem-fs-editor": "7.0.1",
56
54
  "@types/update-notifier": "5.1.0",
57
55
  "@types/uuid": "9.0.1",
58
56
  "@types/yeoman-generator": "5.2.14",
59
57
  "@types/yosay": "2.0.0",
60
58
  "eslint": "8.57.1",
61
- "@msinternal/internal-node-rig": "0.1.0"
59
+ "mem-fs-editor": "^11.1.4",
60
+ "@msinternal/ms-graph-v3-bundle": "3.0.2",
61
+ "@msinternal/internal-node-rig": "0.1.0",
62
+ "@msinternal/sp-teams-lib": "0.24.66"
62
63
  },
63
64
  "scripts": {
64
65
  "build": "heft test --clean",