Skip to content

Commit

Permalink
[sync] 2024/12/24 (#1537)
Browse files Browse the repository at this point in the history
  • Loading branch information
AmosHuKe authored Dec 24, 2024
2 parents adcc289 + 440c857 commit 0153553
Show file tree
Hide file tree
Showing 608 changed files with 10,767 additions and 5,616 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
with:
submodules: recursive
- uses: subosito/flutter-action@74af56c5ed2697ba4621264652728e8d217e53d3
- uses: subosito/flutter-action@f2c4f6686ca8e8d6e6d0f28410eeef506ed66aff
with:
channel: ${{ matrix.branch }}
- name: Fetch Dart dependencies
Expand All @@ -58,7 +58,7 @@ jobs:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
with:
submodules: recursive
- uses: dart-lang/setup-dart@0a8a0fc875eb934c15d08629302413c671d3f672
- uses: dart-lang/setup-dart@e630b99d28a3b71860378cafdc2a067c71107f94
with:
sdk: stable
- name: Fetch Dart dependencies
Expand Down Expand Up @@ -86,7 +86,7 @@ jobs:
run: corepack install
- name: Install node dependencies
run: pnpm install --frozen-lockfile
- uses: dart-lang/setup-dart@0a8a0fc875eb934c15d08629302413c671d3f672
- uses: dart-lang/setup-dart@e630b99d28a3b71860378cafdc2a067c71107f94
with:
sdk: stable
- name: Fetch Dart dependencies
Expand All @@ -109,7 +109,7 @@ jobs:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
with:
submodules: recursive
- uses: dart-lang/setup-dart@0a8a0fc875eb934c15d08629302413c671d3f672
- uses: dart-lang/setup-dart@e630b99d28a3b71860378cafdc2a067c71107f94
with:
sdk: stable
- name: Fetch Dart dependencies
Expand Down Expand Up @@ -141,7 +141,7 @@ jobs:
run: corepack install
- name: Install node dependencies
run: pnpm install --frozen-lockfile
- uses: dart-lang/setup-dart@0a8a0fc875eb934c15d08629302413c671d3f672
- uses: dart-lang/setup-dart@e630b99d28a3b71860378cafdc2a067c71107f94
with:
sdk: stable
- name: Fetch Dart dependencies
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/stage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
run: corepack install
- name: Install node dependencies
run: pnpm install --frozen-lockfile
- uses: dart-lang/setup-dart@0a8a0fc875eb934c15d08629302413c671d3f672
- uses: dart-lang/setup-dart@e630b99d28a3b71860378cafdc2a067c71107f94
with:
sdk: stable
- name: Fetch Dart dependencies
Expand Down
2 changes: 1 addition & 1 deletion .idx/dev.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# see: https://developers.google.com/idx/guides/customize-idx-env
{ pkgs, ... }: {
# Which nixpkgs channel to use.
channel = "stable-24.05"; # or "unstable"
channel = "stable-24.11"; # or "unstable"

# Use https://search.nixos.org/packages to find packages
packages = [
Expand Down
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ it's easiest to make changes using the GitHub UI.
If you have an issue with the
API docs on [api.flutter.dev](https://api.flutter.dev),
please file those issues on
the [flutter/flutter](https://github.com/flutter/flutter/issues) repo,
not on this (flutter/website) repo.
the [`flutter/flutter`](https://github.com/flutter/flutter/issues) repo,
not on this (`flutter/website`) repo.
The API docs are embedded in Flutter's source code,
so the engineering team handles those.

Expand Down Expand Up @@ -129,7 +129,7 @@ If you prefer, you can use a version manager such as [nvm][],
and run `nvm install` from the repository's root directory.

If you already have Node installed, verify it's available on your path
and already the latest stable version _(currently `20.17` or later)_:
and already the latest stable version _(currently `22.12` or later)_:

```console
node --version
Expand Down Expand Up @@ -200,7 +200,7 @@ following the instructions in [Get the prerequisites](#get-the-prerequisites).
dart pub get
```

3. (optional - We highly recommend you use `pnpm`, but you can also use `npm`.)
3. _Optional:_ We recommend you use `pnpm`, but you can also use `npm`.
Install `pnpm`, an alternative, efficient package manager for
npm packages. If you already have `pnpm`, verify you have the
latest stable version.
Expand All @@ -209,7 +209,7 @@ following the instructions in [Get the prerequisites](#get-the-prerequisites).
node --version
```

If you do not already have `pnpm` installed, we recommend
If you don't already have `pnpm` installed, we recommend
using [`corepack`][] to install and manage `pnpm` versions,
since `corepack` is bundled with most installations of
Node. If you installed `node` using Homebrew, you'll need
Expand Down Expand Up @@ -327,7 +327,7 @@ run `./dash_site refresh-excerpts`.
To learn more about creating, editing, and using code excerpts,
check out the [excerpt updater package documentation][].

[excerpt updater package documentation]: https://github.com/dart-lang/site-shared/tree/main/packages/excerpter#readme
[excerpt updater package documentation]: https://github.com/dart-lang/site-shared/tree/main/pkgs/excerpter#readme

## [Optional] Deploy to a staging site

Expand Down Expand Up @@ -360,7 +360,7 @@ you can build a full version and upload it to Firebase.
./dash_site build
```

This will build the site and copy it to your local `_site` directory.
This builds the site and copies it to your local `_site` directory.
If that directory previously existed, it will be replaced.

3. Deploy to your activated Firebase project's default hosting site:
Expand Down
2 changes: 1 addition & 1 deletion analysis_options.yaml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
analyzer:
exclude: [flutter, site-shared, src, tmp]
exclude: [_site, flutter, site-shared, src, tmp]
6 changes: 3 additions & 3 deletions dash_site
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#!/bin/bash

REQUIRED_DART_VERSION="3.5"
REQUIRED_NODE_VERSION="20.12"
REQUIRED_PNPM_VERSION="9.0"
REQUIRED_DART_VERSION="3.6"
REQUIRED_NODE_VERSION="22.11"
REQUIRED_PNPM_VERSION="9.12"

# Check that the 'dart' command is available on the user's path.
if ! command -v dart &> /dev/null; then
Expand Down
Binary file added diagrams/app-architecture/architecture-docs.fig
Binary file not shown.
21 changes: 9 additions & 12 deletions eleventy.config.js → eleventy.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { registerFilters } from './src/_11ty/filters.js';
import { registerShortcodes } from './src/_11ty/shortcodes.js';
import { markdown } from './src/_11ty/plugins/markdown.js';
import { configureHighlighting } from './src/_11ty/plugins/highlight.js';
import { UserConfig } from '@11ty/eleventy';

import minifier from 'html-minifier-terser';
import yaml from 'js-yaml';
Expand All @@ -15,13 +16,9 @@ import * as path from 'node:path';
import * as sass from 'sass';

// noinspection JSUnusedGlobalSymbols
/**
* @typedef {import('11ty/eleventy/UserConfig')} EleventyConfig
* @param {EleventyConfig} eleventyConfig
*/
export default function (eleventyConfig) {
const isProduction = process.env.PRODUCTION === 'true';
const shouldOptimize = process.env.OPTIMIZE === 'true';
export default function (eleventyConfig: UserConfig) {
const isProduction = process.env['PRODUCTION'] === 'true';
const shouldOptimize = process.env['OPTIMIZE'] === 'true';

eleventyConfig.on('eleventy.before', async () => {
await configureHighlighting(markdown);
Expand All @@ -31,8 +28,8 @@ export default function (eleventyConfig) {

eleventyConfig.setLibrary('md', markdown);

eleventyConfig.addDataExtension('yml,yaml', (contents) =>
yaml.load(contents),
eleventyConfig.addDataExtension('yml,yaml', (contents: string) =>
yaml.load(contents),
);

eleventyConfig.setLiquidOptions({
Expand All @@ -51,7 +48,7 @@ export default function (eleventyConfig) {
eleventyConfig.addWatchTarget('src/_sass');
eleventyConfig.addExtension('scss', {
outputFileExtension: 'css',
compile: function (inputContent, inputPath) {
compile: function (inputContent: string, inputPath: string) {
const parsedPath = path.parse(inputPath);
if (parsedPath.name.startsWith('_')) {
return;
Expand Down Expand Up @@ -88,13 +85,13 @@ export default function (eleventyConfig) {
filter: /^(?!_).+/,
});
eleventyConfig.addPassthroughCopy('src/content/tools/devtools/release-notes', {
filter: (path) => path.includes('src') || path.includes('images'),
filter: (path: string) => path.includes('src') || path.includes('images'),
});

if (shouldOptimize) {
// If building for production, minify/optimize the HTML output.
// Doing so during serving isn't worth the extra build time.
eleventyConfig.addTransform('minify-html', async function (content) {
eleventyConfig.addTransform('minify-html', async function (content: string) {
if (this.page.outputPath && this.page.outputPath.endsWith('.html')) {
// Minify the page's content if it's an HTML file.
// Other options can be enabled, but each should be tested.
Expand Down

This file was deleted.

5 changes: 2 additions & 3 deletions examples/_animation/basic_hero_animation/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,15 @@ publish_to: none
description: >-
Shows how to create a simple or Hero animation using the Hero class directly.
resolution: workspace
environment:
sdk: ^3.5.0
sdk: ^3.6.0

dependencies:
flutter:
sdk: flutter

dev_dependencies:
example_utils:
path: ../../example_utils
flutter_test:
sdk: flutter

Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class Photo extends StatelessWidget {
return Material(
// Slightly opaque color appears where the image has transparency.
// Makes it possible to see the radial transformation's boundary.
color: Theme.of(context).primaryColor.withOpacity(0.25),
color: Theme.of(context).primaryColor.withValues(alpha: 0.25),
child: InkWell(
onTap: onTap,
child: Image.asset(
Expand Down
5 changes: 2 additions & 3 deletions examples/_animation/basic_radial_hero_animation/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,15 @@ description: >-
Shows how to apply a radial transformation to the Hero
as it animates to the new route.
resolution: workspace
environment:
sdk: ^3.5.0
sdk: ^3.6.0

dependencies:
flutter:
sdk: flutter

dev_dependencies:
example_utils:
path: ../../example_utils
flutter_test:
sdk: flutter

Expand Down

This file was deleted.

4 changes: 2 additions & 2 deletions examples/_animation/basic_staggered_animation/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -187,9 +187,9 @@ class _StaggerDemoState extends State<StaggerDemo>
width: 300,
height: 300,
decoration: BoxDecoration(
color: Colors.black.withOpacity(0.1),
color: Colors.black.withValues(alpha: 0.1),
border: Border.all(
color: Colors.black.withOpacity(0.5),
color: Colors.black.withValues(alpha: 0.5),
),
),
child: StaggerAnimation(controller: _controller.view),
Expand Down
5 changes: 2 additions & 3 deletions examples/_animation/basic_staggered_animation/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,15 @@ name: basic_staggered
publish_to: none
description: An introductory example to staggered animations.

resolution: workspace
environment:
sdk: ^3.5.0
sdk: ^3.6.0

dependencies:
flutter:
sdk: flutter

dev_dependencies:
example_utils:
path: ../../example_utils
flutter_test:
sdk: flutter

Expand Down
5 changes: 0 additions & 5 deletions examples/_animation/hero_animation/analysis_options.yaml

This file was deleted.

5 changes: 2 additions & 3 deletions examples/_animation/hero_animation/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,15 @@ name: hero_animation
publish_to: none
description: Shows how to create a simple Hero transition.

resolution: workspace
environment:
sdk: ^3.5.0
sdk: ^3.6.0

dependencies:
flutter:
sdk: flutter

dev_dependencies:
example_utils:
path: ../../example_utils
flutter_test:
sdk: flutter

Expand Down

This file was deleted.

2 changes: 1 addition & 1 deletion examples/_animation/radial_hero_animation/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class Photo extends StatelessWidget {
Widget build(BuildContext context) {
return Material(
// Slightly opaque color appears where the image has transparency.
color: Theme.of(context).primaryColor.withOpacity(0.25),
color: Theme.of(context).primaryColor.withValues(alpha: 0.25),
child: InkWell(
onTap: onTap,
child: LayoutBuilder(
Expand Down
5 changes: 2 additions & 3 deletions examples/_animation/radial_hero_animation/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,15 @@ description: >-
Shows how to apply a radial transformation to the Hero
as it animates to the new route.
resolution: workspace
environment:
sdk: ^3.5.0
sdk: ^3.6.0

dependencies:
flutter:
sdk: flutter

dev_dependencies:
example_utils:
path: ../../example_utils
flutter_test:
sdk: flutter

Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class Photo extends StatelessWidget {
Widget build(BuildContext context) {
return Material(
// Slightly opaque color appears where the image has transparency.
color: Theme.of(context).primaryColor.withOpacity(0.25),
color: Theme.of(context).primaryColor.withValues(alpha: 0.25),
child: InkWell(
onTap: onTap,
child: LayoutBuilder(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,15 @@ description: >-
Shows how to apply a radial transformation to the Hero
as it animates to the new route.
resolution: workspace
environment:
sdk: ^3.5.0
sdk: ^3.6.0

dependencies:
flutter:
sdk: flutter

dev_dependencies:
example_utils:
path: ../../example_utils
flutter_test:
sdk: flutter

Expand Down

This file was deleted.

Loading

0 comments on commit 0153553

Please sign in to comment.