Skip to content

Commit 4252cd1

Browse files
committed
Merge branch 'main' into feat/eleventy-migration
2 parents af7013c + 394aa0f commit 4252cd1

File tree

10 files changed

+70
-17
lines changed

10 files changed

+70
-17
lines changed

.github/workflows/codeql-analysis.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jobs:
3333

3434
# Initializes the CodeQL tools for scanning.
3535
- name: Initialize CodeQL
36-
uses: github/codeql-action/init@0b21cf2492b6b02c465a3e5d7c473717ad7721ba
36+
uses: github/codeql-action/init@b7bf0a3ed3ecfa44160715d7c442788f65f0f923
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@0b21cf2492b6b02c465a3e5d7c473717ad7721ba
47+
uses: github/codeql-action/autobuild@b7bf0a3ed3ecfa44160715d7c442788f65f0f923
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@0b21cf2492b6b02c465a3e5d7c473717ad7721ba
61+
uses: github/codeql-action/analyze@b7bf0a3ed3ecfa44160715d7c442788f65f0f923

.github/workflows/scorecards-analysis.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -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@0b21cf2492b6b02c465a3e5d7c473717ad7721ba
52+
uses: github/codeql-action/upload-sarif@b7bf0a3ed3ecfa44160715d7c442788f65f0f923
5353
with:
5454
sarif_file: results.sarif

.github/workflows/test.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ jobs:
4040
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
4141
with:
4242
submodules: recursive
43-
- uses: dart-lang/setup-dart@ca7e6fee45ffbd82b555a7ebfc236d2c86439f5b
43+
- uses: dart-lang/setup-dart@fedb1266e91cf51be2fdb382869461a434b920a3
4444
with:
4545
sdk: ${{ matrix.sdk }}
4646
- name: Fetch Dart packages
@@ -61,7 +61,7 @@ jobs:
6161
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
6262
with:
6363
submodules: recursive
64-
- uses: dart-lang/setup-dart@ca7e6fee45ffbd82b555a7ebfc236d2c86439f5b
64+
- uses: dart-lang/setup-dart@fedb1266e91cf51be2fdb382869461a434b920a3
6565
with:
6666
sdk: stable
6767
- name: Fetch Dart packages

examples/language/lib/patterns/pattern_types.dart

+2-2
Original file line numberDiff line numberDiff line change
@@ -187,13 +187,13 @@ void miscDeclAnalyzedButNotTested() {
187187
case (:var untyped, :int typed): // ...
188188
}
189189

190-
// Record pattern wih null-check and null-assert subpatterns:
190+
// Record pattern with null-check and null-assert subpatterns:
191191
switch (record) {
192192
case (checked: var checked?, asserted: var asserted!): // ...
193193
case (:var checked?, :var asserted!): // ...
194194
}
195195

196-
// Record pattern wih cast subpattern:
196+
// Record pattern with cast subpattern:
197197
var (untyped: untyped as int, typed: typed as String) = record;
198198
var (:untyped as int, :typed as String) = record;
199199
// #enddocregion record-getter

src/content/index.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@
265265
</div>
266266
</div>
267267
</li>
268-
<li tabindex="0" data-banner="assets/dash/svg/1-2 language optimized.svg">
268+
<li tabindex="0" data-banner="assets/dash/svg/1-2-language-optimized.svg">
269269
<div>
270270
<div class="bullet-container">
271271
<div class="animated-bullet"></div>
@@ -277,7 +277,7 @@
277277
</div>
278278
</div>
279279
</li>
280-
<li tabindex="0" data-banner="assets/dash/svg/1-3 familiar syntax.svg">
280+
<li tabindex="0" data-banner="assets/dash/svg/1-3-familiar-syntax.svg">
281281
<div>
282282
<div class="bullet-container">
283283
<div class="animated-bullet"></div>

src/content/language/functions.md

+32-1
Original file line numberDiff line numberDiff line change
@@ -453,6 +453,8 @@ To return multiple values in a function, aggregate the values in a [record][].
453453
}
454454
```
455455

456+
[record]: /language/records#multiple-returns
457+
456458
## Generators
457459

458460
When you need to lazily produce a sequence of values,
@@ -499,9 +501,38 @@ Iterable<int> naturalsDownFrom(int n) sync* {
499501
}
500502
```
501503

504+
502505
[`Iterable`]: {{site.dart-api}}/{{site.sdkInfo.channel}}/dart-core/Iterable-class.html
503506
[`Stream`]: {{site.dart-api}}/{{site.sdkInfo.channel}}/dart-async/Stream-class.html
504-
[record]: /language/records#multiple-returns
507+
508+
## External functions {#external}
509+
510+
An external function is a function whose body is implemented separately from its
511+
declaration. Include the `external` keyword before a function declaration, like so:
512+
513+
```dart
514+
external void someFunc(int i);
515+
```
516+
517+
An external function's implementation can come from another Dart library,
518+
or, more commonly, from another language. In interop contexts, `external`
519+
introduces type information for foreign functions or values,
520+
making them usable in Dart. Implementation and usage is
521+
heavily platform specific, so check out the interop docs on, for example,
522+
[C][] or [JavaScript][] to learn more.
523+
524+
External functions can be top-level functions, [instance methods][],
525+
[getters or setters][], or [non-redirecting constructors][].
526+
An [instance variable][] can be `external` too,
527+
which is equivalent to an external getter and (if the variable
528+
is not `final`) an external setter.
529+
530+
[instance methods]: /language/methods#instance-methods
531+
[getters or setters]: /language/methods#getters-and-setters
532+
[non-redirecting constructors]: /language/constructors#redirecting-constructors
533+
[instance variable]: /language/classes#instance-variables
534+
[C]: /interop/c-interop
535+
[JavaScript]: /interop/js-interop
505536

506537
[Function API reference]: {{site.dart-api}}/{{site.sdkInfo.channel}}/dart-core/Function-class.html
507538
[Callable objects]: /language/callable-objects

src/content/language/keywords.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ The following table lists the words that the Dart language treats specially.
6060
[export]: /guides/libraries/create-packages
6161
[extends]: /language/extend
6262
[extension]: /language/extension-methods
63-
[external]: https://spec.dart.dev/DartLangSpecDraft.pdf#External%20Functions
63+
[external]: /language/functions#external
6464
[factory]: /language/constructors#factory-constructors
6565
[false]: /language/built-in-types#booleans
6666
[final (variable)]: /language/variables#final-and-const

src/content/language/pattern-types.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -383,13 +383,13 @@ switch (record) {
383383
case (:var untyped, :int typed): // ...
384384
}
385385
386-
// Record pattern wih null-check and null-assert subpatterns:
386+
// Record pattern with null-check and null-assert subpatterns:
387387
switch (record) {
388388
case (checked: var checked?, asserted: var asserted!): // ...
389389
case (:var checked?, :var asserted!): // ...
390390
}
391391
392-
// Record pattern wih cast subpattern:
392+
// Record pattern with cast subpattern:
393393
var (untyped: untyped as int, typed: typed as String) = record;
394394
var (:untyped as int, :typed as String) = record;
395395
```

src/content/tools/pub/pubspec.md

+23-1
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ A pubspec can have the following fields:
9696

9797
`ignored_advisories`
9898
: Optional. List of ignored security advisories.
99-
[_Learn more._](/tools/pub/security-advisories)
99+
[_Learn more._](#ignored_advisories)
100100

101101
Pub ignores all other fields.
102102

@@ -449,6 +449,28 @@ Pub.dev requires topics to follow these specifications:
449449
When choosing topics, consider if [existing topics]({{site.pub}}/topics)
450450
are relevant. Tagging with existing topics helps users discover your package.
451451

452+
### Ignored_advisories
453+
454+
If a package has a dependency that is affected by a security advisory,
455+
pub warns about the advisory during dependency resolution.
456+
Package authors can use the `ignored_advisories` field as an allowlist
457+
of triggered advisories that are not relevant for the package.
458+
459+
To suppress the warning about an advisory,
460+
add the advisory identifier to the `ignored_advisories` list.
461+
For example:
462+
463+
```yaml
464+
name: myapp
465+
dependencies:
466+
foo: ^1.0.0
467+
ignored_advisories:
468+
- GHSA-4rgh-jx4f-qfcq
469+
```
470+
471+
For more information, check out
472+
[Security advisories](/tools/pub/security-advisories).
473+
452474
### SDK constraints
453475

454476
A package can indicate which versions of its dependencies it supports, but

src/content/tools/pub/security-advisories.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ If a security advisory is not relevant for your application,
4444
you can suppress the warning by adding the advisory identifier to
4545
the `ignored_advisories` list in the `pubspec.yaml` of your package.
4646
For example, the following ignores the advisory
47-
with the CVE identifier `GHSA-4rgh-jx4f-qfcq`:
47+
with the GHSA identifier `GHSA-4rgh-jx4f-qfcq`:
4848

4949
```yaml
5050
name: myapp
@@ -56,4 +56,4 @@ ignored_advisories:
5656
5757
The `ignored_advisories` list only affects the root package. Ignored
5858
advisories in your dependencies will have no effect on package resolution
59-
for your own packages.
59+
for your own package.

0 commit comments

Comments
 (0)