Skip to content

Commit cc18791

Browse files
authored
Merge pull request #2098 from pnp/spfx-1-22-2
Spfx 1 22 2
2 parents e2b6ac8 + c0d31dd commit cc18791

121 files changed

Lines changed: 24928 additions & 29093 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.eslintrc.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ module.exports = {
1919
'sourceType': 'module'
2020
},
2121
rules: {
22+
// Require chunk names for dynamic imports in SPFx projects. https://www.npmjs.com/package/@rushstack/eslint-plugin
23+
'@rushstack/import-requires-chunk-name': 1,
2224
// Prevent usage of the JavaScript null value, while allowing code to access existing APIs that may require null. https://www.npmjs.com/package/@rushstack/eslint-plugin
2325
'@rushstack/no-new-null': 1,
2426
// Require Jest module mocking APIs to be called before any other statements in their code block. https://www.npmjs.com/package/@rushstack/eslint-plugin
@@ -295,9 +297,7 @@ module.exports = {
295297
// ====================================================================
296298
// @microsoft/eslint-plugin-spfx
297299
// ====================================================================
298-
'@microsoft/spfx/import-requires-chunk-name': 1,
299-
'@microsoft/spfx/no-require-ensure': 2,
300-
'@microsoft/spfx/pair-react-dom-render-unmount': 1
300+
'@microsoft/spfx/no-require-ensure': 2
301301
}
302302
},
303303
{

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ dist
1111
lib
1212
solution
1313
temp
14+
lib-dts
15+
lib-commonjs
16+
lib-esm
17+
jest-output
1418
*.sppkg
1519

1620
# Coverage directory used by tools like istanbul
@@ -49,3 +53,4 @@ release
4953
*.scss.d.ts
5054

5155
.heft
56+
.claude

.yo-rc.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
{
22
"@microsoft/generator-sharepoint": {
3-
"version": "1.21.1",
3+
"version": "1.22.2",
44
"libraryName": "sp-dev-fx-controls-react",
55
"libraryId": "92b1e52c-a5fa-490a-bcf4-76080f39442c",
66
"environment": "spo",
77
"isDomainIsolated": false,
88
"isCreatingSolution": false,
99
"packageManager": "npm",
1010
"plusBeta": false,
11-
"nodeVersion": "18.17.1",
11+
"nodeVersion": "22.22.0",
12+
"useGulp": false,
1213
"sdksVersions": {
1314
"@microsoft/microsoft-graph-client": "3.0.2",
1415
"@microsoft/teams-js": "2.24.0"

config/heft.json

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{
2+
"$schema": "https://developer.microsoft.com/json-schemas/heft/v0/heft.schema.json",
3+
"extends": "@microsoft/spfx-web-build-rig/profiles/default/config/heft.json",
4+
"phasesByName": {
5+
"version-updater": {
6+
"tasksByName": {
7+
"version-updater": {
8+
"taskPlugin": {
9+
"pluginPackage": "@rushstack/heft",
10+
"pluginName": "run-script-plugin",
11+
"options": {
12+
"scriptPath": "./versionUpdater.mjs"
13+
}
14+
}
15+
}
16+
}
17+
}
18+
}
19+
}

config/jest.config.json

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
{
2+
"extends": "@microsoft/spfx-web-build-rig/profiles/default/config/jest.config.json",
3+
4+
"setupFilesAfterEnv": [
5+
"<rootDir>/tests/setupHeft.js"
6+
],
7+
8+
"moduleNameMapper": {
9+
"cheerio/lib/utils": "cheerio/utils",
10+
"^undici$": "<rootDir>/tests/__mocks__/undici.js",
11+
"@ms/sp-telemetry": "identity-obj-proxy",
12+
"@microsoft/sp-webpart-base": "identity-obj-proxy",
13+
"@microsoft/sp-core-library": "<rootDir>/tests/__mocks__/sp-core-library.js",
14+
"@microsoft/sp-http": "<rootDir>/tests/__mocks__/sp-http.js",
15+
"@microsoft/sp-application-base": "identity-obj-proxy",
16+
"office-ui-fabric-react/lib/(.*)$": "office-ui-fabric-react/lib-commonjs/$1",
17+
"@fluentui/react-theme-provider/lib/(.*)$": "@fluentui/react-theme-provider/lib-commonjs/$1",
18+
"src/common/telemetry/(.*)$": "identity-obj-proxy",
19+
"@pnp/sp": "identity-obj-proxy",
20+
"'@pnp/sp/fields": "identity-obj-proxy",
21+
"ControlStrings": "identity-obj-proxy",
22+
"\\.(css|scss)$": "identity-obj-proxy"
23+
}
24+
}

config/rig.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
// The "rig.json" file directs tools to look for their config files in an external package.
3+
// Documentation for this system: https://www.npmjs.com/package/@rushstack/rig-package
4+
"$schema": "https://developer.microsoft.com/json-schemas/rig-package/rig.schema.json",
5+
6+
"rigPackageName": "@microsoft/spfx-web-build-rig"
7+
}

config/sass.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"$schema": "https://developer.microsoft.com/json-schemas/heft/v0/heft-sass-plugin.schema.json",
3+
"extends": "@microsoft/spfx-web-build-rig/profiles/default/config/sass.json"
4+
}

config/typescript.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"extends": "@microsoft/spfx-web-build-rig/profiles/default/config/typescript.json",
3+
4+
"staticAssetsToCopy": {
5+
"fileExtensions": [".resx", ".jpg", ".png", ".woff", ".eot", ".ttf", ".svg", ".gif"],
6+
7+
"includeGlobs": ["webparts/*/loc/*.js"]
8+
}
9+
}

docs/documentation/docs/guides/mpa.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,8 @@ As this project is based on SPFx, it aligns with the following [development comp
6464
- clone your fork
6565
- in the command line, run the following commands:
6666
- `npm install` to restore dependencies
67-
- `npm install -g gulp-cli` in order to run `gulp` commands (run `npm list -g gulp-cli` to check if already installed on your machine or not)
68-
- `gulp serve` to serve your project (or `npm run serve` if you want to use [`spfx-fast-serve`](https://github.com/s-KaiNet/spfx-fast-serve))
67+
- `npm install -g @rushstack/heft` in order to run `heft` commands (run `npm list -g @rushstack/heft` to check if already installed on your machine or not)
68+
- `npm run start` to serve your project
6969
- Start making your changes
7070

7171
### Run the project locally
@@ -74,8 +74,7 @@ As this project embeds a SPFx solution, you have the ability to test all the con
7474

7575
You can also debug the controls in any supported language by running one of the following commands (for example in _french_):
7676

77-
- `gulp serve --locale=fr-fr`
78-
- `npx fast-serve --locale=fr-fr` (if using `spfx-fast-serve`)
77+
- `npm run start --locale=fr-fr`
7978

8079
Beware that both argument and value have to be lower case. Supported locales are listed in the following project's path: `src\loc`.
8180

gulpfile.js

Lines changed: 0 additions & 51 deletions
This file was deleted.

0 commit comments

Comments
 (0)