diff --git a/.eslintrc.js b/.eslintrc.js index de682f2488..a365dd8f2e 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -33,7 +33,7 @@ module.exports = { accessibility: 'explicit', }, ], - '@typescript-eslint/indent': 'off', + '@typescript-eslint/indent': ['error', 2], '@typescript-eslint/interface-name-prefix': 'off', '@typescript-eslint/member-delimiter-style': [ 'off', @@ -85,7 +85,7 @@ module.exports = { 'arrow-parens': ['off', 'as-needed'], camelcase: 'off', 'capitalized-comments': 'off', - 'comma-dangle': 'off', + 'comma-dangle': ['error', 'never'], complexity: 'off', 'constructor-super': 'error', curly: 'error', @@ -98,7 +98,7 @@ module.exports = { 'import/order': 'off', 'linebreak-style': 'off', 'max-classes-per-file': ['error', 1], - 'max-len': 'off', + 'max-len': ['error', { 'code': 120 }], 'new-parens': 'off', 'newline-per-chained-call': 'off', 'no-bitwise': 'error', @@ -110,12 +110,13 @@ module.exports = { 'no-empty': 'error', 'no-eval': 'error', 'no-extra-boolean-cast': 0, - 'no-extra-semi': 'off', + 'no-extra-semi': 'warn', 'no-fallthrough': 'off', 'no-invalid-this': 'off', - 'no-irregular-whitespace': 'off', - 'no-multiple-empty-lines': 'off', + 'no-irregular-whitespace': 'warn', + 'no-multiple-empty-lines': 'error', 'no-new-wrappers': 'error', + 'quotes': ['error', 'single'], 'no-shadow': [ 'warn', { @@ -123,12 +124,12 @@ module.exports = { }, ], 'no-throw-literal': 'error', - 'no-trailing-spaces': 'off', + 'no-trailing-spaces': 'warn', 'no-undef-init': 'error', 'no-underscore-dangle': 'off', 'no-unsafe-finally': 'error', 'no-unused-labels': 'error', - 'no-unused-vars': 'off', + 'no-unused-vars': 'warn', 'no-var': 'error', 'object-shorthand': 'error', 'one-var': ['error', 'never'], @@ -138,7 +139,11 @@ module.exports = { radix: 'error', 'react/no-unescaped-entities': 0, 'react/prop-types': 0, - 'space-before-function-paren': 'off', + 'space-before-function-paren': ['error', { + 'anonymous': 'always', + 'named': 'never', + 'asyncArrow': 'always' + }], 'spaced-comment': 'off', 'use-isnan': 'error', 'valid-typeof': 'off', diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000000..4872c5afd2 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,7 @@ +version: 2 +updates: +- package-ecosystem: npm + directory: "/" + schedule: + interval: daily + open-pull-requests-limit: 10 diff --git a/.github/workflows/azure-static-web-apps-jolly-sand-0ac78c710.yml b/.github/workflows/azure-static-web-apps-jolly-sand-0ac78c710.yml index edc8abb52c..429c9be20d 100644 --- a/.github/workflows/azure-static-web-apps-jolly-sand-0ac78c710.yml +++ b/.github/workflows/azure-static-web-apps-jolly-sand-0ac78c710.yml @@ -1,4 +1,4 @@ -name: Azure Static Web Apps CI/CD +name: Static preview site creation on: push: @@ -21,7 +21,11 @@ jobs: - name: Build And Deploy env: REACT_APP_CLIENT_ID: ${{ secrets.REACT_APP_CLIENT_ID }} + REACT_APP_FEEDBACK_CAMPAIGN_ID: ${{ secrets.REACT_APP_FEEDBACK_CAMPAIGN_ID }}, + REACT_APP_NPS_FEEDBACK_CAMPAIGN_ID: ${{secrets.REACT_APP_NPS_FEEDBACK_CAMPAIGN_ID}} REACT_APP_INSTRUMENTATION_KEY: ${{ secrets.REACT_APP_STAGING_INSTRUMENTATION_KEY }} + REACT_APP_NOMINATION_PERIOD: ${{secrets.REACT_APP_NOMINATION_PERIOD}} + REACT_APP_COOLDOWN_PERIOD: ${{secrets.REACT_APP_COOLDOWN_PERIOD}} id: builddeploy uses: Azure/static-web-apps-deploy@v0.0.1-preview with: diff --git a/.github/workflows/linter.yml b/.github/workflows/linter.yml new file mode 100644 index 0000000000..950fa44c5f --- /dev/null +++ b/.github/workflows/linter.yml @@ -0,0 +1,21 @@ +name: Lint and Build + +on: + push + +jobs: + code-linting: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + + - name: Install Nodejs + uses: actions/setup-node@v2 + with: + node-version: '12.x' + + - name: Install dependencies + run: npm install + + - name: Run linter + run: npm run lint diff --git a/.gitignore b/.gitignore index 1a185b7bf8..39e8b98e29 100644 --- a/.gitignore +++ b/.gitignore @@ -22,6 +22,5 @@ yarn-debug.log* yarn-error.log* .idea -.vscode .vs *.xml diff --git a/.vscode/extensions.json b/.vscode/extensions.json new file mode 100644 index 0000000000..5c69c7a395 --- /dev/null +++ b/.vscode/extensions.json @@ -0,0 +1,26 @@ +{ + // See https://go.microsoft.com/fwlink/?LinkId=827846 to learn about workspace recommendations. + // Extension identifier format: ${publisher}.${name}. Example: vscode.csharp + + // List of extensions which should be recommended for users of this workspace. + "recommendations": [ + "formulahendry.auto-close-tag", + "Atishay-Jain.All-Autocomplete", + "GitHub.vscode-pull-request-github", + "ionutvmi.path-autocomplete", + "dsznajder.es7-react-js-snippets", + "formulahendry.auto-rename-tag", + "dbaeumer.vscode-eslint", + "techer.open-in-browser", + "igor-uzhviev.jwt-decoder", + "kisstkondoros.vscode-codemetrics", + "naumovs.color-highlight", + "ms-vscode.sublime-keybindings", + "redhat.vscode-yaml", + "redhat.vscode-commons" + ], + // List of extensions recommended by VS Code that should not be recommended for users of this workspace. + "unwantedRecommendations": [ + + ] +} \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json index 58979303d4..c701cedc01 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -9,10 +9,14 @@ }, "files.trimTrailingWhitespace": true, "editor.codeActionsOnSave": { - "source.fixAll.tslint": true + "source.fixAll.eslint": true }, + "eslint.format.enable": true, "editor.formatOnSave": true, "editor.formatOnPaste": true, "typescript.updateImportsOnFileMove.enabled": "always", - "eslint.validate": ["typescript", "typescriptreact"] + "eslint.validate": [ + "typescript", + "typescriptreact" + ], } diff --git a/CHANGELOG.md b/CHANGELOG.md index 1a9da2fde5..b3a001ac1a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,54 @@ All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. +## [4.7.0](https://github.com/microsoftgraph/microsoft-graph-explorer-v4/compare/v4.2.0...v4.7.0) (2021-05-31) + + +### Bug Fixes + +* Adaptive cards changes ([#873](https://github.com/microsoftgraph/microsoft-graph-explorer-v4/issues/873)) ([f225fe4](https://github.com/microsoftgraph/microsoft-graph-explorer-v4/commit/f225fe4abd874f27cc742badc5f39c50578c3e22)) +* adaptive cards destroy ([#848](https://github.com/microsoftgraph/microsoft-graph-explorer-v4/issues/848)) ([933e9bb](https://github.com/microsoftgraph/microsoft-graph-explorer-v4/commit/933e9bb0fb655b83f8042b6e32ac0cdd09a09077)) +* Adaptive cards instrumentation ([#849](https://github.com/microsoftgraph/microsoft-graph-explorer-v4/issues/849)) ([4022373](https://github.com/microsoftgraph/microsoft-graph-explorer-v4/commit/40223730ce84fb41aac1bf72c94bc2c22bfd8d33)) +* Add 'Maximize sidebar' aria-label ([#842](https://github.com/microsoftgraph/microsoft-graph-explorer-v4/issues/842)) ([4e14352](https://github.com/microsoftgraph/microsoft-graph-explorer-v4/commit/4e143524dd0b706cfe55d5582f36ed5aa63ec6d3)) +* add fallback texts to placeholder text ([#690](https://github.com/microsoftgraph/microsoft-graph-explorer-v4/issues/690)) ([4419110](https://github.com/microsoftgraph/microsoft-graph-explorer-v4/commit/441911079035b2cbbe137f168c8fb3baa0887dec)) +* add onItemInvoked action ([#806](https://github.com/microsoftgraph/microsoft-graph-explorer-v4/issues/806)) ([0498d39](https://github.com/microsoftgraph/microsoft-graph-explorer-v4/commit/0498d394bad29d2c6dfd5cc083c9e9b9ce679b9d)) +* adjust column width ([#850](https://github.com/microsoftgraph/microsoft-graph-explorer-v4/issues/850)) ([d054f35](https://github.com/microsoftgraph/microsoft-graph-explorer-v4/commit/d054f350915ffd1fd7fc2f8290648658844e0948)) +* all permissions show as required ([#797](https://github.com/microsoftgraph/microsoft-graph-explorer-v4/issues/797)) ([ed6815a](https://github.com/microsoftgraph/microsoft-graph-explorer-v4/commit/ed6815a6286c57efa64ce6fbd2f20cdf7a7fc8f1)) +* autocomplete options not displaying ([#847](https://github.com/microsoftgraph/microsoft-graph-explorer-v4/issues/847)) ([100ddf1](https://github.com/microsoftgraph/microsoft-graph-explorer-v4/commit/100ddf1e0f5ff3c0cb91d5623e9cc754159f7196)) +* autocomplete-onfocusout ([#855](https://github.com/microsoftgraph/microsoft-graph-explorer-v4/issues/855)) ([e80af0b](https://github.com/microsoftgraph/microsoft-graph-explorer-v4/commit/e80af0b353e4deae3629a7b002291ccdd845a2ba)) +* breaking change with the adaptive cards templating library ([#735](https://github.com/microsoftgraph/microsoft-graph-explorer-v4/issues/735)) ([059acb3](https://github.com/microsoftgraph/microsoft-graph-explorer-v4/commit/059acb39126a0d2e476d09944c720892674e94a6)) +* Concept try-it button ([#966](https://github.com/microsoftgraph/microsoft-graph-explorer-v4/issues/966)) ([b80bdcf](https://github.com/microsoftgraph/microsoft-graph-explorer-v4/commit/b80bdcfde701c0da82263b798f48d03f87221efc)) +* copy paste query address bar ([#658](https://github.com/microsoftgraph/microsoft-graph-explorer-v4/issues/658)) ([f47d237](https://github.com/microsoftgraph/microsoft-graph-explorer-v4/commit/f47d23733a73b9e4dc33b5c328e2e87feed318a1)) +* create onenote page ([#708](https://github.com/microsoftgraph/microsoft-graph-explorer-v4/issues/708)) ([e3a6474](https://github.com/microsoftgraph/microsoft-graph-explorer-v4/commit/e3a6474bcf5ed37af237a1a4bae9695553d7d6f3)) +* duplicate aria labels ([#752](https://github.com/microsoftgraph/microsoft-graph-explorer-v4/issues/752)) ([1a70245](https://github.com/microsoftgraph/microsoft-graph-explorer-v4/commit/1a70245632e387f6bc50428dae65b6ea08652d62)) +* Enable screen reader confirmation feedback ([#802](https://github.com/microsoftgraph/microsoft-graph-explorer-v4/issues/802)) ([5bf4550](https://github.com/microsoftgraph/microsoft-graph-explorer-v4/commit/5bf4550ba415dcfba31fc8e2032e0f05f3275fd8)) +* expand maxWidth allow more humanName chars ([#764](https://github.com/microsoftgraph/microsoft-graph-explorer-v4/issues/764)) ([74d0401](https://github.com/microsoftgraph/microsoft-graph-explorer-v4/commit/74d0401b3de9e8941e7887ef95288e1f5c3298ac)) +* focus order ([#763](https://github.com/microsoftgraph/microsoft-graph-explorer-v4/issues/763)) ([938d1ac](https://github.com/microsoftgraph/microsoft-graph-explorer-v4/commit/938d1ac436282d09400c6405071afc6984b53dc3)) +* Graph Explorer link colors ([#846](https://github.com/microsoftgraph/microsoft-graph-explorer-v4/issues/846)) ([ededbe1](https://github.com/microsoftgraph/microsoft-graph-explorer-v4/commit/ededbe1bef80f7bd46bb8e26fcccd88faa216844)) +* intermittent create page error ([#837](https://github.com/microsoftgraph/microsoft-graph-explorer-v4/issues/837)) ([9b102b5](https://github.com/microsoftgraph/microsoft-graph-explorer-v4/commit/9b102b5a8110d36f98f179d9bb90a23f3fafd93c)) +* javascript injection ([#925](https://github.com/microsoftgraph/microsoft-graph-explorer-v4/issues/925)) ([94bf808](https://github.com/microsoftgraph/microsoft-graph-explorer-v4/commit/94bf80828e2925531159d10ad912deac9a2b6477)) +* Message bar truncation ([#679](https://github.com/microsoftgraph/microsoft-graph-explorer-v4/issues/679)) ([569bf53](https://github.com/microsoftgraph/microsoft-graph-explorer-v4/commit/569bf53eef99179bfe811de5a09835fb86656bea)) +* metadata syntax highlighting ([#864](https://github.com/microsoftgraph/microsoft-graph-explorer-v4/issues/864)) ([9d705d6](https://github.com/microsoftgraph/microsoft-graph-explorer-v4/commit/9d705d66fac75d10ac1d07f6e98c66c4a4793c2c)) +* modify permissions tab UI ([#790](https://github.com/microsoftgraph/microsoft-graph-explorer-v4/issues/790)) ([dcefa4b](https://github.com/microsoftgraph/microsoft-graph-explorer-v4/commit/dcefa4b573e6eb609fccc6fa079541ff0fade99b)) +* permissions consent ([#807](https://github.com/microsoftgraph/microsoft-graph-explorer-v4/issues/807)) ([743a0df](https://github.com/microsoftgraph/microsoft-graph-explorer-v4/commit/743a0df1492ad1d7a4b08921eaf6be2b546d0ec6)) +* permissions tab UI ([#815](https://github.com/microsoftgraph/microsoft-graph-explorer-v4/issues/815)) ([a2098b9](https://github.com/microsoftgraph/microsoft-graph-explorer-v4/commit/a2098b9c5c3c793d712d51583a68bdc8875dc825)) +* prevent resize when view expanded ([#816](https://github.com/microsoftgraph/microsoft-graph-explorer-v4/issues/816)) ([6f1234f](https://github.com/microsoftgraph/microsoft-graph-explorer-v4/commit/6f1234f7fabb16f75ac1c0a1d8aaba4c1b2c0a3e)) +* prevent running empty requests ([#965](https://github.com/microsoftgraph/microsoft-graph-explorer-v4/issues/965)) ([c4d6826](https://github.com/microsoftgraph/microsoft-graph-explorer-v4/commit/c4d6826e775918590f0884c25eb3918be39032fd)) +* prevent running empty requests ([#972](https://github.com/microsoftgraph/microsoft-graph-explorer-v4/issues/972)) ([37a7372](https://github.com/microsoftgraph/microsoft-graph-explorer-v4/commit/37a7372ab765b36caab4dbd18cb64478b8368ca8)) +* Remove main tag ([#680](https://github.com/microsoftgraph/microsoft-graph-explorer-v4/issues/680)) ([5e634dd](https://github.com/microsoftgraph/microsoft-graph-explorer-v4/commit/5e634ddbbcc20bdd5662b11e94fc3307e5c6e84f)) +* remove unnecessary code snippets tab ([#695](https://github.com/microsoftgraph/microsoft-graph-explorer-v4/issues/695)) ([7aca4fc](https://github.com/microsoftgraph/microsoft-graph-explorer-v4/commit/7aca4fca87f0e09fea706f254ce3ae4799740a9b)) +* remove wrongly placed working ([#795](https://github.com/microsoftgraph/microsoft-graph-explorer-v4/issues/795)) ([07db101](https://github.com/microsoftgraph/microsoft-graph-explorer-v4/commit/07db101fb9d07a48afcc4926e6f2b5df92e5964c)) +* rename component name ([#859](https://github.com/microsoftgraph/microsoft-graph-explorer-v4/issues/859)) ([e31cc2c](https://github.com/microsoftgraph/microsoft-graph-explorer-v4/commit/e31cc2cd1df394ac75880160c3936b24989c716d)) +* sample query sample body ([#775](https://github.com/microsoftgraph/microsoft-graph-explorer-v4/issues/775)) ([b64a110](https://github.com/microsoftgraph/microsoft-graph-explorer-v4/commit/b64a1101190a57953a807b2a02d879bcf3e92761)) +* sanitize url when fetching permissions ([#794](https://github.com/microsoftgraph/microsoft-graph-explorer-v4/issues/794)) ([acfbba9](https://github.com/microsoftgraph/microsoft-graph-explorer-v4/commit/acfbba9be4ee46111089996ad5c7aa9004f792d3)) +* shrink request section ([#822](https://github.com/microsoftgraph/microsoft-graph-explorer-v4/issues/822)) ([13074a4](https://github.com/microsoftgraph/microsoft-graph-explorer-v4/commit/13074a46ccec78b786e479d4b3e7b8ba820143d0)) +* snippets not available ([#877](https://github.com/microsoftgraph/microsoft-graph-explorer-v4/issues/877)) ([b5c99a8](https://github.com/microsoftgraph/microsoft-graph-explorer-v4/commit/b5c99a834557951bba1ee4716bba6fa1073c4f16)) +* sovereign clouds metadata ([#676](https://github.com/microsoftgraph/microsoft-graph-explorer-v4/issues/676)) ([d0de298](https://github.com/microsoftgraph/microsoft-graph-explorer-v4/commit/d0de298e0d4068defaa9b135e99820c28a366d6f)) +* stop display of options when fetching suggestions ([#778](https://github.com/microsoftgraph/microsoft-graph-explorer-v4/issues/778)) ([4aad40d](https://github.com/microsoftgraph/microsoft-graph-explorer-v4/commit/4aad40d968b884e10f33db3d1a03140f14568946)) +* support different content types ([#814](https://github.com/microsoftgraph/microsoft-graph-explorer-v4/issues/814)) ([ccd8702](https://github.com/microsoftgraph/microsoft-graph-explorer-v4/commit/ccd8702a4948ae523cf647838e35bf4775c0e5fe)) +* Undo 'react-dev-utils' package update ([#920](https://github.com/microsoftgraph/microsoft-graph-explorer-v4/issues/920)) ([fe5c842](https://github.com/microsoftgraph/microsoft-graph-explorer-v4/commit/fe5c842acf377a6dd33da86fed5b08556d8e45b3)) +* Update GitHub workflow ([#962](https://github.com/microsoftgraph/microsoft-graph-explorer-v4/issues/962)) ([66dc22b](https://github.com/microsoftgraph/microsoft-graph-explorer-v4/commit/66dc22b52b25ca8d4ea942343495353cc2870efd)) + ### [4.1.9](https://github.com/microsoftgraph/microsoft-graph-explorer-v2/compare/v4.1.7...v4.1.9) (2020-09-24) * disabled query related telemetry in SampleQueries.tsx diff --git a/__mocks__/react-monaco-editor.js b/__mocks__/react-monaco-editor.js index 3cfcd78b3c..b1da3d5df4 100644 --- a/__mocks__/react-monaco-editor.js +++ b/__mocks__/react-monaco-editor.js @@ -1,7 +1,7 @@ import * as React from 'react'; function MonacoEditor() { - return (
); + return (); } module.exports.default = MonacoEditor; \ No newline at end of file diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 1c35cfad8f..afe5e28017 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -56,70 +56,74 @@ trigger: jobs: - job: One - displayName: 'Build and test validation' + displayName: "Build and test validation" steps: - task: CredScan@2 inputs: - toolMajorVersion: 'V2' + toolMajorVersion: "V2" - task: NodeTool@0 inputs: - versionSpec: '12.x' - displayName: 'Install Node.js' + versionSpec: "12.x" + displayName: "Install Node.js" - script: | npm install - displayName: 'npm install' + displayName: "npm install" - script: | npm run lint - displayName: 'Runs linting checks' + displayName: "Runs linting checks" - script: | npm test - displayName: 'Runs Unit tests' + displayName: "Runs Unit tests" - script: | npm run ci - displayName: 'Runs Accessibility tests' + displayName: "Runs Accessibility tests" - task: PublishTestResults@2 condition: succeededOrFailed() inputs: - testResultsFormat: 'JUnit' - testResultsFiles: 'test-report.xml' - displayName: 'Publish Test Results' + testResultsFormat: "JUnit" + testResultsFiles: "test-report.xml" + displayName: "Publish Test Results" - script: | npm run build - displayName: 'Run build' + displayName: "Run build" - job: Two - displayName: 'Publish artifacts' + displayName: "Publish artifacts" dependsOn: One condition: succeeded() steps: - task: NodeTool@0 inputs: - versionSpec: '12.x' - displayName: 'Install Node.js' + versionSpec: "12.x" + displayName: "Install Node.js" - script: | npm install - displayName: 'npm install' + displayName: "npm install" - script: | npm run build env: REACT_APP_CLIENT_ID: $(REACT_APP_STAGING_CLIENT_ID) REACT_APP_INSTRUMENTATION_KEY: $(REACT_APP_STAGING_INSTRUMENTATION_KEY) - displayName: 'Build static assets for staging' + REACT_APP_FEEDBACK_CAMPAIGN_ID: $(REACT_APP_STAGING_FEEDBACK_CAMPAIGN_ID) + REACT_APP_NPS_FEEDBACK_CAMPAIGN_ID: $(REACT_APP_NPS_FEEDBACK_CAMPAIGN_ID) + REACT_APP_NOMINATION_PERIOD: $(REACT_APP_NOMINATION_PERIOD) + REACT_APP_COOLDOWN_PERIOD: $(REACT_APP_COOLDOWN_PERIOD) + displayName: "Build static assets for staging" - task: PowerShell@2 - displayName: 'Set version-number' + displayName: "Set version-number" condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/master')) inputs: - targetType: 'inline' + targetType: "inline" script: | $lernaPath = "$Env:BUILD_SOURCESDIRECTORY\package.json" $json = Get-Content "$lernaPath" | Out-String | ConvertFrom-Json @@ -133,23 +137,27 @@ jobs: env: REACT_APP_CLIENT_ID: $(REACT_APP_PROD_CLIENT_ID) REACT_APP_INSTRUMENTATION_KEY: $(REACT_APP_INSTRUMENTATION_KEY) - displayName: 'Build static assets for prod' + REACT_APP_FEEDBACK_CAMPAIGN_ID: $(REACT_APP_FEEDBACK_CAMPAIGN_ID) + REACT_APP_NPS_FEEDBACK_CAMPAIGN_ID: $(REACT_APP_NPS_FEEDBACK_CAMPAIGN_ID) + REACT_APP_NOMINATION_PERIOD: $(REACT_APP_NOMINATION_PERIOD) + REACT_APP_COOLDOWN_PERIOD: $(REACT_APP_COOLDOWN_PERIOD) + displayName: "Build static assets for prod" - task: CopyFiles@1 - displayName: 'Copy files to: $(Build.ArtifactStagingDirectory)' + displayName: "Copy files to: $(Build.ArtifactStagingDirectory)" inputs: - SourceFolder: '$(System.DefaultWorkingDirectory)/build' - TargetFolder: '$(Build.ArtifactStagingDirectory)' + SourceFolder: "$(System.DefaultWorkingDirectory)/build" + TargetFolder: "$(Build.ArtifactStagingDirectory)" - task: PublishBuildArtifacts@1 - displayName: 'Publish Artifact: drop' + displayName: "Publish Artifact: drop" inputs: - PathtoPublish: '$(build.ArtifactStagingDirectory)' + PathtoPublish: "$(build.ArtifactStagingDirectory)" - task: DeleteFiles@1 inputs: contents: node_modules - displayName: 'Delete node_modules' + displayName: "Delete node_modules" # - task: YodLabs.O365PostMessage.O365PostMessageBuild.O365PostMessageBuild@0 # displayName: 'Graph Client Tooling pipeline fail notification' diff --git a/config/env.js b/config/env.js index 211711b2dd..99308c5af6 100644 --- a/config/env.js +++ b/config/env.js @@ -22,7 +22,7 @@ const dotenvFiles = [ // since normally you expect tests to produce the same // results for everyone NODE_ENV !== 'test' && `${paths.dotenv}.local`, - paths.dotenv, + paths.dotenv ].filter(Boolean); // Load environment variables from .env* files. Suppress warnings using silent @@ -34,7 +34,7 @@ dotenvFiles.forEach(dotenvFile => { if (fs.existsSync(dotenvFile)) { require('dotenv-expand')( require('dotenv').config({ - path: dotenvFile, + path: dotenvFile }) ); } @@ -76,7 +76,7 @@ function getClientEnvironment(publicUrl) { // For example,