diff --git a/.codesandbox/ci.json b/.codesandbox/ci.json index 2cd7dc2ea27a1..3c7f242e787a1 100644 --- a/.codesandbox/ci.json +++ b/.codesandbox/ci.json @@ -2,5 +2,5 @@ "buildCommand": "build:codesandbox", "packages": ["packages/react", "packages/react-components/react-components"], "sandboxes": ["x5u3t", "spnyu"], - "node": "16" + "node": "18" } diff --git a/.devops/templates/tools.yml b/.devops/templates/tools.yml index 64b7f4dd5f982..9bb108e8af602 100644 --- a/.devops/templates/tools.yml +++ b/.devops/templates/tools.yml @@ -6,7 +6,7 @@ steps: # - we can use only versions that ship with container, otherwise we will run into nodejs installation issues. # - as 1es bumps those versions within container automatically we need to use `.x` to not run into issues once they bump the versions. # https://github.com/actions/runner-images/blob/ubuntu20/20230924.1/images/linux/Ubuntu2004-Readme.md#nodejs - version: '16.x' + version: '18.x' checkLatest: false displayName: 'Install Node.js' retryCountOnTaskFailure: 1 diff --git a/.github/workflows/check-packages.yml b/.github/workflows/check-packages.yml index 228b9908b14a5..10b317ac3c226 100644 --- a/.github/workflows/check-packages.yml +++ b/.github/workflows/check-packages.yml @@ -12,7 +12,7 @@ jobs: - uses: actions/setup-node@v3 with: - node-version: 16.20.2 + node-version: 18.x cache: 'yarn' - uses: tj-actions/changed-files@v34 @@ -44,7 +44,7 @@ jobs: - uses: actions/setup-node@v3 with: - node-version: 16.20.2 + node-version: 18.x - uses: actions/github-script@v6 with: @@ -70,7 +70,7 @@ jobs: - uses: actions/setup-node@v3 with: - node-version: 16.20.2 + node-version: 18.x - uses: actions/github-script@v6 with: diff --git a/.github/workflows/docsite-publish-chromatic.yml b/.github/workflows/docsite-publish-chromatic.yml index 0b790c7fb4f53..420c5e0c34c7e 100644 --- a/.github/workflows/docsite-publish-chromatic.yml +++ b/.github/workflows/docsite-publish-chromatic.yml @@ -37,7 +37,7 @@ jobs: - uses: actions/setup-node@v3 with: - node-version: 16.20.2 + node-version: 18.x cache: 'yarn' - name: Install packages diff --git a/.github/workflows/docsite-publish-ghpages.yml b/.github/workflows/docsite-publish-ghpages.yml index 8e861235ef505..e2f15e4b07ff2 100644 --- a/.github/workflows/docsite-publish-ghpages.yml +++ b/.github/workflows/docsite-publish-ghpages.yml @@ -37,7 +37,7 @@ jobs: - uses: actions/setup-node@v3 with: - node-version: 16.20.2 + node-version: 18.x cache: 'yarn' - name: Install packages diff --git a/change/@fluentui-eslint-plugin-222b39b1-1e9b-458f-8ddf-0dfef3a6717e.json b/change/@fluentui-eslint-plugin-222b39b1-1e9b-458f-8ddf-0dfef3a6717e.json new file mode 100644 index 0000000000000..472b082735b0c --- /dev/null +++ b/change/@fluentui-eslint-plugin-222b39b1-1e9b-458f-8ddf-0dfef3a6717e.json @@ -0,0 +1,7 @@ +{ + "type": "patch", + "comment": "chore: bump eslint-plugin-jsdoc to version which support node 18", + "packageName": "@fluentui/eslint-plugin", + "email": "martinhochel@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/change/@fluentui-utilities-9901c7ce-5a05-4473-ab4f-ff74df9878eb.json b/change/@fluentui-utilities-9901c7ce-5a05-4473-ab4f-ff74df9878eb.json new file mode 100644 index 0000000000000..1c7be6b02b6d9 --- /dev/null +++ b/change/@fluentui-utilities-9901c7ce-5a05-4473-ab4f-ff74df9878eb.json @@ -0,0 +1,7 @@ +{ + "type": "none", + "comment": "chore: use Timers types based on environment to avoid TS failures introduced with node 18 types", + "packageName": "@fluentui/utilities", + "email": "martinhochel@microsoft.com", + "dependentChangeType": "none" +} diff --git a/package.json b/package.json index 514780a3b6add..0df36ef706dbb 100644 --- a/package.json +++ b/package.json @@ -167,7 +167,7 @@ "@types/lodash": "4.14.182", "@types/markdown-table": "2.0.0", "@types/micromatch": "4.0.2", - "@types/node": "16.18.58", + "@types/node": "18.18.6", "@types/prettier": "2.7.2", "@types/progress": "2.0.5", "@types/prompts": "2.4.1", @@ -194,7 +194,7 @@ "ajv": "8.4.0", "autoprefixer": "10.2.1", "babel-jest": "29.7.0", - "babel-loader": "8.2.2", + "babel-loader": "8.3.0", "babel-plugin-annotate-pure-calls": "0.4.0", "babel-plugin-annotate-pure-imports": "1.0.0-1", "babel-plugin-iife-wrap-react-components": "1.0.0-5", @@ -235,7 +235,7 @@ "eslint-plugin-es": "4.1.0", "eslint-plugin-import": "2.25.4", "eslint-plugin-jest": "23.20.0", - "eslint-plugin-jsdoc": "^36.0.7", + "eslint-plugin-jsdoc": "39.9.1", "eslint-plugin-jsx-a11y": "6.4.1", "eslint-plugin-react": "7.26.0", "eslint-plugin-react-hooks": "4.2.0", diff --git a/packages/eslint-plugin/package.json b/packages/eslint-plugin/package.json index 1be1f699e54fd..76e030f0e15f2 100644 --- a/packages/eslint-plugin/package.json +++ b/packages/eslint-plugin/package.json @@ -24,7 +24,7 @@ "eslint-plugin-deprecation": "^1.2.1", "eslint-plugin-import": "^2.22.1", "eslint-plugin-jest": "^23.13.2", - "eslint-plugin-jsdoc": "^36.0.7", + "eslint-plugin-jsdoc": "^39.9.1", "eslint-plugin-jsx-a11y": "^6.4.1", "eslint-plugin-react": "^7.24.0", "eslint-plugin-react-hooks": "^4.2.0", diff --git a/packages/fluentui/local-sandbox/package.json b/packages/fluentui/local-sandbox/package.json index 2d0c0b2c1308b..c16c8dcf0264a 100644 --- a/packages/fluentui/local-sandbox/package.json +++ b/packages/fluentui/local-sandbox/package.json @@ -4,7 +4,7 @@ "private": true, "license": "MIT", "scripts": { - "build:withdependencies": "yarn --cwd ../../.. build --scope=@fluentui/local-sandbox --include-filtered-dependencies", + "build:withdependencies": "yarn lage build --verbose --scope=@fluentui/local-sandbox --include-filtered-dependencies", "build": "webpack", "build:production": "webpack -p", "serve": "node ./server.js" diff --git a/packages/utilities/src/safeSetTimeout.ts b/packages/utilities/src/safeSetTimeout.ts index 805589277530d..cec1feeb35a06 100644 --- a/packages/utilities/src/safeSetTimeout.ts +++ b/packages/utilities/src/safeSetTimeout.ts @@ -8,15 +8,15 @@ import { extendComponent } from './extendComponent'; * accesses things within the component after being unmounted. */ export const safeSetTimeout = (component: React.Component) => { - let activeTimeouts: Set; + let activeTimeouts: Set>; return (cb: Function, duration: number) => { if (!activeTimeouts) { - activeTimeouts = new Set(); + activeTimeouts = new Set(); extendComponent(component, { componentWillUnmount: () => { - activeTimeouts.forEach((id: NodeJS.Timer) => clearTimeout(id)); + activeTimeouts.forEach(id => clearTimeout(id)); }, }); } diff --git a/syncpack.config.js b/syncpack.config.js index ca62b3434f177..163627aed882c 100644 --- a/syncpack.config.js +++ b/syncpack.config.js @@ -52,6 +52,7 @@ const config = { 'eslint-plugin-jsx-a11y', 'eslint-plugin-react', 'eslint-plugin-react-hooks', + 'eslint-plugin-jsdoc', 'fs-extra', 'glob', 'jju', diff --git a/yarn.lock b/yarn.lock index addc08a5313a4..1284bbfe48a6f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1663,14 +1663,14 @@ resolved "https://registry.yarnpkg.com/@emotion/weak-memoize/-/weak-memoize-0.2.5.tgz#8eed982e2ee6f7f4e44c253e12962980791efd46" integrity sha512-6U71C2Wp7r5XtFtQzYrW5iKFT67OixrSxjI4MptCHzdSVlgabczzqLe0ZSgnub/5Kp4hSbpDB1tMytZY9pwxxA== -"@es-joy/jsdoccomment@0.10.7": - version "0.10.7" - resolved "https://registry.yarnpkg.com/@es-joy/jsdoccomment/-/jsdoccomment-0.10.7.tgz#bdb5dfcaa5cff8b5435f0c9f2777b533075a9c52" - integrity sha512-aNKZEoMESDzOBjKxCWrFuG50mcpMeKVBnBNko4+IZZ5t9zXYs8GT1KB0ZaOq1YUsKumDRc6YII/TQm309MJ0KQ== +"@es-joy/jsdoccomment@~0.36.1": + version "0.36.1" + resolved "https://registry.yarnpkg.com/@es-joy/jsdoccomment/-/jsdoccomment-0.36.1.tgz#c37db40da36e4b848da5fd427a74bae3b004a30f" + integrity sha512-922xqFsTpHs6D0BUiG4toiyPOMc8/jafnWKxz1KWgS4XzKPy2qXf1Pe6UFuNSCQqt6tOuhAWXBNuuyUhJmw9Vg== dependencies: - comment-parser "1.2.3" + comment-parser "1.3.1" esquery "^1.4.0" - jsdoc-type-pratt-parser "1.1.1" + jsdoc-type-pratt-parser "~3.1.0" "@esbuild/android-arm64@0.19.2": version "0.19.2" @@ -5342,16 +5342,21 @@ "@types/node" "*" form-data "^3.0.0" -"@types/node@*", "@types/node@16.18.58", "@types/node@>=10.0.0", "@types/node@^14.0.10 || ^16.0.0", "@types/node@^14.14.20 || ^16.0.0": - version "16.18.58" - resolved "https://registry.yarnpkg.com/@types/node/-/node-16.18.58.tgz#bf66f63983104ed57c754f4e84ccaf16f8235adb" - integrity sha512-YGncyA25/MaVtQkjWW9r0EFBukZ+JulsLcVZBlGUfIb96OBMjkoRWwQo5IEWJ8Fj06Go3GHw+bjYDitv6BaGsA== +"@types/node@*", "@types/node@>=10.0.0", "@types/node@^14.0.10 || ^16.0.0", "@types/node@^14.14.20 || ^16.0.0", "@types/node@^14.14.31": + version "14.18.32" + resolved "https://registry.yarnpkg.com/@types/node/-/node-14.18.32.tgz#8074f7106731f1a12ba993fe8bad86ee73905014" + integrity sha512-Y6S38pFr04yb13qqHf8uk1nHE3lXgQ30WZbv1mLliV9pt0NjvqdWttLcrOYLnXbOafknVYRHZGoMSpR9UwfYow== "@types/node@12.20.24": version "12.20.24" resolved "https://registry.yarnpkg.com/@types/node/-/node-12.20.24.tgz#c37ac69cb2948afb4cef95f424fa0037971a9a5c" integrity sha512-yxDeaQIAJlMav7fH5AQqPH1u8YIuhYJXYBzxaQ4PifsU0GDO38MSdmEDeRlIxrKbC6NbEaaEHDanWb+y30U8SQ== +"@types/node@18.18.6": + version "18.18.6" + resolved "https://registry.yarnpkg.com/@types/node/-/node-18.18.6.tgz#26da694f75cdb057750f49d099da5e3f3824cb3e" + integrity sha512-wf3Vz+jCmOQ2HV1YUJuCWdL64adYxumkrxtc+H1VUQlnQI04+5HtH+qZCOE21lBE7gIrt+CwX2Wv8Acrw5Ak6w== + "@types/node@^10.12.18": version "10.17.13" resolved "https://registry.yarnpkg.com/@types/node/-/node-10.17.13.tgz#ccebcdb990bd6139cd16e84c39dc2fb1023ca90c" @@ -5362,11 +5367,6 @@ resolved "https://registry.yarnpkg.com/@types/node/-/node-11.15.54.tgz#59ed60e7b0d56905a654292e8d73275034eb6283" integrity sha512-1RWYiq+5UfozGsU6MwJyFX6BtktcT10XRjvcAQmskCtMcW3tPske88lM/nHv7BQG1w9KBXI1zPGuu5PnNCX14g== -"@types/node@^14.14.31": - version "14.18.32" - resolved "https://registry.yarnpkg.com/@types/node/-/node-14.18.32.tgz#8074f7106731f1a12ba993fe8bad86ee73905014" - integrity sha512-Y6S38pFr04yb13qqHf8uk1nHE3lXgQ30WZbv1mLliV9pt0NjvqdWttLcrOYLnXbOafknVYRHZGoMSpR9UwfYow== - "@types/normalize-package-data@^2.4.0": version "2.4.0" resolved "https://registry.yarnpkg.com/@types/normalize-package-data/-/normalize-package-data-2.4.0.tgz#e486d0d97396d79beedd0a6e33f4534ff6b4973e" @@ -7314,13 +7314,13 @@ babel-jest@29.7.0, babel-jest@^29.7.0: graceful-fs "^4.2.9" slash "^3.0.0" -babel-loader@8.2.2, babel-loader@^8.0.0: - version "8.2.2" - resolved "https://registry.yarnpkg.com/babel-loader/-/babel-loader-8.2.2.tgz#9363ce84c10c9a40e6c753748e1441b60c8a0b81" - integrity sha512-JvTd0/D889PQBtUXJ2PXaKU/pjZDMtHA9V2ecm+eNRmmBCMR09a+fmpGTNwnJtFmFl5Ei7Vy47LjBb+L0wQ99g== +babel-loader@8.3.0, babel-loader@^8.0.0: + version "8.3.0" + resolved "https://registry.yarnpkg.com/babel-loader/-/babel-loader-8.3.0.tgz#124936e841ba4fe8176786d6ff28add1f134d6a8" + integrity sha512-H8SvsMF+m9t15HNLMipppzkC+Y2Yq+v3SonZyU70RBL/h1gxPkH08Ot8pEE9Z4Kd+czyWJClmFS8qzIP9OZ04Q== dependencies: find-cache-dir "^3.3.1" - loader-utils "^1.4.0" + loader-utils "^2.0.0" make-dir "^3.1.0" schema-utils "^2.6.5" @@ -9219,10 +9219,10 @@ commander@^6.2.0, commander@^6.2.1: resolved "https://registry.yarnpkg.com/commander/-/commander-6.2.1.tgz#0792eb682dfbc325999bb2b84fddddba110ac73c" integrity sha512-U7VdrJFnJgo4xjrHpTzu0yrHPGImdsmD95ZlgYSEajAn2JKzDhDTPG9kBTefmObL2w/ngeZnilk+OV9CG3d7UA== -comment-parser@1.2.3: - version "1.2.3" - resolved "https://registry.yarnpkg.com/comment-parser/-/comment-parser-1.2.3.tgz#303a7eb99c9b2632efd594e183ccbd32042caf69" - integrity sha512-vnqDwBSXSsdAkGS5NjwMIPelE47q+UkEgWKHvCDNhVIIaQSUFY6sNnEYGzdoPGMdpV+7KR3ZkRd7oyWIjtuvJg== +comment-parser@1.3.1: + version "1.3.1" + resolved "https://registry.yarnpkg.com/comment-parser/-/comment-parser-1.3.1.tgz#3d7ea3adaf9345594aedee6563f422348f165c1b" + integrity sha512-B52sN2VNghyq5ofvUsqZjmk6YkihBX5vMSChmSK9v4ShjKf3Vk5Xcmgpw4o+iIgtrnM/u5FiMpz9VKb8lpBveA== common-path-prefix@^3.0.0: version "3.0.0" @@ -11557,6 +11557,11 @@ escape-string-regexp@^2.0.0: resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz#a30304e99daa32e23b2fd20f51babd07cffca344" integrity sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w== +escape-string-regexp@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz#14ba83a5d373e3d311e5afca29cf5bfad965bf34" + integrity sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA== + escodegen@1.8.x: version "1.8.1" resolved "https://registry.yarnpkg.com/escodegen/-/escodegen-1.8.1.tgz#5a5b53af4693110bebb0867aa3430dd3b70a1018" @@ -11689,19 +11694,17 @@ eslint-plugin-jest@^25.0.0: dependencies: "@typescript-eslint/experimental-utils" "^5.0.0" -eslint-plugin-jsdoc@^36.0.7: - version "36.0.7" - resolved "https://registry.yarnpkg.com/eslint-plugin-jsdoc/-/eslint-plugin-jsdoc-36.0.7.tgz#6e6f9897fc2ff3b3934b09c2748b998bc03d2bf6" - integrity sha512-x73l/WCRQ1qCjLq46Ca7csuGd5o3y3vbJIa3cktg11tdf3UZleBdIXKN9Cf0xjs3tXYPEy2SoNXowT8ydnjNDQ== +eslint-plugin-jsdoc@39.9.1, eslint-plugin-jsdoc@^39.9.1: + version "39.9.1" + resolved "https://registry.yarnpkg.com/eslint-plugin-jsdoc/-/eslint-plugin-jsdoc-39.9.1.tgz#e9ce1723411fd7ea0933b3ef0dd02156ae3068e2" + integrity sha512-Rq2QY6BZP2meNIs48aZ3GlIlJgBqFCmR55+UBvaDkA3ZNQ0SvQXOs2QKkubakEijV8UbIVbVZKsOVN8G3MuqZw== dependencies: - "@es-joy/jsdoccomment" "0.10.7" - comment-parser "1.2.3" - debug "^4.3.2" + "@es-joy/jsdoccomment" "~0.36.1" + comment-parser "1.3.1" + debug "^4.3.4" + escape-string-regexp "^4.0.0" esquery "^1.4.0" - jsdoc-type-pratt-parser "^1.1.1" - lodash "^4.17.21" - regextras "^0.8.0" - semver "^7.3.5" + semver "^7.3.8" spdx-expression-parse "^3.0.1" eslint-plugin-jsx-a11y@6.4.1, eslint-plugin-jsx-a11y@^6.4.1: @@ -16317,10 +16320,10 @@ jsbn@~0.1.0: resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.1.tgz#a5e654c2e5a2deb5f201d96cefbca80c0ef2f513" integrity sha1-peZUwuWi3rXyAdls77yoDA7y9RM= -jsdoc-type-pratt-parser@1.1.1, jsdoc-type-pratt-parser@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/jsdoc-type-pratt-parser/-/jsdoc-type-pratt-parser-1.1.1.tgz#10fe5e409ba38de22a48b555598955a26ff0160f" - integrity sha512-uelRmpghNwPBuZScwgBG/OzodaFk5RbO5xaivBdsAY70icWfShwZ7PCMO0x1zSkOa8T1FzHThmrdoyg/0AwV5g== +jsdoc-type-pratt-parser@~3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/jsdoc-type-pratt-parser/-/jsdoc-type-pratt-parser-3.1.0.tgz#a4a56bdc6e82e5865ffd9febc5b1a227ff28e67e" + integrity sha512-MgtD0ZiCDk9B+eI73BextfRrVQl0oyzRG8B2BjORts6jbunj4ScKPcyXGTbB6eXL4y9TzxCm6hyeLq/2ASzNdw== jsdom-global@3.0.2: version "3.0.2" @@ -17309,7 +17312,7 @@ loader-runner@^4.2.0: resolved "https://registry.yarnpkg.com/loader-runner/-/loader-runner-4.2.0.tgz#d7022380d66d14c5fb1d496b89864ebcfd478384" integrity sha512-92+huvxMvYlMzMt0iIOukcwYBFpkYJdpl2xsZ7LrlayO7E8SOv+JJUEK17B/dJIHAOLMfh2dZZ/Y18WgmGtYNw== -loader-utils@1.4.2, loader-utils@^1.1.0, loader-utils@^1.2.3, loader-utils@^1.4.0: +loader-utils@1.4.2, loader-utils@^1.1.0, loader-utils@^1.2.3: version "1.4.2" resolved "https://registry.yarnpkg.com/loader-utils/-/loader-utils-1.4.2.tgz#29a957f3a63973883eb684f10ffd3d151fec01a3" integrity sha512-I5d00Pd/jwMD2QCduo657+YM/6L3KZu++pmX9VFncxaxvHcru9jx1lBaFft+r4Mt2jK0Yhp41XlRAihzPxHNCg== @@ -21742,11 +21745,6 @@ regexpu-core@^5.2.1: unicode-match-property-ecmascript "^2.0.0" unicode-match-property-value-ecmascript "^2.1.0" -regextras@^0.8.0: - version "0.8.0" - resolved "https://registry.yarnpkg.com/regextras/-/regextras-0.8.0.tgz#ec0f99853d4912839321172f608b544814b02217" - integrity sha512-k519uI04Z3SaY0fLX843MRXnDeG2+vHOFsyhiPZvNLe7r8rD2YNRjq4BQLZZ0oAr2NrtvZlICsXysGNFPGa3CQ== - registry-auth-token@^3.0.1: version "3.4.0" resolved "https://registry.yarnpkg.com/registry-auth-token/-/registry-auth-token-3.4.0.tgz#d7446815433f5d5ed6431cd5dca21048f66b397e"