SPFx version Upgrade from 1.3.0 to 1.11.0

This commit is contained in:
Ravi Chandra 2020-10-01 07:04:04 -07:00
parent 240cdc0eb8
commit 57e4391d8e
16 changed files with 23816 additions and 82 deletions

View File

@ -0,0 +1,454 @@
{
"title": "Upgrade project react-youtube to v1.11.0",
"steps": [
{
"title": "REQUIRED: @microsoft/sp-core-library",
"description": "### REQUIRED\r\n\r\nUpgrade SharePoint Framework dependency package @microsoft/sp-core-library\r\n\r\nExecute the following command:\r\n\r\n[`npm i -SE @microsoft/sp-core-library@1.11.0`](command:codetour.sendTextToTerminal?[\"npm i -SE @microsoft/sp-core-library@1.11.0\"])",
"line": 14,
"file": "package.json"
},
{
"title": "REQUIRED: @microsoft/sp-lodash-subset",
"description": "### REQUIRED\r\n\r\nUpgrade SharePoint Framework dependency package @microsoft/sp-lodash-subset\r\n\r\nExecute the following command:\r\n\r\n[`npm i -SE @microsoft/sp-lodash-subset@1.11.0`](command:codetour.sendTextToTerminal?[\"npm i -SE @microsoft/sp-lodash-subset@1.11.0\"])",
"line": 15,
"file": "package.json"
},
{
"title": "REQUIRED: @microsoft/sp-webpart-base",
"description": "### REQUIRED\r\n\r\nUpgrade SharePoint Framework dependency package @microsoft/sp-webpart-base\r\n\r\nExecute the following command:\r\n\r\n[`npm i -SE @microsoft/sp-webpart-base@1.11.0`](command:codetour.sendTextToTerminal?[\"npm i -SE @microsoft/sp-webpart-base@1.11.0\"])",
"line": 16,
"file": "package.json"
},
{
"title": "REQUIRED: @types/react",
"description": "### REQUIRED\r\n\r\nRemove SharePoint Framework dependency package @types/react\r\n\r\nExecute the following command:\r\n\r\n[`npm un -S @types/react`](command:codetour.sendTextToTerminal?[\"npm un -S @types/react\"])",
"line": 17,
"file": "package.json"
},
{
"title": "REQUIRED: @types/react-dom",
"description": "### REQUIRED\r\n\r\nRemove SharePoint Framework dependency package @types/react-dom\r\n\r\nExecute the following command:\r\n\r\n[`npm un -S @types/react-dom`](command:codetour.sendTextToTerminal?[\"npm un -S @types/react-dom\"])",
"line": 21,
"file": "package.json"
},
{
"title": "REQUIRED: @types/webpack-env",
"description": "### REQUIRED\r\n\r\nRemove SharePoint Framework dependency package @types/webpack-env\r\n\r\nExecute the following command:\r\n\r\n[`npm un -S @types/webpack-env`](command:codetour.sendTextToTerminal?[\"npm un -S @types/webpack-env\"])",
"line": 22,
"file": "package.json"
},
{
"title": "REQUIRED: @microsoft/sp-property-pane",
"description": "### REQUIRED\r\n\r\nInstall SharePoint Framework dependency package @microsoft/sp-property-pane\r\n\r\nExecute the following command:\r\n\r\n[`npm i -SE @microsoft/sp-property-pane@1.11.0`](command:codetour.sendTextToTerminal?[\"npm i -SE @microsoft/sp-property-pane@1.11.0\"])",
"line": 1,
"file": "package.json"
},
{
"title": "REQUIRED: office-ui-fabric-react",
"description": "### REQUIRED\r\n\r\nInstall SharePoint Framework dependency package office-ui-fabric-react\r\n\r\nExecute the following command:\r\n\r\n[`npm i -SE office-ui-fabric-react@6.214.0`](command:codetour.sendTextToTerminal?[\"npm i -SE office-ui-fabric-react@6.214.0\"])",
"line": 1,
"file": "package.json"
},
{
"title": "REQUIRED: @microsoft/sp-build-web",
"description": "### REQUIRED\r\n\r\nUpgrade SharePoint Framework dev dependency package @microsoft/sp-build-web\r\n\r\nExecute the following command:\r\n\r\n[`npm i -DE @microsoft/sp-build-web@1.11.0`](command:codetour.sendTextToTerminal?[\"npm i -DE @microsoft/sp-build-web@1.11.0\"])",
"line": 29,
"file": "package.json"
},
{
"title": "REQUIRED: @microsoft/sp-module-interfaces",
"description": "### REQUIRED\r\n\r\nUpgrade SharePoint Framework dev dependency package @microsoft/sp-module-interfaces\r\n\r\nExecute the following command:\r\n\r\n[`npm i -DE @microsoft/sp-module-interfaces@1.11.0`](command:codetour.sendTextToTerminal?[\"npm i -DE @microsoft/sp-module-interfaces@1.11.0\"])",
"line": 30,
"file": "package.json"
},
{
"title": "REQUIRED: @microsoft/sp-webpart-workbench",
"description": "### REQUIRED\r\n\r\nUpgrade SharePoint Framework dev dependency package @microsoft/sp-webpart-workbench\r\n\r\nExecute the following command:\r\n\r\n[`npm i -DE @microsoft/sp-webpart-workbench@1.11.0`](command:codetour.sendTextToTerminal?[\"npm i -DE @microsoft/sp-webpart-workbench@1.11.0\"])",
"line": 31,
"file": "package.json"
},
{
"title": "REQUIRED: @microsoft/sp-tslint-rules",
"description": "### REQUIRED\r\n\r\nInstall SharePoint Framework dev dependency package @microsoft/sp-tslint-rules\r\n\r\nExecute the following command:\r\n\r\n[`npm i -DE @microsoft/sp-tslint-rules@1.11.0`](command:codetour.sendTextToTerminal?[\"npm i -DE @microsoft/sp-tslint-rules@1.11.0\"])",
"line": 1,
"file": "package.json"
},
{
"title": "REQUIRED: @types/webpack-env",
"description": "### REQUIRED\r\n\r\nInstall SharePoint Framework dev dependency package @types/webpack-env\r\n\r\nExecute the following command:\r\n\r\n[`npm i -DE @types/webpack-env@1.13.1`](command:codetour.sendTextToTerminal?[\"npm i -DE @types/webpack-env@1.13.1\"])",
"line": 22,
"file": "package.json"
},
{
"title": "REQUIRED: @types/es6-promise",
"description": "### REQUIRED\r\n\r\nInstall SharePoint Framework dev dependency package @types/es6-promise\r\n\r\nExecute the following command:\r\n\r\n[`npm i -DE @types/es6-promise@0.0.33`](command:codetour.sendTextToTerminal?[\"npm i -DE @types/es6-promise@0.0.33\"])",
"line": 1,
"file": "package.json"
},
{
"title": "REQUIRED: @types/react",
"description": "### REQUIRED\r\n\r\nInstall SharePoint Framework dev dependency package @types/react\r\n\r\nExecute the following command:\r\n\r\n[`npm i -DE @types/react@16.8.8`](command:codetour.sendTextToTerminal?[\"npm i -DE @types/react@16.8.8\"])",
"line": 17,
"file": "package.json"
},
{
"title": "REQUIRED: @types/react-dom",
"description": "### REQUIRED\r\n\r\nInstall SharePoint Framework dev dependency package @types/react-dom\r\n\r\nExecute the following command:\r\n\r\n[`npm i -DE @types/react-dom@16.8.3`](command:codetour.sendTextToTerminal?[\"npm i -DE @types/react-dom@16.8.3\"])",
"line": 21,
"file": "package.json"
},
{
"title": "OPTIONAL: package-solution.json developer",
"description": "### OPTIONAL\r\n\r\nIn package-solution.json add developer section\r\n\r\n\r\n```json\r\n{\n \"solution\": {\n \"developer\": {\n \"name\": \"Contoso\",\n \"privacyUrl\": \"https://contoso.com/privacy\",\n \"termsOfUseUrl\": \"https://contoso.com/terms-of-use\",\n \"websiteUrl\": \"https://contoso.com/my-app\",\n \"mpnId\": \"000000\"\n }\n }\n}\r\n```",
"line": 1,
"file": "config/package-solution.json"
},
{
"title": "RECOMMENDED: .yo-rc.json version",
"description": "### RECOMMENDED\r\n\r\nUpdate version in .yo-rc.json\r\n\r\n\r\n```json\r\n{\n \"@microsoft/generator-sharepoint\": {\n \"version\": \"1.11.0\"\n }\n}\r\n```",
"line": 1,
"file": ".yo-rc.json"
},
{
"title": "REQUIRED: tsconfig.json include property",
"description": "### REQUIRED\r\n\r\nUpdate tsconfig.json include property\r\n\r\n\r\n```json\r\n{\n \"include\": [\n \"src/**/*.tsx\"\n ]\n}\r\n```",
"line": 1,
"file": "tsconfig.json"
},
{
"title": "REQUIRED: @microsoft/rush-stack-compiler-3.3",
"description": "### REQUIRED\r\n\r\nInstall SharePoint Framework dev dependency package @microsoft/rush-stack-compiler-3.3\r\n\r\nExecute the following command:\r\n\r\n[`npm i -DE @microsoft/rush-stack-compiler-3.3@0.3.5`](command:codetour.sendTextToTerminal?[\"npm i -DE @microsoft/rush-stack-compiler-3.3@0.3.5\"])",
"line": 1,
"file": "package.json"
},
{
"title": "REQUIRED: tsconfig.json extends property",
"description": "### REQUIRED\r\n\r\nUpdate tsconfig.json extends property\r\n\r\n\r\n```json\r\n{\n \"extends\": \"./node_modules/@microsoft/rush-stack-compiler-3.3/includes/tsconfig-web.json\"\n}\r\n```",
"line": 1,
"file": "tsconfig.json"
},
{
"title": "REQUIRED: Property pane property import change to @microsoft/sp-property-pane",
"description": "### REQUIRED\r\n\r\nRefactor the code to import property pane property from the @microsoft/sp-property-pane npm package instead of the @microsoft/sp-webpart-base package\r\n\r\n\r\n```ts\r\nimport { BaseClientSideWebPart } from \"@microsoft/sp-webpart-base\";\r\nimport { IPropertyPaneConfiguration, PropertyPaneTextField, PropertyPaneSlider } from \"@microsoft/sp-property-pane\";\r\n```",
"line": 4,
"file": "src/webparts/youtube/YoutubeWebPart.ts"
},
{
"title": "REQUIRED: @types/react",
"description": "### REQUIRED\r\n\r\nAdd resolution for package @types/react\r\n\r\n\r\n```json\r\n{\n \"resolutions\": {\n \"@types/react\": \"16.8.8\"\n }\n}\r\n```",
"line": 17,
"file": "package.json"
},
{
"title": "REQUIRED: main",
"description": "### REQUIRED\r\n\r\nAdd package.json property\r\n\r\n\r\n```json\r\n{\n \"main\": \"lib/index.js\"\n}\r\n```",
"line": 1,
"file": "package.json"
},
{
"title": "REQUIRED: react",
"description": "### REQUIRED\r\n\r\nUpgrade SharePoint Framework dependency package react\r\n\r\nExecute the following command:\r\n\r\n[`npm i -SE react@16.8.5`](command:codetour.sendTextToTerminal?[\"npm i -SE react@16.8.5\"])",
"line": 2,
"file": "package.json"
},
{
"title": "REQUIRED: react-dom",
"description": "### REQUIRED\r\n\r\nUpgrade SharePoint Framework dependency package react-dom\r\n\r\nExecute the following command:\r\n\r\n[`npm i -SE react-dom@16.8.5`](command:codetour.sendTextToTerminal?[\"npm i -SE react-dom@16.8.5\"])",
"line": 21,
"file": "package.json"
},
{
"title": "REQUIRED: Web part manifest supportedHosts",
"description": "### REQUIRED\r\n\r\nUpdate the supportedHosts property in the manifest\r\n\r\n\r\n```json\r\n{\n \"supportedHosts\": [\"SharePointWebPart\"]\n}\r\n```",
"line": 1,
"file": "src/webparts/youtube/YoutubeWebPart.manifest.json"
},
{
"title": "REQUIRED: tsconfig.json compiler options inlineSources",
"description": "### REQUIRED\r\n\r\nUpdate tsconfig.json inlineSources value\r\n\r\n\r\n```json\r\n{\n \"compilerOptions\": {\n \"inlineSources\": false\n }\n}\r\n```",
"line": 1,
"file": "tsconfig.json"
},
{
"title": "REQUIRED: tsconfig.json compiler options strictNullChecks",
"description": "### REQUIRED\r\n\r\nUpdate tsconfig.json strictNullChecks value\r\n\r\n\r\n```json\r\n{\n \"compilerOptions\": {\n \"strictNullChecks\": false\n }\n}\r\n```",
"line": 1,
"file": "tsconfig.json"
},
{
"title": "REQUIRED: tsconfig.json compiler options noUnusedLocals",
"description": "### REQUIRED\r\n\r\nUpdate tsconfig.json noUnusedLocals value\r\n\r\n\r\n```json\r\n{\n \"compilerOptions\": {\n \"noUnusedLocals\": false\n }\n}\r\n```",
"line": 1,
"file": "tsconfig.json"
},
{
"title": "OPTIONAL: Web part Microsoft Teams tab resources folder",
"description": "### OPTIONAL\r\n\r\nCreate folder for Microsoft Teams tab resources\r\n\r\nExecute the following command:\r\n\r\n[`mkdir C:\\Ravi\\sp-dev-fx-webparts\\samples\\react-youtube/teams`](command:codetour.sendTextToTerminal?[\"mkdir C:\\Ravi\\sp-dev-fx-webparts\\samples\\react-youtube/teams\"])",
"line": 1,
"directory": ""
},
{
"title": "OPTIONAL: Web part Microsoft Teams tab small icon",
"description": "### OPTIONAL\r\n\r\nCreate Microsoft Teams tab small icon for the web part\r\n\r\nExecute the following command:\r\n\r\n[`cp C:\\Users\\rchandra\\AppData\\Roaming\\nvm\\v10.22.1\\node_modules\\@pnp\\cli-microsoft365\\dist\\m365\\spfx\\commands\\project\\project-upgrade\\assets\\tab20x20.png C:\\Ravi\\sp-dev-fx-webparts\\samples\\react-youtube\\teams\\b4be3e02-7b4a-4a01-8fb6-4c369a6cacb7_outline.png`](command:codetour.sendTextToTerminal?[\"cp C:\\Users\\rchandra\\AppData\\Roaming\\nvm\\v10.22.1\\node_modules\\@pnp\\cli-microsoft365\\dist\\m365\\spfx\\commands\\project\\project-upgrade\\assets\\tab20x20.png C:\\Ravi\\sp-dev-fx-webparts\\samples\\react-youtube\\teams\\b4be3e02-7b4a-4a01-8fb6-4c369a6cacb7_outline.png\"])",
"line": 1,
"directory": ""
},
{
"title": "OPTIONAL: Web part Microsoft Teams tab large icon",
"description": "### OPTIONAL\r\n\r\nCreate Microsoft Teams tab large icon for the web part\r\n\r\nExecute the following command:\r\n\r\n[`cp C:\\Users\\rchandra\\AppData\\Roaming\\nvm\\v10.22.1\\node_modules\\@pnp\\cli-microsoft365\\dist\\m365\\spfx\\commands\\project\\project-upgrade\\assets\\tab96x96.png C:\\Ravi\\sp-dev-fx-webparts\\samples\\react-youtube\\teams\\b4be3e02-7b4a-4a01-8fb6-4c369a6cacb7_color.png`](command:codetour.sendTextToTerminal?[\"cp C:\\Users\\rchandra\\AppData\\Roaming\\nvm\\v10.22.1\\node_modules\\@pnp\\cli-microsoft365\\dist\\m365\\spfx\\commands\\project\\project-upgrade\\assets\\tab96x96.png C:\\Ravi\\sp-dev-fx-webparts\\samples\\react-youtube\\teams\\b4be3e02-7b4a-4a01-8fb6-4c369a6cacb7_color.png\"])",
"line": 1,
"directory": ""
},
{
"title": "REQUIRED: package-solution.json isDomainIsolated",
"description": "### REQUIRED\r\n\r\nUpdate package-solution.json isDomainIsolated\r\n\r\n\r\n```json\r\n{\n \"solution\": {\n \"isDomainIsolated\": false\n }\n}\r\n```",
"line": 1,
"file": "config/package-solution.json"
},
{
"title": "RECOMMENDED: .yo-rc.json isDomainIsolated",
"description": "### RECOMMENDED\r\n\r\nUpdate isDomainIsolated in .yo-rc.json\r\n\r\n\r\n```json\r\n{\n \"@microsoft/generator-sharepoint\": {\n \"isDomainIsolated\": false\n }\n}\r\n```",
"line": 1,
"file": ".yo-rc.json"
},
{
"title": "REQUIRED: tslint.json rulesDirectory",
"description": "### REQUIRED\r\n\r\nRemove rulesDirectory from tslint.json\r\n\r\n\r\n```json\r\n{\n \"rulesDirectory\": []\n}\r\n```",
"line": 1,
"file": "tslint.json"
},
{
"title": "REQUIRED: tslint.json extends",
"description": "### REQUIRED\r\n\r\nUpdate tslint.json extends property\r\n\r\n\r\n```json\r\n{\n \"extends\": \"@microsoft/sp-tslint-rules/base-tslint.json\"\n}\r\n```",
"line": 1,
"file": "tslint.json"
},
{
"title": "REQUIRED: tslint-microsoft-contrib",
"description": "### REQUIRED\r\n\r\nInstall SharePoint Framework dev dependency package tslint-microsoft-contrib\r\n\r\nExecute the following command:\r\n\r\n[`npm i -DE tslint-microsoft-contrib@5.0.0`](command:codetour.sendTextToTerminal?[\"npm i -DE tslint-microsoft-contrib@5.0.0\"])",
"line": 1,
"file": "package.json"
},
{
"title": "REQUIRED: tsconfig.json compiler options outDir",
"description": "### REQUIRED\r\n\r\nUpdate tsconfig.json outDir value\r\n\r\n\r\n```json\r\n{\n \"compilerOptions\": {\n \"outDir\": \"lib\"\n }\n}\r\n```",
"line": 1,
"file": "tsconfig.json"
},
{
"title": "REQUIRED: tsconfig.json exclude property",
"description": "### REQUIRED\r\n\r\nUpdate tsconfig.json exclude property\r\n\r\n\r\n```json\r\n{\n \"exclude\": [\n \"node_modules\",\n \"lib\"\n ]\n}\r\n```",
"line": 1,
"file": "tsconfig.json"
},
{
"title": "REQUIRED: config\\tslint.json",
"description": "### REQUIRED\r\n\r\nRemove file config\\tslint.json\r\n\r\nExecute the following command:\r\n\r\n[`rm config\\tslint.json`](command:codetour.sendTextToTerminal?[\"rm config\\tslint.json\"])",
"line": 1,
"file": "config/tslint.json"
},
{
"title": "REQUIRED: src\\index.ts",
"description": "### REQUIRED\r\n\r\nAdd file src\\index.ts\r\n\r\nExecute the following command:\r\n\r\n[`cat > src\\index.ts << EOF \n// A file is required to be in the root of the /src directory by the TypeScript compiler\n\nEOF`](command:codetour.sendTextToTerminal?[\"cat > src\\index.ts << EOF \n// A file is required to be in the root of the /src directory by the TypeScript compiler\n\nEOF\"])",
"line": 1,
"directory": ""
},
{
"title": "REQUIRED: @types/es6-promise",
"description": "### REQUIRED\r\n\r\nInstall SharePoint Framework dependency package @types/es6-promise\r\n\r\nExecute the following command:\r\n\r\n[`npm i -SE @types/es6-promise@0.0.33`](command:codetour.sendTextToTerminal?[\"npm i -SE @types/es6-promise@0.0.33\"])",
"line": 1,
"file": "package.json"
},
{
"title": "REQUIRED: @types/chai",
"description": "### REQUIRED\r\n\r\nUpgrade SharePoint Framework dev dependency package @types/chai\r\n\r\nExecute the following command:\r\n\r\n[`npm i -DE @types/chai@3.4.34`](command:codetour.sendTextToTerminal?[\"npm i -DE @types/chai@3.4.34\"])",
"line": 33,
"file": "package.json"
},
{
"title": "REQUIRED: @types/mocha",
"description": "### REQUIRED\r\n\r\nUpgrade SharePoint Framework dev dependency package @types/mocha\r\n\r\nExecute the following command:\r\n\r\n[`npm i -DE @types/mocha@2.2.38`](command:codetour.sendTextToTerminal?[\"npm i -DE @types/mocha@2.2.38\"])",
"line": 34,
"file": "package.json"
},
{
"title": "REQUIRED: config.json schema",
"description": "### REQUIRED\r\n\r\nUpdate config.json schema URL\r\n\r\n\r\n```json\r\n{\n \"$schema\": \"https://developer.microsoft.com/json-schemas/spfx-build/config.2.0.schema.json\"\n}\r\n```",
"line": 1,
"file": "config/config.json"
},
{
"title": "REQUIRED: copy-assets.json schema",
"description": "### REQUIRED\r\n\r\nUpdate copy-assets.json schema URL\r\n\r\n\r\n```json\r\n{\n \"$schema\": \"https://developer.microsoft.com/json-schemas/spfx-build/copy-assets.schema.json\"\n}\r\n```",
"line": 1,
"file": "config/copy-assets.json"
},
{
"title": "REQUIRED: deploy-azure-storage.json schema",
"description": "### REQUIRED\r\n\r\nUpdate deploy-azure-storage.json schema URL\r\n\r\n\r\n```json\r\n{\n \"$schema\": \"https://developer.microsoft.com/json-schemas/spfx-build/deploy-azure-storage.schema.json\"\n}\r\n```",
"line": 1,
"file": "config/deploy-azure-storage.json"
},
{
"title": "REQUIRED: package-solution.json schema",
"description": "### REQUIRED\r\n\r\nUpdate package-solution.json schema URL\r\n\r\n\r\n```json\r\n{\n \"$schema\": \"https://developer.microsoft.com/json-schemas/spfx-build/package-solution.schema.json\"\n}\r\n```",
"line": 1,
"file": "config/package-solution.json"
},
{
"title": "REQUIRED: serve.json schema",
"description": "### REQUIRED\r\n\r\nUpdate serve.json schema URL\r\n\r\n\r\n```json\r\n{\n \"$schema\": \"https://developer.microsoft.com/json-schemas/core-build/serve.schema.json\"\n}\r\n```",
"line": 1,
"file": "config/serve.json"
},
{
"title": "REQUIRED: write-manifests.json schema",
"description": "### REQUIRED\r\n\r\nUpdate write-manifests.json schema URL\r\n\r\n\r\n```json\r\n{\n \"$schema\": \"https://developer.microsoft.com/json-schemas/spfx-build/write-manifests.schema.json\"\n}\r\n```",
"line": 1,
"file": "config/write-manifests.json"
},
{
"title": "RECOMMENDED: .yo-rc.json isCreatingSolution",
"description": "### RECOMMENDED\r\n\r\nUpdate isCreatingSolution in .yo-rc.json\r\n\r\n\r\n```json\r\n{\n \"@microsoft/generator-sharepoint\": {\n \"isCreatingSolution\": true\n }\n}\r\n```",
"line": 1,
"file": ".yo-rc.json"
},
{
"title": "RECOMMENDED: .yo-rc.json packageManager",
"description": "### RECOMMENDED\r\n\r\nUpdate packageManager in .yo-rc.json\r\n\r\n\r\n```json\r\n{\n \"@microsoft/generator-sharepoint\": {\n \"packageManager\": \"npm\"\n }\n}\r\n```",
"line": 1,
"file": ".yo-rc.json"
},
{
"title": "RECOMMENDED: .yo-rc.json componentType",
"description": "### RECOMMENDED\r\n\r\nUpdate componentType in .yo-rc.json\r\n\r\n\r\n```json\r\n{\n \"@microsoft/generator-sharepoint\": {\n \"componentType\": \"webpart\"\n }\n}\r\n```",
"line": 1,
"file": ".yo-rc.json"
},
{
"title": "REQUIRED: Web part manifest schema",
"description": "### REQUIRED\r\n\r\nUpdate schema in manifest\r\n\r\n\r\n```json\r\n{\n \"$schema\": \"https://developer.microsoft.com/json-schemas/spfx/client-side-web-part-manifest.schema.json\"\n}\r\n```",
"line": 1,
"file": "src/webparts/youtube/YoutubeWebPart.manifest.json"
},
{
"title": "REQUIRED: tsconfig.json module",
"description": "### REQUIRED\r\n\r\nUpdate module type in tsconfig.json\r\n\r\n\r\n```json\r\n{\n \"compilerOptions\": {\n \"module\": \"esnext\"\n }\n}\r\n```",
"line": 1,
"file": "tsconfig.json"
},
{
"title": "REQUIRED: tsconfig.json moduleResolution",
"description": "### REQUIRED\r\n\r\nUpdate moduleResolution in tsconfig.json\r\n\r\n\r\n```json\r\n{\n \"compilerOptions\": {\n \"moduleResolution\": \"node\"\n }\n}\r\n```",
"line": 1,
"file": "tsconfig.json"
},
{
"title": "REQUIRED: @types/react-addons-shallow-compare",
"description": "### REQUIRED\r\n\r\nRemove SharePoint Framework dependency package @types/react-addons-shallow-compare\r\n\r\nExecute the following command:\r\n\r\n[`npm un -S @types/react-addons-shallow-compare`](command:codetour.sendTextToTerminal?[\"npm un -S @types/react-addons-shallow-compare\"])",
"line": 18,
"file": "package.json"
},
{
"title": "REQUIRED: @types/react-addons-update",
"description": "### REQUIRED\r\n\r\nRemove SharePoint Framework dependency package @types/react-addons-update\r\n\r\nExecute the following command:\r\n\r\n[`npm un -S @types/react-addons-update`](command:codetour.sendTextToTerminal?[\"npm un -S @types/react-addons-update\"])",
"line": 20,
"file": "package.json"
},
{
"title": "REQUIRED: @types/react-addons-test-utils",
"description": "### REQUIRED\r\n\r\nRemove SharePoint Framework dependency package @types/react-addons-test-utils\r\n\r\nExecute the following command:\r\n\r\n[`npm un -S @types/react-addons-test-utils`](command:codetour.sendTextToTerminal?[\"npm un -S @types/react-addons-test-utils\"])",
"line": 19,
"file": "package.json"
},
{
"title": "REQUIRED: package-solution.json includeClientSideAssets",
"description": "### REQUIRED\r\n\r\nUpdate package-solution.json includeClientSideAssets\r\n\r\n\r\n```json\r\n{\n \"solution\": {\n \"includeClientSideAssets\": true\n }\n}\r\n```",
"line": 1,
"file": "config/package-solution.json"
},
{
"title": "REQUIRED: tsconfig.json skipLibCheck",
"description": "### REQUIRED\r\n\r\nUpdate skipLibCheck in tsconfig.json\r\n\r\n\r\n```json\r\n{\n \"compilerOptions\": {\n \"skipLibCheck\": true\n }\n}\r\n```",
"line": 1,
"file": "tsconfig.json"
},
{
"title": "REQUIRED: tsconfig.json typeRoots ./node_modules/@types",
"description": "### REQUIRED\r\n\r\nAdd ./node_modules/@types to typeRoots in tsconfig.json\r\n\r\n\r\n```json\r\n{\n \"compilerOptions\": {\n \"typeRoots\": [\n \"./node_modules/@types\"\n ]\n }\n}\r\n```",
"line": 1,
"file": "tsconfig.json"
},
{
"title": "REQUIRED: tsconfig.json typeRoots ./node_modules/@microsoft",
"description": "### REQUIRED\r\n\r\nAdd ./node_modules/@microsoft to typeRoots in tsconfig.json\r\n\r\n\r\n```json\r\n{\n \"compilerOptions\": {\n \"typeRoots\": [\n \"./node_modules/@microsoft\"\n ]\n }\n}\r\n```",
"line": 1,
"file": "tsconfig.json"
},
{
"title": "REQUIRED: tsconfig.json es6-collections types",
"description": "### REQUIRED\r\n\r\nRemove es6-collections type in tsconfig.json\r\n\r\n\r\n```json\r\n{\n \"compilerOptions\": {\n \"types\": [\n \"es6-collections\"\n ]\n }\n}\r\n```",
"line": 1,
"file": "tsconfig.json"
},
{
"title": "REQUIRED: tsconfig.json es5 lib",
"description": "### REQUIRED\r\n\r\nAdd es5 lib in tsconfig.json\r\n\r\n\r\n```json\r\n{\n \"compilerOptions\": {\n \"lib\": [\n \"es5\"\n ]\n }\n}\r\n```",
"line": 1,
"file": "tsconfig.json"
},
{
"title": "REQUIRED: tsconfig.json dom lib",
"description": "### REQUIRED\r\n\r\nAdd dom lib in tsconfig.json\r\n\r\n\r\n```json\r\n{\n \"compilerOptions\": {\n \"lib\": [\n \"dom\"\n ]\n }\n}\r\n```",
"line": 1,
"file": "tsconfig.json"
},
{
"title": "REQUIRED: tsconfig.json es2015.collection lib",
"description": "### REQUIRED\r\n\r\nAdd es2015.collection lib in tsconfig.json\r\n\r\n\r\n```json\r\n{\n \"compilerOptions\": {\n \"lib\": [\n \"es2015.collection\"\n ]\n }\n}\r\n```",
"line": 1,
"file": "tsconfig.json"
},
{
"title": "RECOMMENDED: gulpfile.js ms-Grid sass suppression",
"description": "### RECOMMENDED\r\n\r\nAdd suppression for ms-Grid sass warning\r\n\r\n\r\n```js\r\nbuild.addSuppression(`Warning - [sass] The local CSS class 'ms-Grid' is not camelCase and will not be type-safe.`);\r\n```",
"line": 1,
"file": "gulpfile.js"
},
{
"title": "REQUIRED: json.schemas in .vscode/settings.json",
"description": "### REQUIRED\r\n\r\nRemove json.schemas in .vscode/settings.json\r\n\r\n\r\n```json\r\n{\n \"json.schemas\": []\n}\r\n```",
"line": 1,
"file": ".vscode/settings.json"
},
{
"title": "REQUIRED: ajv",
"description": "### REQUIRED\r\n\r\nInstall SharePoint Framework dev dependency package ajv\r\n\r\nExecute the following command:\r\n\r\n[`npm i -DE ajv@5.2.2`](command:codetour.sendTextToTerminal?[\"npm i -DE ajv@5.2.2\"])",
"line": 1,
"file": "package.json"
},
{
"title": "RECOMMENDED: .vscode/extensions.json",
"description": "### RECOMMENDED\r\n\r\nIn the .vscode folder, add the extensions.json file\r\n\r\n\r\n```json\r\n{\n \"recommendations\": [\n \"msjsdiag.debugger-for-chrome\"\n ]\n}\r\n```",
"line": 1,
"directory": ""
},
{
"title": "RECOMMENDED: .vscode/launch.json",
"description": "### RECOMMENDED\r\n\r\nIn the .vscode folder, add the launch.json file\r\n\r\n\r\n```json\r\n{\n /**\n Install Chrome Debugger Extension for Visual Studio Code\n to debug your components with the Chrome browser:\n https://aka.ms/spfx-debugger-extensions\n */\n \"version\": \"0.2.0\",\n \"configurations\": [{\n \"name\": \"Local workbench\",\n \"type\": \"chrome\",\n \"request\": \"launch\",\n \"url\": \"https://localhost:4321/temp/workbench.html\",\n \"webRoot\": \"${workspaceRoot}\",\n \"sourceMaps\": true,\n \"sourceMapPathOverrides\": {\n \"webpack:///../../../src/*\": \"${webRoot}/src/*\",\n \"webpack:///../../../../src/*\": \"${webRoot}/src/*\",\n \"webpack:///../../../../../src/*\": \"${webRoot}/src/*\"\n },\n \"runtimeArgs\": [\n \"--remote-debugging-port=9222\"\n ]\n },\n {\n \"name\": \"Hosted workbench\",\n \"type\": \"chrome\",\n \"request\": \"launch\",\n \"url\": \"https://enter-your-SharePoint-site/_layouts/workbench.aspx\",\n \"webRoot\": \"${workspaceRoot}\",\n \"sourceMaps\": true,\n \"sourceMapPathOverrides\": {\n \"webpack:///../../../src/*\": \"${webRoot}/src/*\",\n \"webpack:///../../../../src/*\": \"${webRoot}/src/*\",\n \"webpack:///../../../../../src/*\": \"${webRoot}/src/*\"\n },\n \"runtimeArgs\": [\n \"--remote-debugging-port=9222\",\n \"-incognito\"\n ]\n }\n ]\n}\r\n```",
"line": 1,
"directory": ""
},
{
"title": "OPTIONAL: Run npm dedupe",
"description": "### OPTIONAL\r\n\r\nIf, after upgrading npm packages, when building the project you have errors similar to: \"error TS2345: Argument of type 'SPHttpClientConfiguration' is not assignable to parameter of type 'SPHttpClientConfiguration'\", try running 'npm dedupe' to cleanup npm packages.\r\n\r\nExecute the following command:\r\n\r\n[`npm dedupe`](command:codetour.sendTextToTerminal?[\"npm dedupe\"])",
"line": 1,
"file": "package.json"
},
{
"file": ".tours/upgrade.tour",
"title": "RECOMMENDED: Delete tour",
"description": "### THAT'S IT!!!\r\nOnce you have tested that your upgrade is successful, you can delete the `.tour` folder and its contents. Otherwise, you'll be prompted to launch this CodeTour every time you open this project."
}
]
}

View File

@ -1,6 +1,10 @@
{ {
"@microsoft/generator-sharepoint": { "@microsoft/generator-sharepoint": {
"version": "1.3.1", "isCreatingSolution": true,
"componentType": "webpart",
"packageManager": "npm",
"isDomainIsolated": false,
"version": "1.11.0",
"libraryName": "react-youtube", "libraryName": "react-youtube",
"libraryId": "ca0fd050-e358-4093-93cd-bc3d74e131e5", "libraryId": "ca0fd050-e358-4093-93cd-bc3d74e131e5",
"environment": "spo" "environment": "spo"

View File

@ -1,5 +1,5 @@
{ {
"$schema": "https://dev.office.com/json-schemas/spfx-build/config.2.0.schema.json", "$schema": "https://developer.microsoft.com/json-schemas/spfx-build/config.2.0.schema.json",
"version": "2.0", "version": "2.0",
"bundles": { "bundles": {
"youtube-web-part": { "youtube-web-part": {

View File

@ -1,4 +1,4 @@
{ {
"$schema": "https://dev.office.com/json-schemas/spfx-build/copy-assets.schema.json", "$schema": "https://developer.microsoft.com/json-schemas/spfx-build/copy-assets.schema.json",
"deployCdnPath": "temp/deploy" "deployCdnPath": "temp/deploy"
} }

View File

@ -1,5 +1,5 @@
{ {
"$schema": "https://dev.office.com/json-schemas/spfx-build/deploy-azure-storage.schema.json", "$schema": "https://developer.microsoft.com/json-schemas/spfx-build/deploy-azure-storage.schema.json",
"workingDir": "./temp/deploy/", "workingDir": "./temp/deploy/",
"account": "<!-- STORAGE ACCOUNT NAME -->", "account": "<!-- STORAGE ACCOUNT NAME -->",
"container": "react-youtube", "container": "react-youtube",

View File

@ -1,10 +1,19 @@
{ {
"$schema": "https://dev.office.com/json-schemas/spfx-build/package-solution.schema.json", "$schema": "https://developer.microsoft.com/json-schemas/spfx-build/package-solution.schema.json",
"solution": { "solution": {
"name": "react-youtube-client-side-solution", "name": "react-youtube-client-side-solution",
"id": "ca0fd050-e358-4093-93cd-bc3d74e131e5", "id": "ca0fd050-e358-4093-93cd-bc3d74e131e5",
"isDomainIsolated": false,
"version": "1.0.0.0", "version": "1.0.0.0",
"skipFeatureDeployment": true "skipFeatureDeployment": true,
"includeClientSideAssets": true,
"developer": {
"name": "",
"websiteUrl": "",
"privacyUrl": "",
"termsOfUseUrl": "",
"mpnId": ""
}
}, },
"paths": { "paths": {
"zippedPackage": "solution/react-youtube.sppkg" "zippedPackage": "solution/react-youtube.sppkg"

View File

@ -1,5 +1,5 @@
{ {
"$schema": "https://dev.office.com/json-schemas/core-build/serve.schema.json", "$schema": "https://developer.microsoft.com/json-schemas/core-build/serve.schema.json",
"port": 4321, "port": 4321,
"https": true, "https": true,
"initialPage": "https://localhost:5432/workbench", "initialPage": "https://localhost:5432/workbench",

View File

@ -1,45 +0,0 @@
{
"$schema": "https://dev.office.com/json-schemas/core-build/tslint.schema.json",
// Display errors as warnings
"displayAsWarning": true,
// The TSLint task may have been configured with several custom lint rules
// before this config file is read (for example lint rules from the tslint-microsoft-contrib
// project). If true, this flag will deactivate any of these rules.
"removeExistingRules": true,
// When true, the TSLint task is configured with some default TSLint "rules.":
"useDefaultConfigAsBase": false,
// Since removeExistingRules=true and useDefaultConfigAsBase=false, there will be no lint rules
// which are active, other than the list of rules below.
"lintConfig": {
// Opt-in to Lint rules which help to eliminate bugs in JavaScript
"rules": {
"class-name": false,
"export-name": false,
"forin": false,
"label-position": false,
"member-access": true,
"no-arg": false,
"no-console": false,
"no-construct": false,
"no-duplicate-case": true,
"no-duplicate-variable": true,
"no-eval": false,
"no-function-expression": true,
"no-internal-module": true,
"no-shadowed-variable": true,
"no-switch-case-fall-through": true,
"no-unnecessary-semicolons": true,
"no-unused-expression": true,
"no-use-before-declare": true,
"no-with-statement": true,
"semicolon": true,
"trailing-comma": false,
"typedef": false,
"typedef-whitespace": false,
"use-named-parameter": true,
"valid-typeof": true,
"variable-name": false,
"whitespace": false
}
}
}

View File

@ -1,4 +1,4 @@
{ {
"$schema": "https://dev.office.com/json-schemas/spfx-build/write-manifests.schema.json", "$schema": "https://developer.microsoft.com/json-schemas/spfx-build/write-manifests.schema.json",
"cdnBasePath": "https://publiccdn.sharepointonline.com/giuleon.sharepoint.com/cdn/SPFx-youtube" "cdnBasePath": "<!-- PATH TO CDN -->"
} }

23254
samples/react-youtube/package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

View File

@ -1,5 +1,6 @@
{ {
"name": "react-youtube", "name": "react-youtube",
"main": "lib/index.js",
"version": "1.0.0", "version": "1.0.0",
"private": true, "private": true,
"engines": { "engines": {
@ -11,26 +12,33 @@
"test": "gulp test" "test": "gulp test"
}, },
"dependencies": { "dependencies": {
"@microsoft/sp-core-library": "~1.3.0", "@microsoft/sp-core-library": "1.11.0",
"@microsoft/sp-lodash-subset": "~1.3.0", "@microsoft/sp-lodash-subset": "1.11.0",
"@microsoft/sp-webpart-base": "~1.3.0", "@microsoft/sp-property-pane": "1.11.0",
"@types/react": "15.0.38", "@microsoft/sp-webpart-base": "1.11.0",
"@types/react-addons-shallow-compare": "0.14.17",
"@types/react-addons-test-utils": "0.14.15",
"@types/react-addons-update": "0.14.14",
"@types/react-dom": "0.14.18",
"@types/webpack-env": ">=1.12.1 <1.14.0",
"axios": "^0.19.0", "axios": "^0.19.0",
"lodash": "^4.17.4", "lodash": "^4.17.4",
"react": "15.4.2", "office-ui-fabric-react": "6.214.0",
"react-dom": "15.4.2" "react": "16.8.5",
"react-dom": "16.8.5"
}, },
"devDependencies": { "devDependencies": {
"@microsoft/sp-build-web": "~1.3.0", "@microsoft/rush-stack-compiler-3.3": "0.3.5",
"@microsoft/sp-module-interfaces": "~1.3.0", "@microsoft/sp-build-web": "1.11.0",
"@microsoft/sp-webpart-workbench": "~1.3.0", "@microsoft/sp-module-interfaces": "1.11.0",
"@microsoft/sp-tslint-rules": "1.11.0",
"@microsoft/sp-webpart-workbench": "1.11.0",
"@types/chai": "3.4.34",
"@types/es6-promise": "0.0.33",
"@types/mocha": "2.2.38",
"@types/react": "16.8.8",
"@types/react-dom": "16.8.3",
"@types/webpack-env": "1.13.1",
"ajv": "5.2.2",
"gulp": "~3.9.1", "gulp": "~3.9.1",
"@types/chai": ">=3.4.34 <3.6.0", "tslint-microsoft-contrib": "5.0.0"
"@types/mocha": ">=2.2.33 <2.6.0" },
"resolutions": {
"@types/react": "16.8.8"
} }
} }

View File

@ -0,0 +1 @@
// A file is required to be in the root of the /src directory by the TypeScript compiler

View File

@ -1,5 +1,5 @@
{ {
"$schema": "https://dev.office.com/json-schemas/spfx/client-side-web-part-manifest.schema.json", "$schema": "https://developer.microsoft.com/json-schemas/spfx/client-side-web-part-manifest.schema.json",
"id": "b4be3e02-7b4a-4a01-8fb6-4c369a6cacb7", "id": "b4be3e02-7b4a-4a01-8fb6-4c369a6cacb7",
"alias": "YoutubeWebPart", "alias": "YoutubeWebPart",
"componentType": "WebPart", "componentType": "WebPart",
@ -12,6 +12,7 @@
// Components that allow authors to embed arbitrary script code should set this to true. // Components that allow authors to embed arbitrary script code should set this to true.
// https://support.office.com/en-us/article/Turn-scripting-capabilities-on-or-off-1f2c515f-5d7e-448a-9fd7-835da935584f // https://support.office.com/en-us/article/Turn-scripting-capabilities-on-or-off-1f2c515f-5d7e-448a-9fd7-835da935584f
"requiresCustomScript": false, "requiresCustomScript": false,
"supportedHosts": ["SharePointWebPart"],
"preconfiguredEntries": [{ "preconfiguredEntries": [{
"groupId": "5c03119e-3074-46fd-976b-c60198311f70", // Other "groupId": "5c03119e-3074-46fd-976b-c60198311f70", // Other

View File

@ -1,12 +1,10 @@
import * as React from 'react'; import * as React from 'react';
import * as ReactDom from 'react-dom'; import * as ReactDom from 'react-dom';
import { Version } from '@microsoft/sp-core-library'; import { Version } from '@microsoft/sp-core-library';
import {
BaseClientSideWebPart,
IPropertyPaneConfiguration, import { BaseClientSideWebPart } from "@microsoft/sp-webpart-base";
PropertyPaneTextField, import { IPropertyPaneConfiguration, PropertyPaneTextField, PropertyPaneSlider } from "@microsoft/sp-property-pane";
PropertyPaneSlider
} from '@microsoft/sp-webpart-base';
import * as strings from 'YoutubeWebPartStrings'; import * as strings from 'YoutubeWebPartStrings';
import Youtube from './components/Youtube'; import Youtube from './components/Youtube';

View File

@ -1,16 +1,39 @@
{ {
"extends": "./node_modules/@microsoft/rush-stack-compiler-3.3/includes/tsconfig-web.json",
"compilerOptions": { "compilerOptions": {
"target": "es5", "target": "es5",
"forceConsistentCasingInFileNames": true, "forceConsistentCasingInFileNames": true,
"module": "commonjs", "module": "esnext",
"moduleResolution": "node",
"jsx": "react", "jsx": "react",
"declaration": true, "declaration": true,
"sourceMap": true, "sourceMap": true,
"experimentalDecorators": true, "experimentalDecorators": true,
"skipLibCheck": true,
"outDir": "lib",
"inlineSources": false,
"strictNullChecks": false,
"noUnusedLocals": false,
"typeRoots": [
"./node_modules/@types",
"./node_modules/@microsoft"
],
"types": [ "types": [
"es6-promise", "es6-promise",
"es6-collections",
"webpack-env" "webpack-env"
],
"lib": [
"es5",
"dom",
"es2015.collection"
] ]
} },
"include": [
"src/**/*.ts",
"src/**/*.tsx"
],
"exclude": [
"node_modules",
"lib"
]
} }

View File

@ -1,3 +1,30 @@
{ {
"rulesDirectory": "./config" "extends": "@microsoft/sp-tslint-rules/base-tslint.json",
} "rules": {
"class-name": false,
"export-name": false,
"forin": false,
"label-position": false,
"member-access": true,
"no-arg": false,
"no-console": false,
"no-construct": false,
"no-duplicate-variable": true,
"no-eval": false,
"no-function-expression": true,
"no-internal-module": true,
"no-shadowed-variable": true,
"no-switch-case-fall-through": true,
"no-unnecessary-semicolons": true,
"no-unused-expression": true,
"no-use-before-declare": true,
"no-with-statement": true,
"semicolon": true,
"trailing-comma": false,
"typedef": false,
"typedef-whitespace": false,
"use-named-parameter": true,
"variable-name": false,
"whitespace": false
}
}