diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml
index 6c4b8d9110..be79b91552 100644
--- a/.github/workflows/codeql-analysis.yml
+++ b/.github/workflows/codeql-analysis.yml
@@ -33,7 +33,7 @@ jobs:
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
- uses: github/codeql-action/init@df409f7d9260372bd5f19e5b04e83cb3c43714ae
+ uses: github/codeql-action/init@48ab28a6f5dbc2a99bf1e0131198dd8f1df78169
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
@@ -44,7 +44,7 @@ jobs:
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
- uses: github/codeql-action/autobuild@df409f7d9260372bd5f19e5b04e83cb3c43714ae
+ uses: github/codeql-action/autobuild@48ab28a6f5dbc2a99bf1e0131198dd8f1df78169
# âšī¸ Command-line programs to run using the OS shell.
# đ https://git.io/JvXDl
@@ -58,4 +58,4 @@ jobs:
# make release
- name: Perform CodeQL Analysis
- uses: github/codeql-action/analyze@df409f7d9260372bd5f19e5b04e83cb3c43714ae
+ uses: github/codeql-action/analyze@48ab28a6f5dbc2a99bf1e0131198dd8f1df78169
diff --git a/.github/workflows/scorecards-analysis.yml b/.github/workflows/scorecards-analysis.yml
index 9f8dbe7fea..e2584e2a0e 100644
--- a/.github/workflows/scorecards-analysis.yml
+++ b/.github/workflows/scorecards-analysis.yml
@@ -49,6 +49,6 @@ jobs:
# Upload the results to GitHub's code scanning dashboard.
- name: "Upload to code-scanning"
- uses: github/codeql-action/upload-sarif@df409f7d9260372bd5f19e5b04e83cb3c43714ae
+ uses: github/codeql-action/upload-sarif@48ab28a6f5dbc2a99bf1e0131198dd8f1df78169
with:
sarif_file: results.sarif
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index f935d58c59..a7c78daf1a 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -4,10 +4,10 @@ Thanks for thinking about helping with [dart.dev][www]!
You can contribute in a few ways.
* **Fix typos.** The GitHub UI makes it easy to contribute small fixes, and
- you'll get credit for your contribution! To start, click the **page icon**
+ you'll get credit for your contribution! To begin, click the **page icon**
at the upper right of the page. Then click the **pencil icon** to start
editing the file. Once you've fixed the typo, commit your changes to a new
- branch and create a **pull request.**
+ branch in your forked repository and create a **pull request.**
Once we've reviewed and approved your change, we'll merge it. Normally, we'll
review your fix within one working day, and your fix will appear online less
diff --git a/firebase.json b/firebase.json
index 56721a2107..1acac338fa 100644
--- a/firebase.json
+++ b/firebase.json
@@ -65,7 +65,7 @@
{ "source": "/articles/idiomatic-dart{,/**}", "destination": "/effective-dart", "type": 301 },
{ "source": "/articles/io", "destination": "/articles/libraries/dart-io", "type": 301 },
{ "source": "/articles/js-dart-interop", "destination": "/interop/js-interop", "type": 301 },
- { "source": "/articles/json-web-service", "destination": "/guides/json", "type": 301 },
+ { "source": "/articles/json-web-service", "destination": "/libraries/serialization/json", "type": 301 },
{ "source": "/articles/language", "destination": "/language", "type": 301 },
{ "source": "/articles/language/await-async", "destination": "/libraries/async/async-await", "type": 301 },
{ "source": "/articles/language/mixins", "destination": "/language/mixins", "type": 301 },
@@ -82,7 +82,7 @@
{ "source": "/articles/native-extensions-for-standalone-dart-vm", "destination": "/server/c-interop-native-extensions", "type": 301 },
{ "source": "/articles/numeric-computation", "destination": "/resources/language/number-representation", "type": 301 },
{ "source": "/articles/optional-types", "destination": "/language/type-system", "type": 301 },
- { "source": "/articles/serialization", "destination": "/guides/json", "type": 301 },
+ { "source": "/articles/serialization", "destination": "/libraries/serialization/json", "type": 301 },
{ "source": "/articles/server/native-extensions", "destination": "/server/c-interop-native-extensions", "type": 301 },
{ "source": "/articles/server{,/**}", "destination": "/server", "type": 301 },
{ "source": "/articles/snapshots", "destination": "/tools/dart-compile", "type": 301 },
@@ -208,8 +208,10 @@
{ "source": "/go/unsound-null-safety", "destination": "/null-safety/unsound-null-safety", "type": 301 },
{ "source": "/googleapis", "destination": "https://github.com/dart-lang/googleapis", "type": 301 },
+ { "source": "/guides/environment-declarations", "destination": "/libraries/core/environment-declarations", "type": 301 },
{ "source": "/guides/get-started", "destination": "/overview", "type": 301 },
{ "source": "/guides/google-apis", "destination": "/resources/google-apis", "type": 301 },
+ { "source": "/guides/json", "destination": "/libraries/serialization/json", "type": 301 },
{ "source": "/guides/language", "destination": "/language", "type": 301 },
{ "source": "/guides/language/analysis-options", "destination": "/tools/analysis", "type": 301 },
{ "source": "/guides/language/cheatsheet", "destination": "/language", "type": 301 },
@@ -246,6 +248,7 @@
{ "source": "/guides/libraries/useful-libraries", "destination": "/resources/useful-packages", "type": 301 },
{ "source": "/guides/packages", "destination": "/tools/pub/packages", "type": 301 },
{ "source": "/guides/platforms", "destination": "/overview#platform", "type": 301 },
+ { "source": "/guides/testing", "destination": "/tools/testing", "type": 301 },
{ "source": "/guides/whats-new", "destination": "/resources/whats-new", "type": 301 },
{ "source": "/install", "destination": "/get-dart", "type": 301 },
{ "source": "/install/**", "destination": "/get-dart", "type": 301 },
@@ -266,7 +269,7 @@
{ "source": "/keyword/class", "destination": "/language/classes#instance-variables", "type": 301 },
{ "source": "/keyword/const", "destination": "/language/variables#final-and-const", "type": 301 },
{ "source": "/keyword/continue", "destination": "/language/loops#break-and-continue", "type": 301 },
- { "source": "/keyword/covariant", "destination": "/deprecated/sound-problems#the-covariant-keyword", "type": 301 },
+ { "source": "/keyword/covariant", "destination": "/language/type-system#covariant-keyword", "type": 301 },
{ "source": "/keyword/default", "destination": "/language/branches#switch", "type": 301 },
{ "source": "/keyword/deferred", "destination": "/language/libraries#lazily-loading-a-library", "type": 301 },
{ "source": "/keyword/do", "destination": "/language/loops#while-and-do-while", "type": 301 },
@@ -334,6 +337,7 @@
{ "source": "/language/control-flow", "destination": "/language/loops", "type": 301 },
{ "source": "/language/enum", "destination": "/language/enums", "type": 301 },
{ "source": "/language/generators", "destination": "/language/functions#generators", "type": 301 },
+ { "source": "/libraries/serialization", "destination": "/libraries/serialization/json", "type": 301 },
{ "source": "/linter/lints/:lint*", "destination": "/tools/linter-rules/:lint", "type": 301 },
{ "source": "/lints", "destination": "/tools/linter-rules", "type": 301 },
{ "source": "/lints/:lint*", "destination": "/tools/linter-rules/:lint", "type": 301 },
diff --git a/package.json b/package.json
index f33436eddf..2d249c5d59 100644
--- a/package.json
+++ b/package.json
@@ -25,7 +25,7 @@
"@11ty/eleventy": "^3.0.0",
"@types/hast": "^3.0.4",
"@types/markdown-it": "^14.1.2",
- "@types/node": "^22.10.2",
+ "@types/node": "^22.10.3",
"firebase-tools": "^13.29.1",
"hast-util-from-html": "^2.0.3",
"hast-util-select": "^6.0.3",
@@ -34,11 +34,11 @@
"js-yaml": "^4.1.0",
"markdown-it": "^14.1.0",
"markdown-it-anchor": "^9.2.0",
- "markdown-it-attrs": "^4.3.0",
+ "markdown-it-attrs": "^4.3.1",
"markdown-it-container": "^4.0.0",
"markdown-it-deflist": "^3.0.0",
"sass": "^1.83.0",
- "shiki": "^1.24.2",
+ "shiki": "^1.25.1",
"tsx": "^4.19.2"
}
}
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 789625f3aa..4a74e1f5c5 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -22,8 +22,8 @@ importers:
specifier: ^14.1.2
version: 14.1.2
'@types/node':
- specifier: ^22.10.2
- version: 22.10.2
+ specifier: ^22.10.3
+ version: 22.10.3
firebase-tools:
specifier: ^13.29.1
version: 13.29.1(encoding@0.1.13)
@@ -49,8 +49,8 @@ importers:
specifier: ^9.2.0
version: 9.2.0(@types/markdown-it@14.1.2)(markdown-it@14.1.0)
markdown-it-attrs:
- specifier: ^4.3.0
- version: 4.3.0(markdown-it@14.1.0)
+ specifier: ^4.3.1
+ version: 4.3.1(markdown-it@14.1.0)
markdown-it-container:
specifier: ^4.0.0
version: 4.0.0
@@ -61,8 +61,8 @@ importers:
specifier: ^1.83.0
version: 1.83.0
shiki:
- specifier: ^1.24.2
- version: 1.24.2
+ specifier: ^1.25.1
+ version: 1.25.1
tsx:
specifier: ^4.19.2
version: 4.19.2
@@ -483,20 +483,26 @@ packages:
'@protobufjs/utf8@1.1.0':
resolution: {integrity: sha512-Vvn3zZrhQZkkBE8LSuW3em98c0FwgO4nxzv6OdSxPKJIEKY2bGbHn+mhGIPerzI4twdxaP8/0+06HBpwf345Lw==}
- '@shikijs/core@1.24.2':
- resolution: {integrity: sha512-BpbNUSKIwbKrRRA+BQj0BEWSw+8kOPKDJevWeSE/xIqGX7K0xrCZQ9kK0nnEQyrzsUoka1l81ZtJ2mGaCA32HQ==}
+ '@shikijs/core@1.25.1':
+ resolution: {integrity: sha512-0j5k3ZkLTQViOuNzPVyWGoW1zgH3kiFdUT/JOCkTm7TU74mz+dF+NID+YoiCBzHQxgsDpcGYPjKDJRcuVLSt4A==}
- '@shikijs/engine-javascript@1.24.2':
- resolution: {integrity: sha512-EqsmYBJdLEwEiO4H+oExz34a5GhhnVp+jH9Q/XjPjmBPc6TE/x4/gD0X3i0EbkKKNqXYHHJTJUpOLRQNkEzS9Q==}
+ '@shikijs/engine-javascript@1.25.1':
+ resolution: {integrity: sha512-zQ7UWKnRCfD/Q1M+XOSyjsbhpE0qv8LUnmn82HYCeOsgAHgUZGEDIQ63bbuK3kU5sQg+2CtI+dPfOqD/mjSY9w==}
- '@shikijs/engine-oniguruma@1.24.2':
- resolution: {integrity: sha512-ZN6k//aDNWRJs1uKB12pturKHh7GejKugowOFGAuG7TxDRLod1Bd5JhpOikOiFqPmKjKEPtEA6mRCf7q3ulDyQ==}
+ '@shikijs/engine-oniguruma@1.25.1':
+ resolution: {integrity: sha512-iKPMh3H+0USHtWfZ1irfMTH6tGmIUFSnqt3E2K8BgI1VEsqiPh0RYkG2WTwzNiM1/WHN4FzYx/nrKR7PDHiRyw==}
- '@shikijs/types@1.24.2':
- resolution: {integrity: sha512-bdeWZiDtajGLG9BudI0AHet0b6e7FbR0EsE4jpGaI0YwHm/XJunI9+3uZnzFtX65gsyJ6ngCIWUfA4NWRPnBkQ==}
+ '@shikijs/langs@1.25.1':
+ resolution: {integrity: sha512-hdYjq9aRJplAzGe2qF51PR9IDgEoyGb4IkXvr3Ts6lEdg4Z8M/kdknKRo2EIuv3IR/aKkJXTlBQRM+wr3t20Ew==}
- '@shikijs/vscode-textmate@9.3.0':
- resolution: {integrity: sha512-jn7/7ky30idSkd/O5yDBfAnVt+JJpepofP/POZ1iMOxK59cOfqIgg/Dj0eFsjOTMw+4ycJN0uhZH/Eb0bs/EUA==}
+ '@shikijs/themes@1.25.1':
+ resolution: {integrity: sha512-JO0lDn4LgGqg5QKvgich5ScUmC2okK+LxM9a3iLUH7YMeI2c8UGXThuJv6sZduS7pdJbYQHPrvWq9t/V4GhpbQ==}
+
+ '@shikijs/types@1.25.1':
+ resolution: {integrity: sha512-dceqFUoO95eY4tpOj3OGq8wE8EgJ4ey6Me1HQEu5UbwIYszFndEll/bjlB8Kp9wl4fx3uM7n4+y9XCYuDBmcXA==}
+
+ '@shikijs/vscode-textmate@9.3.1':
+ resolution: {integrity: sha512-79QfK1393x9Ho60QFyLti+QfdJzRQCVLFb97kOIV7Eo9vQU/roINgk7m24uv0a7AUvN//RDH36FLjjK48v0s9g==}
'@sindresorhus/is@4.6.0':
resolution: {integrity: sha512-t09vSN3MdfsyCHoFcTRCH/iUtG7OJ0CsjzB8cjAmKc/va/kIgeDI/TxsigdncE/4be734m0cvIYwNaV4i2XqAw==}
@@ -541,8 +547,8 @@ packages:
'@types/mdurl@2.0.0':
resolution: {integrity: sha512-RGdgjQUZba5p6QEFAVx2OGb8rQDL/cPRG7GiedRzMcJ1tYnUANBncjbSB1NRGwbvjcPeikRABz2nshyPk1bhWg==}
- '@types/node@22.10.2':
- resolution: {integrity: sha512-Xxr6BBRCAOQixvonOye19wnzyDiUtTeqldOOmj3CkeblonbccA12PFwlufvRdrpjXxqnmUaeiU5EOA+7s5diUQ==}
+ '@types/node@22.10.3':
+ resolution: {integrity: sha512-DifAyw4BkrufCILvD3ucnuN8eydUfc/C1GlyrnI+LK6543w5/L3VeVgf05o3B4fqSXP1dKYLOZsKfutpxPzZrw==}
'@types/request@2.48.12':
resolution: {integrity: sha512-G3sY+NpsA9jnwm0ixhAFQSJ3Q9JkpLZpJbI3GMv0mIAT0y3mRabYeINzal5WOChIiaTEGQYlHOKgkaM9EisWHw==}
@@ -1553,8 +1559,8 @@ packages:
hast-util-select@6.0.3:
resolution: {integrity: sha512-OVRQlQ1XuuLP8aFVLYmC2atrfWHS5UD3shonxpnyrjcCkwtvmt/+N6kYJdcY4mkMJhxp4kj2EFIxQ9kvkkt/eQ==}
- hast-util-to-html@9.0.3:
- resolution: {integrity: sha512-M17uBDzMJ9RPCqLMO92gNNUDuBSq10a25SDBI08iCCxmorf4Yy6sYHK57n9WAbRAAaU+DuR4W6GN9K4DFZesYg==}
+ hast-util-to-html@9.0.4:
+ resolution: {integrity: sha512-wxQzXtdbhiwGAUKrnQJXlOPmHnEehzphwkK7aluUPQ+lEc1xefC8pblMgpp2w5ldBTEfveRIrADcrhGIWrlTDA==}
hast-util-to-string@3.0.1:
resolution: {integrity: sha512-XelQVTDWvqcl3axRfI0xSeoVKzyIFPwsAGSLIsKdJKQMXDYJS4WYrBNF/8J7RdhIcFI2BOHgAifggsvsxp/3+A==}
@@ -1978,8 +1984,8 @@ packages:
'@types/markdown-it': '*'
markdown-it: '*'
- markdown-it-attrs@4.3.0:
- resolution: {integrity: sha512-SQpN8q5LCYtRNuzHaWVLThuJmArN+H3b+jykwaK8AS8XlxyosRvge/7wT9N0XaXCJ5STHGl3gAc6/PXx37cbiQ==}
+ markdown-it-attrs@4.3.1:
+ resolution: {integrity: sha512-/ko6cba+H6gdZ0DOw7BbNMZtfuJTRp9g/IrGIuz8lYc/EfnmWRpaR3CFPnNbVz0LDvF8Gf1hFGPqrQqq7De0rg==}
engines: {node: '>=6'}
peerDependencies:
markdown-it: '>= 9.0.0'
@@ -2286,8 +2292,8 @@ packages:
resolution: {integrity: sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==}
engines: {node: '>=6'}
- oniguruma-to-es@0.7.0:
- resolution: {integrity: sha512-HRaRh09cE0gRS3+wi2zxekB+I5L8C/gN60S+vb11eADHUaB/q4u8wGGOX3GvwvitG8ixaeycZfeoyruKQzUgNg==}
+ oniguruma-to-es@0.10.0:
+ resolution: {integrity: sha512-zapyOUOCJxt+xhiNRPPMtfJkHGsZ98HHB9qJEkdT8BGytO/+kpe4m1Ngf0MzbzTmhacn11w9yGeDP6tzDhnCdg==}
open@6.4.0:
resolution: {integrity: sha512-IFenVPgF70fSm1keSd2iDBIDIBZkroLeuffXq+wKTzTJlBpesFWojV9lb8mzOfaAzM1sr7HQHuO0vtV0zYekGg==}
@@ -2589,14 +2595,14 @@ packages:
resolution: {integrity: sha512-yDMz9g+VaZkqBYS/ozoBJwaBhTbZo3UNYQHNRw1D3UFQB8oHB4uS/tAODO+ZLjGWmUbKnIlOWO+aaIiAxrUWHA==}
engines: {node: '>= 14.16.0'}
- regex-recursion@4.3.0:
- resolution: {integrity: sha512-5LcLnizwjcQ2ALfOj95MjcatxyqF5RPySx9yT+PaXu3Gox2vyAtLDjHB8NTJLtMGkvyau6nI3CfpwFCjPUIs/A==}
+ regex-recursion@5.1.1:
+ resolution: {integrity: sha512-ae7SBCbzVNrIjgSbh7wMznPcQel1DNlDtzensnFxpiNpXt1U2ju/bHugH422r+4LAVS1FpW1YCwilmnNsjum9w==}
regex-utilities@2.3.0:
resolution: {integrity: sha512-8VhliFJAWRaUiVvREIiW2NXXTmHs4vMNnSzuJVhscgmGav3g9VDxLrQndI3dZZVVdp0ZO/5v0xmX516/7M9cng==}
- regex@5.0.2:
- resolution: {integrity: sha512-/pczGbKIQgfTMRV0XjABvc5RzLqQmwqxLHdQao2RTXPk+pmTXB2P0IaUHYdYyk412YLwUIkaeMd5T+RzVgTqnQ==}
+ regex@5.1.1:
+ resolution: {integrity: sha512-dN5I359AVGPnwzJm2jN1k0W9LPZ+ePvoOeVMMfqIMFz53sSwXkxaJoxr50ptnsC771lK95BnTrVSZxq0b9yCGw==}
registry-auth-token@5.0.2:
resolution: {integrity: sha512-o/3ikDxtXaA59BmZuZrJZDJv8NMDGSj+6j6XaeBmHw8eY1i1qd9+6H+LjVvQXx3HN6aRCGa1cUdJ9RaJZUugnQ==}
@@ -2740,8 +2746,8 @@ packages:
resolution: {integrity: sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==}
engines: {node: '>=8'}
- shiki@1.24.2:
- resolution: {integrity: sha512-TR1fi6mkRrzW+SKT5G6uKuc32Dj2EEa7Kj0k8kGqiBINb+C1TiflVOiT9ta6GqOJtC4fraxO5SLUaKBcSY38Fg==}
+ shiki@1.25.1:
+ resolution: {integrity: sha512-/1boRvNYwRW3GLG9Y6dXdnZ/Ha+J5T/5y3hV7TGQUcDSBM185D3FCbXlz2eTGNKG2iWCbWqo+P0yhGKZ4/CUrw==}
side-channel@1.0.6:
resolution: {integrity: sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA==}
@@ -3644,32 +3650,40 @@ snapshots:
'@protobufjs/utf8@1.1.0': {}
- '@shikijs/core@1.24.2':
+ '@shikijs/core@1.25.1':
dependencies:
- '@shikijs/engine-javascript': 1.24.2
- '@shikijs/engine-oniguruma': 1.24.2
- '@shikijs/types': 1.24.2
- '@shikijs/vscode-textmate': 9.3.0
+ '@shikijs/engine-javascript': 1.25.1
+ '@shikijs/engine-oniguruma': 1.25.1
+ '@shikijs/types': 1.25.1
+ '@shikijs/vscode-textmate': 9.3.1
'@types/hast': 3.0.4
- hast-util-to-html: 9.0.3
+ hast-util-to-html: 9.0.4
+
+ '@shikijs/engine-javascript@1.25.1':
+ dependencies:
+ '@shikijs/types': 1.25.1
+ '@shikijs/vscode-textmate': 9.3.1
+ oniguruma-to-es: 0.10.0
+
+ '@shikijs/engine-oniguruma@1.25.1':
+ dependencies:
+ '@shikijs/types': 1.25.1
+ '@shikijs/vscode-textmate': 9.3.1
- '@shikijs/engine-javascript@1.24.2':
+ '@shikijs/langs@1.25.1':
dependencies:
- '@shikijs/types': 1.24.2
- '@shikijs/vscode-textmate': 9.3.0
- oniguruma-to-es: 0.7.0
+ '@shikijs/types': 1.25.1
- '@shikijs/engine-oniguruma@1.24.2':
+ '@shikijs/themes@1.25.1':
dependencies:
- '@shikijs/types': 1.24.2
- '@shikijs/vscode-textmate': 9.3.0
+ '@shikijs/types': 1.25.1
- '@shikijs/types@1.24.2':
+ '@shikijs/types@1.25.1':
dependencies:
- '@shikijs/vscode-textmate': 9.3.0
+ '@shikijs/vscode-textmate': 9.3.1
'@types/hast': 3.0.4
- '@shikijs/vscode-textmate@9.3.0': {}
+ '@shikijs/vscode-textmate@9.3.1': {}
'@sindresorhus/is@4.6.0': {}
@@ -3709,14 +3723,14 @@ snapshots:
'@types/mdurl@2.0.0': {}
- '@types/node@22.10.2':
+ '@types/node@22.10.3':
dependencies:
undici-types: 6.20.0
'@types/request@2.48.12':
dependencies:
'@types/caseless': 0.12.5
- '@types/node': 22.10.2
+ '@types/node': 22.10.3
'@types/tough-cookie': 4.0.5
form-data: 2.5.2
@@ -4949,7 +4963,7 @@ snapshots:
unist-util-visit: 5.0.0
zwitch: 2.0.4
- hast-util-to-html@9.0.3:
+ hast-util-to-html@9.0.4:
dependencies:
'@types/hast': 3.0.4
'@types/unist': 3.0.3
@@ -5411,7 +5425,7 @@ snapshots:
'@types/markdown-it': 14.1.2
markdown-it: 14.1.0
- markdown-it-attrs@4.3.0(markdown-it@14.1.0):
+ markdown-it-attrs@4.3.1(markdown-it@14.1.0):
dependencies:
markdown-it: 14.1.0
@@ -5720,11 +5734,11 @@ snapshots:
dependencies:
mimic-fn: 2.1.0
- oniguruma-to-es@0.7.0:
+ oniguruma-to-es@0.10.0:
dependencies:
emoji-regex-xs: 1.0.0
- regex: 5.0.2
- regex-recursion: 4.3.0
+ regex: 5.1.1
+ regex-recursion: 5.1.1
open@6.4.0:
dependencies:
@@ -5945,7 +5959,7 @@ snapshots:
'@protobufjs/path': 1.1.2
'@protobufjs/pool': 1.1.0
'@protobufjs/utf8': 1.1.0
- '@types/node': 22.10.2
+ '@types/node': 22.10.3
long: 5.2.3
proxy-addr@2.0.7:
@@ -6059,13 +6073,14 @@ snapshots:
readdirp@4.0.2: {}
- regex-recursion@4.3.0:
+ regex-recursion@5.1.1:
dependencies:
+ regex: 5.1.1
regex-utilities: 2.3.0
regex-utilities@2.3.0: {}
- regex@5.0.2:
+ regex@5.1.1:
dependencies:
regex-utilities: 2.3.0
@@ -6233,13 +6248,15 @@ snapshots:
shebang-regex@3.0.0: {}
- shiki@1.24.2:
+ shiki@1.25.1:
dependencies:
- '@shikijs/core': 1.24.2
- '@shikijs/engine-javascript': 1.24.2
- '@shikijs/engine-oniguruma': 1.24.2
- '@shikijs/types': 1.24.2
- '@shikijs/vscode-textmate': 9.3.0
+ '@shikijs/core': 1.25.1
+ '@shikijs/engine-javascript': 1.25.1
+ '@shikijs/engine-oniguruma': 1.25.1
+ '@shikijs/langs': 1.25.1
+ '@shikijs/themes': 1.25.1
+ '@shikijs/types': 1.25.1
+ '@shikijs/vscode-textmate': 9.3.1
'@types/hast': 3.0.4
side-channel@1.0.6:
diff --git a/src/_data/glossary.yml b/src/_data/glossary.yml
index 8a0bced844..16dad21cd7 100644
--- a/src/_data/glossary.yml
+++ b/src/_data/glossary.yml
@@ -614,7 +614,7 @@
- text: "Covariance and contravariance"
link: "https://en.wikipedia.org/wiki/Covariance_and_contravariance_(computer_science)"
- text: "The covariant keyword"
- link: "/deprecated/sound-problems#the-covariant-keyword"
+ link: "/language/type-system#covariant-keyword"
labels:
- "language"
- "type system"
diff --git a/src/_data/keywords.yml b/src/_data/keywords.yml
index 8dd174964b..eff57ee568 100644
--- a/src/_data/keywords.yml
+++ b/src/_data/keywords.yml
@@ -35,7 +35,7 @@
link: /language/loops#break-and-continue
type: reserved
- term: 'covariant'
- link: /deprecated/sound-problems#the-covariant-keyword
+ link: /language/type-system#covariant-keyword
type: bit
- term: 'default'
link: /language/branches#switch
diff --git a/src/_data/side-nav.yml b/src/_data/side-nav.yml
index 05d8507dfc..143e3050ed 100644
--- a/src/_data/side-nav.yml
+++ b/src/_data/side-nav.yml
@@ -194,8 +194,8 @@
- title: Development
expanded: false
children:
- - title: JSON
- permalink: /guides/json
+ - title: JSON serialization
+ permalink: /libraries/serialization/json
- title: Number representation
permalink: /resources/language/number-representation
- title: Google APIs
@@ -233,7 +233,7 @@
- title: Wasm compilation
permalink: /web/wasm
- title: Environment declarations
- permalink: /guides/environment-declarations
+ permalink: /libraries/core/environment-declarations
- title: Interoperability
expanded: false
@@ -337,7 +337,7 @@
- title: Testing & optimization
children:
- title: Testing
- permalink: /guides/testing
+ permalink: /tools/testing
- title: Debugging web apps
permalink: /web/debugging
diff --git a/src/_includes/head.html b/src/_includes/head.html
index a078dc0784..04c9cd3737 100644
--- a/src/_includes/head.html
+++ b/src/_includes/head.html
@@ -65,7 +65,7 @@
-
+
{% if css -%}
diff --git a/src/_includes/linter-rule-cards.md b/src/_includes/linter-rule-cards.md
new file mode 100644
index 0000000000..f5f25ac4d2
--- /dev/null
+++ b/src/_includes/linter-rule-cards.md
@@ -0,0 +1,52 @@
+{% for lint in linter_rules %}
+
+{% if lint.state != "internal" %}
+
+
+
{{lint.name | underscoreBreaker}}
+
+{{lint.description}}
+
+
+
+{% if lint.state == "removed" -%}
+error
+{% elsif lint.state == "deprecated" -%}
+warning
+{% elsif lint.state == "experimental" -%}
+science
+{% elsif lint.sinceDartSdk contains "wip" -%}
+pending
+{% endif -%}
+{% if lint.fixStatus == "hasFix" -%}
+build
+{% endif -%}
+{% if lint.sets contains "core" -%}
+circles
+{% endif -%}
+{% if lint.sets contains "recommended" -%}
+thumb_up
+{% endif -%}
+{% if lint.sets contains "flutter" -%}
+flutter
+{% endif -%}
+
+
+
+
+
+
+
+{% endif %}
+
+{% endfor %}
diff --git a/src/_includes/linter-rules-section.md b/src/_includes/linter-rules-section.md
deleted file mode 100644
index 44b7c86437..0000000000
--- a/src/_includes/linter-rules-section.md
+++ /dev/null
@@ -1,53 +0,0 @@
-{% for lint in linter_rules %}
-
-{% if lint.state != "internal" %}
-
-{% assign badges = "" %}
-
-{% if lint.sets != empty %}
-
-{% for set in lint.sets %}
-
-{% if set == "core" or set == "recommended" %}
-{% assign set_link = "lints" %}
-{% elsif set == "flutter" %}
-{% assign set_link = "flutter_lints" %}
-{% else %}
-{% assign set_link = set %}
-{% endif %}
-
-{%- capture rule_set -%}
-
-
-
-{% endcapture %}
-
-{%- assign badges = badges | append: rule_set -%}
-
-{% endfor %}
-
-{% endif %}
-
-{% if lint.fixStatus == "hasFix" %}
-{%- capture has_fix -%}
-
-
-
-{% endcapture %}
-
-{%- assign badges = badges | append: has_fix -%}
-{% endif %}
-
-
-{% if lint.sinceDartSdk contains "wip" %}
-[`{{lint.name}}`](/tools/linter-rules/{{lint.name}}) _(Unreleased)_
-{% elsif lint.state != "stable" %}
-[`{{lint.name}}`](/tools/linter-rules/{{lint.name}}) _({{lint.state | capitalize}})_
-{% else %}
-[`{{lint.name}}`](/tools/linter-rules/{{lint.name}})
-{% endif -%}
-{% if badges != empty %} {{ badges }}{% endif -%} {{lint.description}}
-
-{% endif %}
-
-{% endfor %}
diff --git a/src/_includes/tools/dart-compile-js-options.md b/src/_includes/tools/dart-compile-js-options.md
index 51fde4a3a7..7f0f8225d2 100644
--- a/src/_includes/tools/dart-compile-js-options.md
+++ b/src/_includes/tools/dart-compile-js-options.md
@@ -82,7 +82,7 @@ Some other handy options include:
[`int.fromEnvironment`]: {{site.dart-api}}/dart-core/int/int.fromEnvironment.html
[`bool.fromEnvironment`]: {{site.dart-api}}/dart-core/bool/bool.fromEnvironment.html
[`bool.hasEnvironment`]: {{site.dart-api}}/dart-core/bool/bool.hasEnvironment.html
-[Configuring apps with compilation environment declarations]: /guides/environment-declarations
+[Configuring apps with compilation environment declarations]: /libraries/core/environment-declarations
###### Display options
diff --git a/src/_sass/_site.scss b/src/_sass/_site.scss
index 00ebd273aa..c9c2b06ba7 100644
--- a/src/_sass/_site.scss
+++ b/src/_sass/_site.scss
@@ -10,6 +10,7 @@
@use 'components/cookie-notice';
@use 'components/form';
@use 'components/header';
+@use 'components/linter-rules';
@use 'components/search';
@use 'components/sidebar';
@use 'components/tags';
@@ -348,6 +349,30 @@ main .content {
}
}
+.logo-link-grids {
+ list-style-type: none;
+ padding: 0;
+ display: grid;
+ grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr));
+ gap: 1rem;
+ margin-left: 1rem;
+
+ a {
+ display: flex;
+ align-items: center;
+ gap: 0.5rem;
+
+ span {
+ font-weight: 500;
+ }
+ }
+
+ img {
+ width: 3rem;
+ margin: 0.25rem;
+ }
+}
+
.list-image {
width: 48px;
margin: 0.25rem;
diff --git a/src/_sass/components/_linter-rules.scss b/src/_sass/components/_linter-rules.scss
new file mode 100644
index 0000000000..5cbdb3b5cb
--- /dev/null
+++ b/src/_sass/components/_linter-rules.scss
@@ -0,0 +1,395 @@
+@mixin interaction-style($percentage: 4%) {
+ --site-interaction-base-values: 0 0 0;
+ background-image: linear-gradient(rgb(var(--site-interaction-base-values) / $percentage) 0 0);
+}
+
+body.linter-rules {
+ --filled-button-container-color: #06599C;
+ --filled-button-text-color: #ffffff;
+
+ --outline-button-border-color: rgba(0, 0, 0, .125);
+ --outline-button-text-color: #3a3a3a;
+ --text-button-text-color: #3a3a3a;
+
+ --chip-container-color: transparent;
+ --chip-border-color: rgba(0, 0, 0, .5);
+ --chip-selected-container-color: rgb(194 229 255);
+ --chip-text-color: #3a3a3a;
+
+ --text-field-border-color: rgba(0, 0, 0, .5);
+ --text-field-text-color: #3a3a3a;
+
+ --menu-border-color: rgba(0, 0, 0, .5);
+ --menu-container-color: #ffffff;
+ --menu-item-container-color: transparent;
+ --menu-item-selected-container-color: rgb(194 229 255);
+ --menu-item-text-color: #3a3a3a;
+
+ //--icon-button-container-color: ;
+ //--icon-button-color: ;
+
+ --card-container-color: rgb(242, 245, 255);
+ --card-border-color: rgba(0, 0, 0, .125);
+ --card-text-color: #3a3a3a;
+ --card-min-width: 19rem;
+
+ --card-grid-gap: 1rem;
+
+ --focus-outline-color: #1967D2;
+
+ #filter-and-search {
+ display: flex;
+ flex-direction: column;
+ flex-wrap: wrap;
+ justify-content: center;
+ gap: 0.75rem;
+ margin-bottom: 1rem;
+
+ &.hidden {
+ display: none;
+ }
+ }
+
+ .filter-group {
+ display: flex;
+ align-items: center;
+ gap: 0.25rem;
+ }
+
+ .card-grid {
+ display: grid;
+ grid-template-columns: repeat(auto-fit, minmax(var(--card-min-width), 1fr));
+ gap: var(--card-grid-gap);
+ }
+
+ .lint-card {
+ display: flex;
+ flex-direction: column;
+
+ border: 1px solid var(--card-border-color);
+ border-radius: 8px;
+ padding: 0.75rem;
+ gap: 0.5rem;
+ background-color: var(--card-container-color);
+
+ scroll-margin: 4rem;
+
+ p {
+ font-size: 0.95em;
+
+ code {
+ font-size: 0.95em;
+ background-color: rgba(0, 0, 0, .05);
+ color: #212121;
+ border-radius: .25rem;
+ padding: .1rem .25rem;
+ text-wrap: nowrap;
+ }
+ }
+
+ &.hidden {
+ display: none;
+ }
+ }
+
+ .card-title {
+ font-size: 1.2em;
+ font-weight: 700;
+ margin: 0;
+ overflow: hidden;
+ padding-right: 2rem;
+ }
+
+ .card-details {
+ display: flex;
+ align-items: center;
+ gap: 10px;
+ font-size: 0.8em;
+ }
+
+ .card-actions {
+ margin-top: auto;
+ padding-top: 0.5rem;
+
+ display: flex;
+ flex-direction: row;
+ justify-content: space-between;
+ align-items: flex-end;
+ gap: 0.5rem;
+
+ div {
+ display: flex;
+
+ &.leading {
+ gap: 0.25rem;
+ user-select: none;
+
+ span {
+ color: var(--card-text-color);
+ font-size: 20px;
+ font-variation-settings: 'FILL' 1;
+ }
+ }
+
+ &.trailing {
+ gap: 0.5rem;
+
+ a, button {
+ display: flex;
+ align-items: center;
+
+ text-decoration: none;
+ background: none;
+ border-radius: 20px;
+ padding: 0 0.75rem;
+ height: 32px;
+ color: var(--outline-button-text-color);
+ border: 1px solid var(--outline-button-border-color);
+
+ &:last-child {
+ border: none;
+ color: var(--filled-button-text-color);
+ background-color: var(--filled-button-container-color);
+ }
+
+ &:hover {
+ @include interaction-style(6%);
+ }
+
+ &:active {
+ @include interaction-style(10%);
+ }
+
+ &:focus-visible {
+ outline-offset: 1px;
+ }
+ }
+
+ button.hidden {
+ display: none;
+ }
+ }
+ }
+ }
+
+ .chip-set {
+ display: flex;
+ flex-direction: row;
+ text-wrap: nowrap;
+ flex-wrap: wrap;
+ align-items: center;
+ justify-content: center;
+ gap: 0.5rem;
+ padding: 0 0.5rem;
+ }
+
+ button.chip {
+ border: 1px solid var(--chip-border-color);
+ border-radius: 8px;
+ height: 2rem;
+ padding: 0 .5rem;
+ background: none;
+ color: var(--chip-text-color);
+ font-weight: 500;
+ user-select: none;
+
+ display: flex;
+ align-items: center;
+ gap: 0.2rem;
+
+ .label {
+ background: none;
+ }
+
+ &:hover {
+ @include interaction-style(4%);
+ }
+
+ &:active {
+ @include interaction-style(8%);
+ }
+
+ .chip-icon {
+ align-self: center;
+ fill: currentcolor;
+ position: relative;
+ height: 18px;
+ width: 18px;
+ }
+
+ .leading-icon {
+ display: none;
+ margin-right: 0.25rem;
+ }
+ }
+
+ button.chip {
+ &.selected {
+ background-color: var(--chip-selected-container-color);
+ border: none;
+
+ .leading-icon {
+ display: flex;
+ }
+ }
+ }
+
+ .text-button {
+ background: none;
+ border: none;
+ color: var(--text-button-text-color);
+ border-radius: 8px;
+ user-select: none;
+
+ padding: 0 .5rem;
+ height: 1.75rem;
+
+ &:hover {
+ @include interaction-style(4%);
+ color: var(--text-button-text-color);
+ }
+
+ &:active {
+ @include interaction-style(8%);
+ color: var(--text-button-text-color);
+ }
+
+ &:focus {
+ color: var(--text-button-text-color);
+ }
+ }
+
+ .icon-button {
+ display: flex;
+ flex-direction: row;
+ align-items: center;
+ height: 2rem;
+ }
+
+ .search-row {
+ display: flex;
+ flex-direction: row;
+ align-items: center;
+ width: 100%;
+ gap: 0.5rem;
+
+ .search-wrapper {
+ display: flex;
+ align-items: center;
+ width: 100%;
+
+ border: 1px solid var(--text-field-border-color);
+ border-radius: 20px;
+ height: 3rem;
+ padding: 0 .5rem;
+
+ .leading-icon {
+ padding-left: 0.25rem;
+ user-select: none;
+ }
+
+ input {
+ background: none;
+ width: 100%;
+ font-size: 1rem;
+ cursor: text;
+
+ &::-webkit-search-cancel-button {
+ display: none;
+ }
+ }
+ }
+ }
+
+ section.content-search-results {
+ margin: 0.5rem 0 1rem;
+ }
+
+ .button-menu-wrapper {
+ position: relative;
+
+ .select-menu {
+ display: none;
+ position: absolute;
+ overflow: auto;
+ z-index: 5;
+ background-color: var(--menu-container-color);
+ border-radius: 0.5rem;
+ border: 1px solid var(--menu-border-color);
+ min-width: 100%;
+ max-height: 15rem;
+ overflow-y: scroll;
+ scrollbar-width: thin;
+ overscroll-behavior: contain;
+ margin-top: 0.25rem;
+
+ ul {
+ list-style-type: none;
+ padding: 0;
+ margin: 0;
+ width: 100%;
+
+ li {
+ &:first-child {
+ padding-top: 0.5rem;
+ }
+
+ &:last-child {
+ padding-bottom: 0.5rem;
+ }
+ }
+
+ // Menu item button.
+ button {
+ padding: 0.2rem 0.75rem 0.2rem 0.5rem;
+ width: 100%;
+ border: none;
+ background: none;
+ color: var(--menu-item-text-color);
+ font-weight: 500;
+ text-align: left;
+ user-select: none;
+
+ &:hover {
+ @include interaction-style(4%);
+ }
+
+ &:focus {
+ @include interaction-style(6%);
+ }
+
+ &:active {
+ @include interaction-style(8%);
+ }
+
+ display: flex;
+ flex-direction: row;
+
+ span.material-symbols {
+ align-self: center;
+ vertical-align: center;
+ fill: currentcolor;
+ position: relative;
+ font-size: 1.25rem;
+ margin-right: 0.4rem;
+
+ font-variation-settings: 'FILL' 1;
+ }
+
+ &.selected {
+ background-color: var(--menu-item-selected-container-color);
+ }
+ }
+ }
+
+ &.show-menu {
+ display: flex;
+ }
+ }
+ }
+
+ .search-wrapper:has(:focus-visible), .chip:focus-visible, .text-button:focus-visible, .trailing a:focus-visible, .trailing button:focus-visible {
+ outline: 2px solid var(--focus-outline-color);
+ border-color: transparent;
+ }
+}
diff --git a/src/content/assets/js/linter-rules.js b/src/content/assets/js/linter-rules.js
new file mode 100644
index 0000000000..a74882dac7
--- /dev/null
+++ b/src/content/assets/js/linter-rules.js
@@ -0,0 +1,173 @@
+function _setupFiltering() {
+ const lintCards = document
+ .getElementById('lint-cards')
+ ?.querySelectorAll('.lint-card');
+ if (!lintCards) return;
+
+ const lintsInfo = [];
+
+ lintCards.forEach(card => {
+ const lintName = card.id;
+ if (!lintName) return;
+ lintsInfo.push({
+ name: lintName,
+ hasFix: card.dataset.hasFix === 'true',
+ stable: card.dataset.stable === 'true',
+ inCore: card.dataset.inCore === 'true',
+ inRecommended: card.dataset.inRecommended === 'true',
+ inFlutter: card.dataset.inFlutter === 'true',
+ });
+
+ const copyButton = card.querySelector('.copy-button');
+ if (!copyButton) return;
+
+ copyButton.addEventListener('click', async () => {
+ await navigator.clipboard.writeText(lintName);
+ // TODO(parlough): Show toast saying copied to clipboard.
+ });
+
+ copyButton.classList.remove('hidden');
+ });
+
+ const filterAndSearch = document.getElementById('filter-and-search');
+ if (!filterAndSearch) return;
+ filterAndSearch.classList.remove('hidden');
+
+ const filterChips = filterAndSearch.querySelectorAll('button.filter-chip');
+ const chips = filterAndSearch.querySelectorAll('button.chip');
+
+ filterChips.forEach(chip => {
+ chip.addEventListener('click', () => {
+ _closeMenusAndToggle();
+ chip.classList.toggle('selected');
+ const checked = chip.ariaChecked;
+ chip.ariaChecked = checked === 'true' ? 'false' : 'true';
+ filterRules();
+ });
+ });
+
+ const selectChips = filterAndSearch.querySelectorAll('button.select-chip');
+ selectChips.forEach(chip => {
+ chip.addEventListener('click', (_) => {
+ const menuToToggle = chip.dataset.menu;
+ _closeMenusAndToggle(menuToToggle);
+ });
+
+ const options = chip.parentElement.querySelectorAll('.select-menu button');
+
+ function unselectOptions() {
+ options.forEach(option => {
+ option.classList.remove('selected');
+ option.ariaSelected = 'false';
+ });
+ }
+
+ options.forEach(option => {
+ option.addEventListener('click', () => {
+ if (option.classList.contains('selected')) {
+ _resetChip(chip);
+ } else {
+ unselectOptions();
+ option.classList.add('selected');
+ option.ariaSelected = 'true';
+ chip.classList.add('selected');
+ chip.querySelector('.label').textContent = option.querySelector('.label').textContent;
+ chip.dataset.filter = option.dataset.filter;
+ }
+
+ filterRules();
+ });
+ });
+ });
+
+ const searchInput = filterAndSearch.querySelector('.search-wrapper input');
+
+ function filterRules() {
+ const lintsToShow = new Set();
+ const searchTerm = searchInput.value.toLowerCase().replace(/\s/g, '');
+ const selectedChips = Array.from(chips).filter(chip => chip.classList.contains('selected'));
+ const selectedProperties = selectedChips.map(chip => chip.dataset.filter);
+
+ for (const lint of lintsInfo) {
+ const lintName = lint.name;
+ if (!lintName.includes(searchTerm)) continue;
+ if (selectedProperties.some(property => lint[property] !== true)) continue;
+
+ lintsToShow.add(lintName);
+ }
+
+ lintCards.forEach(card => {
+ const lintName = card.id;
+
+ if (lintsToShow.has(lintName)) {
+ card.classList.remove('hidden');
+ } else {
+ card.classList.add('hidden');
+ }
+ });
+ }
+
+ searchInput.addEventListener('input', filterRules);
+
+ filterAndSearch.querySelector('#reset-filters').addEventListener('click', () => {
+ searchInput.value = '';
+ chips.forEach(chip => _resetChip(chip));
+ filterRules();
+ });
+
+ document.addEventListener('click', (event) => {
+ // If not clicking inside a menu wrapper, close all menus.
+ if (!event.target.closest('.button-menu-wrapper')) {
+ _closeMenusAndToggle();
+ }
+ });
+
+ document.addEventListener('keydown', (event) => {
+ // If pressing the `esc` key in the filter area, close any open menus.
+ if (event.key === 'Escape' && event.target.closest('#filter-and-search')) {
+ _closeMenusAndToggle();
+ }
+ });
+
+ filterRules();
+}
+
+function _closeMenusAndToggle(menuToToggle = '') {
+ document.querySelectorAll('.select-chip').forEach(chip => {
+ const menu = chip.parentElement.querySelector('.select-menu');
+ if (menu.id === menuToToggle) {
+ if (menu.classList.contains('show-menu')) {
+ menu.classList.remove('show-menu');
+ chip.ariaExpanded = 'false';
+ } else {
+ menu.classList.add('show-menu');
+ chip.ariaExpanded = 'true';
+ }
+ } else {
+ // Close all other menus.
+ menu.classList.remove('show-menu');
+ chip.ariaExpanded = 'false';
+ }
+ });
+}
+
+function _resetChip(chip) {
+ chip.classList.remove('selected');
+ if (chip.classList.contains('filter-chip')) {
+ chip.ariaChecked = 'false';
+ } else if (chip.classList.contains('select-chip')) {
+ chip.parentElement.querySelectorAll('.select-menu button')
+ .forEach(option => {
+ option.classList.remove('selected');
+ option.ariaSelected = 'false';
+ });
+ chip.ariaExpanded = 'false';
+ chip.querySelector('.label').textContent = chip.dataset.title;
+ }
+}
+
+if (document.readyState !== 'loading') {
+ _setupFiltering();
+} else {
+ document.addEventListener('DOMContentLoaded', _setupFiltering);
+}
diff --git a/src/content/deprecated/sound-problems.md b/src/content/deprecated/sound-problems.md
index 2e4b04e7b5..339d460f9c 100644
--- a/src/content/deprecated/sound-problems.md
+++ b/src/content/deprecated/sound-problems.md
@@ -257,7 +257,7 @@ For more information, see
:::note
If you have a valid reason to use a subtype, you can use the
-[covariant keyword](#the-covariant-keyword).
+[covariant keyword](/language/type-system#covariant-keyword).
:::
@@ -600,35 +600,8 @@ assumeStrings(names.[!cast!]());
### The covariant keyword
-Some (rarely used) coding patterns rely on tightening a type
-by overriding a parameter's type with a subtype, which is invalid.
-In this case, you can use the `covariant` keyword to
-tell the analyzer that you are doing this intentionally.
-This removes the static error and instead checks for an invalid
-argument type at runtime.
-
-The following shows how you might use `covariant`:
-
-
-```dart tag=passes-sa
-class Animal {
- void chase(Animal x) { ... }
-}
-
-class Mouse extends Animal { ... }
-
-class Cat extends Animal {
- @override
- void chase([!covariant!] Mouse x) { ... }
-}
-```
-
-Although this example shows using `covariant` in the subtype,
-the `covariant` keyword can be placed in either the superclass
-or the subclass method.
-Usually the superclass method is the best place to put it.
-The `covariant` keyword applies to a single parameter and is
-also supported on setters and fields.
+The documentation on the `covariant` keyword has been
+moved to [The Dart Type system](/language/type-system#covariant-keyword).
[bottom type]: https://en.wikipedia.org/wiki/Bottom_type
[cast()]: {{site.dart-api}}/dart-core/Iterable/cast.html
diff --git a/src/content/language/extend.md b/src/content/language/extend.md
index 575af4a4ea..782067ebfa 100644
--- a/src/content/language/extend.md
+++ b/src/content/language/extend.md
@@ -78,7 +78,7 @@ it's similar to a downcast in that it can cause a type error at runtime.
Still, narrowing the type is possible
if the code can guarantee that a type error won't occur.
In this case, you can use the
-[`covariant` keyword](/deprecated/sound-problems#the-covariant-keyword)
+[`covariant` keyword](/language/type-system#covariant-keyword)
in a parameter declaration.
For details, see the
[Dart language specification][].
diff --git a/src/content/language/type-system.md b/src/content/language/type-system.md
index d3613dd6e8..511499cab7 100644
--- a/src/content/language/type-system.md
+++ b/src/content/language/type-system.md
@@ -179,7 +179,7 @@ subtype of the original parameter.
:::note
If you have a valid reason to use a subtype, you can use the
-[`covariant` keyword](/deprecated/sound-problems#the-covariant-keyword).
+[`covariant` keyword](/language/type-system#covariant-keyword).
:::
Consider the `chase(Animal)` method for the `Animal` class:
@@ -483,6 +483,38 @@ For more information, see
[Use sound return types when overriding methods](#use-proper-return-types)
and [Use sound parameter types when overriding methods](#use-proper-param-types).
+
+#### Covariant parameters
+
+Some (rarely used) coding patterns rely on tightening a type
+by overriding a parameter's type with a subtype, which is invalid.
+In this case, you can use the `covariant` keyword to
+tell the analyzer that you're doing this intentionally.
+This removes the static error and instead checks for an invalid
+argument type at runtime.
+
+The following shows how you might use `covariant`:
+
+
+```dart tag=passes-sa
+class Animal {
+ void chase(Animal x) { ... }
+}
+
+class Mouse extends Animal { ... }
+
+class Cat extends Animal {
+ @override
+ void chase([!covariant!] Mouse x) { ... }
+}
+```
+
+Although this example shows using `covariant` in the subtype,
+the `covariant` keyword can be placed in either the superclass
+or the subclass method.
+Usually the superclass method is the best place to put it.
+The `covariant` keyword applies to a single parameter and is
+also supported on setters and fields.
## Other resources
diff --git a/src/content/guides/environment-declarations.md b/src/content/libraries/core/environment-declarations.md
similarity index 98%
rename from src/content/guides/environment-declarations.md
rename to src/content/libraries/core/environment-declarations.md
index ee3c840a86..7670bfdc8b 100644
--- a/src/content/guides/environment-declarations.md
+++ b/src/content/libraries/core/environment-declarations.md
@@ -148,7 +148,7 @@ check out [the `webdev` configuration documentation][webdev-config].
### Visual Studio Code
In your launch configuration (`launch.json`) under `configurations`,
-add a new `toolArgs` key containing the your desired environment declarations:
+add a new `toolArgs` key containing your desired environment declarations:
```json
"configurations": [
diff --git a/src/content/libraries/dart-convert.md b/src/content/libraries/dart-convert.md
index 0c71874329..8862497137 100644
--- a/src/content/libraries/dart-convert.md
+++ b/src/content/libraries/dart-convert.md
@@ -80,7 +80,7 @@ option is to omit the second argument, in which case the encoder calls
the object's `toJson()` method.
For more examples and links to JSON-related packages, see
-[Using JSON](/guides/json).
+[Using JSON](/libraries/serialization/json).
## Decoding and encoding UTF-8 characters
diff --git a/src/content/guides/json.md b/src/content/libraries/serialization/json.md
similarity index 100%
rename from src/content/guides/json.md
rename to src/content/libraries/serialization/json.md
diff --git a/src/content/resources/useful-packages.md b/src/content/resources/useful-packages.md
index 6e62f9a192..c956b0efef 100644
--- a/src/content/resources/useful-packages.md
+++ b/src/content/resources/useful-packages.md
@@ -30,7 +30,7 @@ Use these packages for a wide range of projects.
| [cupertino_http][] | Provides access to Apple's [Foundation URL Loading System][furl] using the same interface as `package:http`. | |
| [http][] | Provides set of high-level functions and classes to simplify consuming HTTP resources. | delete(), get(), post(), read() |
| [intl][] | Internationalization and localization facilities, with support for plurals and genders, date and number formatting and parsing, and bidirectional text. | Bidi, DateFormat, MicroMoney, TextDirection |
-| [json_serializable][] | Generates JSON manipulation code. To learn more, consult [JSON Support](/guides/json). | @JsonSerializable |
+| [json_serializable][] | Generates JSON manipulation code. To learn more, consult [JSON Support](/libraries/serialization/json). | @JsonSerializable |
| [logging][] | Adds message logging to your application. | LoggerHandler, Level, LogRecord |
| [mockito][] | Mocks objects in tests. Helps when you write tests for dependency injection. Use with the [test][] package. | Answering, Expectation, Verification |
| [path][] | Manipulates different types of paths. To learn more, consult [Unboxing Packages: path.]({{site.news}}/2016/06/unboxing-packages-path.html) | absolute(), basename(), extension(), join(), normalize(), relative(), split() |
diff --git a/src/content/resources/whats-new.md b/src/content/resources/whats-new.md
index 76f148472d..294c95c2d2 100644
--- a/src/content/resources/whats-new.md
+++ b/src/content/resources/whats-new.md
@@ -388,7 +388,7 @@ we made the following changes:
[Dart 3 migration guide]: /resources/dart-3-migration
[language evolution]: /resources/language/evolution
[language versioning]: /resources/language/evolution#language-versioning
-[compilation environment declarations]: /guides/environment-declarations
+[compilation environment declarations]: /libraries/core/environment-declarations
[Java interop]: /interop/java-interop
[unnamed extensions]: /language/extension-methods#unnamed-extensions
[`dart info`]: /tools/dart-info
diff --git a/src/content/tools/build_runner.md b/src/content/tools/build_runner.md
index 85a250e4a7..f2a15998fe 100644
--- a/src/content/tools/build_runner.md
+++ b/src/content/tools/build_runner.md
@@ -102,6 +102,6 @@ For details on using build_runner, see the following:
[on build]: {{site.pub-pkg}}?q=dependency%3Abuild
[on build_runner.]: {{site.pub-pkg}}?q=dependency%3Abuild_runner
[sass_builder]: {{site.pub-pkg}}/sass_builder
-[tests]: /guides/testing
+[tests]: /tools/testing
[webdev]: /tools/webdev
[webdev serve]: /tools/webdev#serve
diff --git a/src/content/tools/dart-test.md b/src/content/tools/dart-test.md
index 3e1d186b13..2b92f12941 100644
--- a/src/content/tools/dart-test.md
+++ b/src/content/tools/dart-test.md
@@ -12,7 +12,7 @@ For information on writing tests, see the
If you're working on Flutter code, then use the `flutter test` command instead,
as described in [Testing Flutter apps][].
-[testing documentation]: /guides/testing
+[testing documentation]: /tools/testing
[`test` package]: {{site.pub-pkg}}/test
[Testing Flutter apps]: {{site.flutter-docs}}/testing
diff --git a/src/content/tools/linter-rules/index.md b/src/content/tools/linter-rules/index.md
index d5b6aada3a..4a9a433912 100644
--- a/src/content/tools/linter-rules/index.md
+++ b/src/content/tools/linter-rules/index.md
@@ -2,6 +2,8 @@
title: Linter rules
description: Details about the Dart linter and its style rules you can choose.
show_breadcrumbs: true
+body_class: linter-rules
+js: [{url: '/assets/js/linter-rules.js', defer: true}]
---
Use the Dart linter to identify possible problems in your Dart code.
@@ -88,7 +90,7 @@ Each rule has a status or maturity level:
and might be removed in a future Dart release.
**Removed**
-: These rules have been already been removed in the
+: These rules have already been removed in the
latest stable Dart release.
## Quick fixes
@@ -109,13 +111,88 @@ To learn more, see [Quick fixes for analysis issues][].
The following is an index of all linter rules and
a short description of their functionality.
-To learn more about each rule,
-click on its name.
+To learn more about a specific rule,
+click the **Learn more** button on its card.
For an auto-generated list containing all linter rules
in Dart `{{site.sdkVersion}}`,
check out [All linter rules](/tools/linter-rules/all).
-{% render 'linter-rules-section.md', linter_rules:linter_rules %}
+---
+
+{% comment -%}
+TODO(parlough): Generate this HTML with some sort of component mechanism.
+{% endcomment -%}
+
+
+
+
+ search
+
+
+ {%- comment %}
+ sort
+ {% endcomment -%}
+
+
+
+ {%- comment %}{% endcomment -%}
+
+
+
+
+
+ Fix available
+
+
+
+
+
+ Stable only
+
+
Clear filters
+
+
+
+
+
+ {% render 'linter-rule-cards.md', linter_rules:linter_rules %}
+
+
[Dart style guide]: /effective-dart/style
diff --git a/src/content/tools/pub/custom-package-repositories.md b/src/content/tools/pub/custom-package-repositories.md
index 463870971a..6934a25ed7 100644
--- a/src/content/tools/pub/custom-package-repositories.md
+++ b/src/content/tools/pub/custom-package-repositories.md
@@ -207,22 +207,30 @@ with support for token authentication by multiple vendors,
alleviating you from the overhead of hosting and maintaining
your own custom package repository:
-
+
diff --git a/src/content/guides/testing.md b/src/content/tools/testing.md
similarity index 100%
rename from src/content/guides/testing.md
rename to src/content/tools/testing.md
diff --git a/src/content/tutorials/server/fetch-data.md b/src/content/tutorials/server/fetch-data.md
index 94e002cd44..c1300316bb 100644
--- a/src/content/tutorials/server/fetch-data.md
+++ b/src/content/tutorials/server/fetch-data.md
@@ -651,7 +651,7 @@ to prevent your interface from becoming unresponsive.
[isolate]: /language/concurrency#isolates
[URI]: https://wikipedia.org/wiki/Uniform_Resource_Identifier
-[Using JSON]: /guides/json
+[Using JSON]: /libraries/serialization/json
[convert-docs]: {{site.dart-api}}/dart-convert/dart-convert-library.html
[http-pub]: {{site.pub-pkg}}/http
[http-docs]: {{site.pub-api}}/http