Skip to content

Commit a71469f

Browse files
authored
Merge branch 'main' into feat/dart-pub-unpack
2 parents 90c6467 + 4ff078d commit a71469f

14 files changed

+535
-837
lines changed

.github/workflows/codeql-analysis.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,11 @@ jobs:
2929

3030
steps:
3131
- name: Checkout repository
32-
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b
32+
uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b
3333

3434
# Initializes the CodeQL tools for scanning.
3535
- name: Initialize CodeQL
36-
uses: github/codeql-action/init@d39d31e687223d841ef683f52467bd88e9b21c14
36+
uses: github/codeql-action/init@ccf74c947955fd1cf117aef6a0e4e66191ef6f61
3737
with:
3838
languages: ${{ matrix.language }}
3939
# If you wish to specify custom queries, you can do so here or in a config file.
@@ -44,7 +44,7 @@ jobs:
4444
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
4545
# If this step fails, then you should remove it and run the build manually (see below)
4646
- name: Autobuild
47-
uses: github/codeql-action/autobuild@d39d31e687223d841ef683f52467bd88e9b21c14
47+
uses: github/codeql-action/autobuild@ccf74c947955fd1cf117aef6a0e4e66191ef6f61
4848

4949
# ℹ️ Command-line programs to run using the OS shell.
5050
# 📚 https://git.io/JvXDl
@@ -58,4 +58,4 @@ jobs:
5858
# make release
5959

6060
- name: Perform CodeQL Analysis
61-
uses: github/codeql-action/analyze@d39d31e687223d841ef683f52467bd88e9b21c14
61+
uses: github/codeql-action/analyze@ccf74c947955fd1cf117aef6a0e4e66191ef6f61

.github/workflows/scorecards-analysis.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121

2222
steps:
2323
- name: "Checkout code"
24-
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b
24+
uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b
2525
with:
2626
persist-credentials: false
2727

@@ -49,6 +49,6 @@ jobs:
4949

5050
# Upload the results to GitHub's code scanning dashboard.
5151
- name: "Upload to code-scanning"
52-
uses: github/codeql-action/upload-sarif@d39d31e687223d841ef683f52467bd88e9b21c14
52+
uses: github/codeql-action/upload-sarif@ccf74c947955fd1cf117aef6a0e4e66191ef6f61
5353
with:
5454
sarif_file: results.sarif

.github/workflows/test.yml

+6-8
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ jobs:
3737
experimental: false
3838
continue-on-error: ${{ matrix.experimental }}
3939
steps:
40-
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b
40+
- uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b
4141
with:
4242
submodules: recursive
4343
- uses: dart-lang/setup-dart@f0ead981b4d9a35b37f30d36160575d60931ec30
@@ -56,7 +56,7 @@ jobs:
5656
name: Check if code excerpts are up to date
5757
runs-on: ubuntu-latest
5858
steps:
59-
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b
59+
- uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b
6060
with:
6161
submodules: recursive
6262
- uses: dart-lang/setup-dart@f0ead981b4d9a35b37f30d36160575d60931ec30
@@ -71,17 +71,15 @@ jobs:
7171
name: Build site and check links
7272
runs-on: ubuntu-latest
7373
steps:
74-
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b
74+
- uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b
7575
with:
7676
submodules: recursive
7777
- uses: dart-lang/setup-dart@f0ead981b4d9a35b37f30d36160575d60931ec30
7878
with:
7979
sdk: stable
8080
- name: Fetch Dart packages
8181
run: dart pub get
82-
- uses: pnpm/action-setup@a3252b78c470c02df07e9d59298aecedc3ccdd6d
83-
with:
84-
version: 8
82+
- uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2
8583
- uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8
8684
with:
8785
node-version: ${{ env.NODE_VERSION }}
@@ -99,7 +97,7 @@ jobs:
9997
name: Check if text can be replaced with site variables
10098
runs-on: ubuntu-latest
10199
steps:
102-
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b
100+
- uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b
103101
with:
104102
submodules: recursive
105103
- uses: dart-lang/setup-dart@f0ead981b4d9a35b37f30d36160575d60931ec30
@@ -114,7 +112,7 @@ jobs:
114112
name: Validate Firebase configuration
115113
runs-on: ubuntu-latest
116114
steps:
117-
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b
115+
- uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b
118116
with:
119117
submodules: recursive
120118
- uses: dart-lang/setup-dart@f0ead981b4d9a35b37f30d36160575d60931ec30

examples/misc/lib/language_tour/classes/point_alt.dart

+66-2
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,9 @@
66
///
77
// #docregion idiomatic-constructor
88
class Point {
9-
double x = 0;
10-
double y = 0;
9+
// Initializer list of variables and values
10+
double x = 2.0;
11+
double y = 2.0;
1112

1213
// Generative constructor with initializing formal parameters:
1314
Point(this.x, this.y);
@@ -34,3 +35,66 @@ class Point {
3435
// #docregion idiomatic-constructor
3536
}
3637
// #enddocregion idiomatic-constructor
38+
39+
// #docregion initialize-declaration
40+
class PointA {
41+
double x = 1.0;
42+
double y = 2.0;
43+
44+
// The implicit default constructor sets these variables to (1.0,2.0)
45+
// PointA();
46+
47+
@override
48+
String toString() {
49+
return 'PointA($x,$y)';
50+
}
51+
}
52+
// #enddocregion initialize-declaration
53+
54+
// #docregion initialize-formal
55+
class PointB {
56+
final double x;
57+
final double y;
58+
59+
// Sets the x and y instance variables
60+
// before the constructor body runs.
61+
PointB(this.x, this.y);
62+
63+
// Initializing formal parameters can also be optional.
64+
PointB.optional([this.x = 0.0, this.y = 0.0]);
65+
}
66+
// #enddocregion initialize-formal
67+
68+
// #docregion initialize-named
69+
class PointC {
70+
double x; // must be set in constructor
71+
double y; // must be set in constructor
72+
73+
// Generative constructor with initializing formal parameters
74+
// with default values
75+
PointC.named({this.x = 1.0, this.y = 1.0});
76+
77+
@override
78+
String toString() {
79+
return 'PointC.named($x,$y)';
80+
}
81+
}
82+
83+
// Constructor using named variables.
84+
final pointC = PointC.named(x: 2.0, y: 2.0);
85+
// #enddocregion initialize-named
86+
87+
// #docregion initialize-null
88+
class PointD {
89+
double? x; // null if not set in constructor
90+
double? y; // null if not set in constructor
91+
92+
// Generative constructor with initializing formal parameters
93+
PointD(this.x, this.y);
94+
95+
@override
96+
String toString() {
97+
return 'PointD($x,$y)';
98+
}
99+
}
100+
// #enddocregion initialize-null
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
// #docregion named
2+
class Vector2d {
3+
// #enddocregion named
4+
final double x;
5+
final double y;
6+
7+
Vector2d(this.x, this.y);
8+
// #docregion named
9+
// ...
10+
Vector2d.named({required this.x, required this.y});
11+
}
12+
13+
class Vector3d extends Vector2d {
14+
final double z;
15+
16+
// Forward the y parameter to the named super constructor like:
17+
// Vector3d.yzPlane({required double y, required this.z})
18+
// : super.named(x: 0, y: y);
19+
Vector3d.yzPlane({required super.y, required this.z}) : super.named(x: 0);
20+
}
21+
// #enddocregion named
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
// #docregion positional
2+
class Vector2d {
3+
final double x;
4+
final double y;
5+
6+
Vector2d(this.x, this.y);
7+
}
8+
9+
class Vector3d extends Vector2d {
10+
final double z;
11+
12+
// Forward the x and y parameters to the default super constructor like:
13+
// Vector3d(final double x, final double y, this.z) : super(x, y);
14+
Vector3d(super.x, super.y, this.z);
15+
}
16+
// #enddocregion positional

firebase.json

+4-2
Original file line numberDiff line numberDiff line change
@@ -34,14 +34,15 @@
3434
{ "source": "/articles/api-naming-guide{,/**}", "destination": "/effective-dart/design", "type": 301 },
3535
{ "source": "/articles/archive/dart-2", "destination": "/guides/language/evolution#dart-20", "type": 301 },
3636
{ "source": "/articles/archive/event-loop", "destination": "https://medium.com/dartlang/dart-asynchronous-programming-isolates-and-event-loops-bffc3e296a6a", "type": 301 },
37+
{ "source": "/articles/archive/numeric-computation", "destination": "/guides/language/numbers", "type": 301 },
3738
{ "source": "/articles/await-async", "destination": "/codelabs/async-await", "type": 301 },
3839
{ "source": "/articles/broadcast-streams", "destination": "https://medium.com/dartlang/dart-asynchronous-programming-streams-dab952023ed7", "type": 301 },
3940
{ "source": "/articles/converters-and-codecs", "destination": "/articles/archive/converters-and-codecs", "type": 301 },
4041
{ "source": "/articles/creating-streams", "destination": "/libraries/async/creating-streams", "type": 301 },
4142
{ "source": "/articles/dart-unit-tests{,/**}", "destination": "https://pub.dev/packages/test#writing-tests", "type": 301 },
4243
{ "source": "/articles/dart-vm/io", "destination": "/articles/libraries/dart-io", "type": 301 },
4344
{ "source": "/articles/dart-vm/native-extensions", "destination": "/server/c-interop-native-extensions", "type": 301 },
44-
{ "source": "/articles/dart-vm/numeric-computation", "destination": "/articles/archive/numeric-computation", "type": 301 },
45+
{ "source": "/articles/dart-vm/numeric-computation", "destination": "/guides/language/numbers", "type": 301 },
4546
{ "source": "/articles/dart-vm/snapshots", "destination": "https://github.com/dart-lang/sdk/wiki/Snapshots", "type": 301 },
4647
{ "source": "/articles/design-decisions/why-dart-types", "destination": "/resources/faq#types", "type": 301 },
4748
{ "source": "/articles/doc-comment-guidelines", "destination": "/effective-dart/documentation", "type": 301 },
@@ -66,7 +67,7 @@
6667
{ "source": "/articles/mixins", "destination": "/language/mixins", "type": 301 },
6768
{ "source": "/articles/mocking-with-dart", "destination": "https://pub.dev/packages/mockito", "type": 301 },
6869
{ "source": "/articles/native-extensions-for-standalone-dart-vm", "destination": "/server/c-interop-native-extensions", "type": 301 },
69-
{ "source": "/articles/numeric-computation", "destination": "/articles/archive/numeric-computation", "type": 301 },
70+
{ "source": "/articles/numeric-computation", "destination": "/guides/language/numbers", "type": 301 },
7071
{ "source": "/articles/optional-types", "destination": "/resources/faq#types", "type": 301 },
7172
{ "source": "/articles/serialization", "destination": "/guides/json", "type": 301 },
7273
{ "source": "/articles/server/native-extensions", "destination": "/server/c-interop-native-extensions", "type": 301 },
@@ -151,6 +152,7 @@
151152
{ "source": "/go/analysis-server-protocol", "destination": "https://htmlpreview.github.io/?https://github.com/dart-lang/sdk/blob/main/pkg/analysis_server/doc/api.html", "type": 301 },
152153
{ "source": "/go/automated-publishing", "destination": "/tools/pub/automated-publishing", "type": 301 },
153154
{ "source": "/go/cloud", "destination": "/server/google-cloud?utm_source=go-link&utm_medium=referral&utm_campaign=go-cloud", "type": 301 },
155+
{ "source": "/go/json-codable", "destination": "https://github.com/dart-lang/sdk/tree/main/pkg/json", "type": 301 },
154156
{ "source": "/go/content-hashes", "destination": "/tools/pub/glossary#content-hashes", "type": 301 },
155157
{ "source": "/go/core-lints", "destination": "https://github.com/dart-lang/lints", "type": 301 },
156158
{ "source": "/go/dart-fix", "destination": "/tools/dart-fix", "type": 301 },

package.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
},
2424
"devDependencies": {
2525
"@11ty/eleventy": "3.0.0-alpha.10",
26-
"firebase-tools": "^13.8.0",
26+
"firebase-tools": "^13.8.1",
2727
"hast-util-from-html": "^2.0.1",
2828
"hast-util-select": "^6.0.2",
2929
"hast-util-to-text": "^4.0.2",
@@ -35,7 +35,7 @@
3535
"markdown-it-container": "^4.0.0",
3636
"markdown-it-deflist": "^3.0.0",
3737
"markdown-it-table": "^4.1.1",
38-
"sass": "^1.76.0",
39-
"shiki": "^1.4.0"
38+
"sass": "^1.77.0",
39+
"shiki": "^1.5.1"
4040
}
4141
}

pnpm-lock.yaml

+16-16
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)