Skip to content

Commit d785fbb

Browse files
authored
Merge package:markdown (#1208)
- [x] Move and fix workflow files, labeler.yaml, and badges in the README.md - [x] Rev the version of the package, so that pub.dev points to the correct site - [x] Add a line to the changelog: ``` * Move to `dart-lang/tools` monorepo. ``` - [x] Add the package to the top-level readme of the monorepo: ``` | [markdown](pkgs/markdown/) | A portable Markdown library written in Dart that can parse Markdown into HTML. | [![pub package](https://img.shields.io/pub/v/markdown.svg)](https://pub.dev/packages/markdown) | ``` - [ ] **Important!** Merge the PR with 'Create a merge commit' (enabling then disabling the `Allow merge commits` admin setting) - [x] Update the auto-publishing settings on https://pub.dev/packages/markdown/admin - [x] Add the following text to https://github.com/dart-lang/markdown/:' ``` > [!IMPORTANT] > This repo has moved to https://github.com/dart-lang/tools/tree/main/pkgs/markdown ``` - [ ] Publish using the autopublish workflow - [ ] Push tags to GitHub using ```git tag --list 'markdown*' | xargs git push origin``` - [x] Close open PRs in dart-lang/markdown with the following message: ``` Closing as the [dart-lang/markdown](https://github.com/dart-lang/markdown) repository is merged into the [dart-lang/tools](https://github.com/dart-lang/tools) monorepo. Please re-open this PR there! ``` - [x] Transfer issues by running ```dart run pkgs/repo_manage/bin/report.dart transfer-issues --source-repo dart-lang/markdown --target-repo dart-lang/tools --add-label package:markdown --apply-changes``` - [ ] Archive https://github.com/dart-lang/markdown/ --- - [x] I’ve reviewed the contributor guide and applied the relevant portions to this PR. <details> <summary>Contribution guidelines:</summary><br> - See our [contributor guide](https://github.com/dart-lang/.github/blob/main/CONTRIBUTING.md) for general expectations for PRs. - Larger or significant changes should be discussed in an issue before creating a PR. - Contributions to our repos should follow the [Dart style guide](https://dart.dev/guides/language/effective-dart) and use `dart format`. - Most changes should add an entry to the changelog and may need to [rev the pubspec package version](https://github.com/dart-lang/sdk/blob/main/docs/External-Package-Maintenance.md#making-a-change). - Changes to packages require [corresponding tests](https://github.com/dart-lang/.github/blob/main/CONTRIBUTING.md#Testing). Note that many Dart repos have a weekly cadence for reviewing PRs - please allow for some latency before initial review feedback. </details>
2 parents 54b8998 + a8abbfb commit d785fbb

File tree

205 files changed

+46200
-1
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

205 files changed

+46200
-1
lines changed

.github/ISSUE_TEMPLATE/markdown.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
name: "package:markdown"
3+
about: "Create a bug or file a feature request against package:markdown."
4+
labels: "package:markdown"
5+
---

.github/labeler.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,10 @@
7272
- changed-files:
7373
- any-glob-to-any-file: 'pkgs/json_rpc_2/**'
7474

75+
'package:markdown':
76+
- changed-files:
77+
- any-glob-to-any-file: 'pkgs/markdown/**'
78+
7579
'package:mime':
7680
- changed-files:
7781
- any-glob-to-any-file: 'pkgs/mime/**'

.github/workflows/health.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@ jobs:
99
uses: dart-lang/ecosystem/.github/workflows/health.yaml@main
1010
with:
1111
ignore_coverage: "**.mock.dart,**.g.dart"
12-
ignore_license: "**.mock.dart,**.g.dart,**.mocks.dart"
12+
ignore_license: "**.mock.dart,**.g.dart,**.mocks.dart,pkgs/markdown/**"
1313
permissions:
1414
pull-requests: write

.github/workflows/markdown.yaml

Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
name: package:markdown
2+
3+
on:
4+
# Run on PRs and pushes to the default branch.
5+
push:
6+
branches: [ main ]
7+
paths:
8+
- '.github/workflows/markdown.yaml'
9+
- 'pkgs/markdown/**'
10+
pull_request:
11+
branches: [ main ]
12+
paths:
13+
- '.github/workflows/markdown.yaml'
14+
- 'pkgs/markdown/**'
15+
schedule:
16+
- cron: "0 0 * * 0"
17+
18+
env:
19+
PUB_ENVIRONMENT: bot.github
20+
21+
22+
defaults:
23+
run:
24+
working-directory: pkgs/markdown/
25+
26+
27+
jobs:
28+
# Check code formatting and static analysis on a single OS (linux)
29+
# against Dart dev.
30+
analyze:
31+
runs-on: ubuntu-latest
32+
strategy:
33+
fail-fast: false
34+
matrix:
35+
sdk: [dev]
36+
steps:
37+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
38+
- uses: dart-lang/setup-dart@e630b99d28a3b71860378cafdc2a067c71107f94
39+
with:
40+
sdk: ${{ matrix.sdk }}
41+
- id: install
42+
name: Install dependencies
43+
run: dart pub get
44+
- name: Check formatting
45+
run: dart format --output=none --set-exit-if-changed .
46+
if: always() && steps.install.outcome == 'success'
47+
- name: Analyze code
48+
run: dart analyze --fatal-infos
49+
if: always() && steps.install.outcome == 'success'
50+
51+
# Run tests on a matrix consisting of two dimensions:
52+
# 1. OS: ubuntu-latest, (macos-latest, windows-latest)
53+
# 2. release channel: dev
54+
test:
55+
needs: analyze
56+
runs-on: ${{ matrix.os }}
57+
strategy:
58+
fail-fast: false
59+
matrix:
60+
# Add macos-latest and/or windows-latest if relevant for this package.
61+
os: [ubuntu-latest]
62+
sdk: [3.2, dev]
63+
steps:
64+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
65+
- uses: dart-lang/setup-dart@e630b99d28a3b71860378cafdc2a067c71107f94
66+
with:
67+
sdk: ${{ matrix.sdk }}
68+
- id: install
69+
name: Install dependencies
70+
run: dart pub get
71+
- name: Run VM tests
72+
run: dart test --platform vm
73+
if: always() && steps.install.outcome == 'success'
74+
75+
coverage:
76+
needs: test
77+
runs-on: ubuntu-latest
78+
steps:
79+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
80+
- uses: dart-lang/setup-dart@e630b99d28a3b71860378cafdc2a067c71107f94
81+
with:
82+
sdk: dev
83+
- name: Install dependencies
84+
run: dart pub get
85+
- name: Install coverage
86+
run: dart pub global activate coverage
87+
- name: Collect and report coverage
88+
run: dart pub global run coverage:test_with_coverage
89+
- name: Upload coverage
90+
uses: coverallsapp/github-action@master
91+
with:
92+
github-token: ${{ secrets.GITHUB_TOKEN }}
93+
path-to-lcov: pkgs/markdown/coverage/lcov.info
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Run against all markdown files in latest version of packages on pub.dev to
2+
# see if any can provoke a crash
3+
4+
name: package:markdown: crash tests
5+
6+
on:
7+
schedule:
8+
# “At 00:00 (UTC) on Sunday.”
9+
- cron: '0 0 * * 0'
10+
11+
defaults:
12+
run:
13+
working-directory: pkgs/markdown/
14+
15+
jobs:
16+
crash-test:
17+
runs-on: ubuntu-latest
18+
steps:
19+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
20+
21+
- uses: dart-lang/setup-dart@e630b99d28a3b71860378cafdc2a067c71107f94
22+
23+
- name: Install dependencies
24+
run: dart pub get
25+
26+
- name: Run crash_test.dart
27+
run: dart test -P crash_test test/crash_test.dart
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
# Run a smoke test against package:flutter_markdown.
2+
3+
name: package:markdown: flutter
4+
5+
on:
6+
# Run on PRs and pushes to the default branch.
7+
push:
8+
branches: [ main ]
9+
paths:
10+
- '.github/workflows/markdown_flutter.yaml'
11+
- 'pkgs/markdown/**'
12+
pull_request:
13+
branches: [ main ]
14+
paths:
15+
- '.github/workflows/markdown_flutter.yaml'
16+
- 'pkgs/markdown/**'
17+
schedule:
18+
- cron: "0 0 * * 0"
19+
20+
env:
21+
PUB_ENVIRONMENT: bot.github
22+
23+
jobs:
24+
smoke-test:
25+
runs-on: ubuntu-latest
26+
27+
steps:
28+
- name: clone dart-lang/tools
29+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
30+
with:
31+
repository: dart-lang/tools
32+
path: tools_repo
33+
34+
- name: clone flutter/packages
35+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
36+
with:
37+
repository: flutter/packages
38+
path: flutter_packages
39+
40+
# Install the Flutter SDK using the subosito/flutter-action GitHub action.
41+
- name: install the flutter sdk
42+
uses: subosito/flutter-action@74af56c5ed2697ba4621264652728e8d217e53d3
43+
with:
44+
channel: beta
45+
46+
- name: flutter --version
47+
run: flutter --version
48+
49+
- name: create pubspec_overrides.yaml
50+
working-directory: flutter_packages/packages/flutter_markdown
51+
run: |
52+
echo "dependency_overrides:" > pubspec_overrides.yaml
53+
echo " markdown:" >> pubspec_overrides.yaml
54+
echo " path: ../../../tools_repo/pkgs/markdown" >> pubspec_overrides.yaml
55+
56+
- name: flutter pub get
57+
working-directory: flutter_packages/packages/flutter_markdown
58+
run: flutter pub get
59+
60+
- name: flutter analyze package:flutter_markdown
61+
working-directory: flutter_packages/packages/flutter_markdown
62+
run: flutter analyze
63+
64+
- name: flutter test package:flutter_markdown
65+
working-directory: flutter_packages/packages/flutter_markdown
66+
run: flutter test

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ don't naturally belong to other topic monorepos (like
3131
| [html](pkgs/html/) | APIs for parsing and manipulating HTML content outside the browser. | [![package issues](https://img.shields.io/badge/package:html-4774bc)](https://github.com/dart-lang/tools/issues?q=is%3Aissue+is%3Aopen+label%3Apackage%3Ahtml) | [![pub package](https://img.shields.io/pub/v/html.svg)](https://pub.dev/packages/html) |
3232
| [io](pkgs/io/) | Utilities for the Dart VM Runtime including support for ANSI colors, file copying, and standard exit code values. | [![pub package](https://img.shields.io/pub/v/io.svg)](https://pub.dev/packages/io) |
3333
| [json_rpc_2](pkgs/json_rpc_2/) | Utilities to write a client or server using the JSON-RPC 2.0 spec. | [![package issues](https://img.shields.io/badge/package:json_rpc_2-4774bc)](https://github.com/dart-lang/tools/issues?q=is%3Aissue+is%3Aopen+label%3Apackage%3Ajson_rpc_2) | [![pub package](https://img.shields.io/pub/v/json_rpc_2.svg)](https://pub.dev/packages/json_rpc_2) |
34+
| [markdown](pkgs/markdown/) | A portable Markdown library written in Dart that can parse Markdown into HTML. | [![pub package](https://img.shields.io/pub/v/markdown.svg)](https://pub.dev/packages/markdown) |
3435
| [mime](pkgs/mime/) | Utilities for handling media (MIME) types, including determining a type from a file extension and file contents. | [![package issues](https://img.shields.io/badge/package:mime-4774bc)](https://github.com/dart-lang/tools/issues?q=is%3Aissue+is%3Aopen+label%3Apackage%3Amime) | [![pub package](https://img.shields.io/pub/v/mime.svg)](https://pub.dev/packages/mime) |
3536
| [oauth2](pkgs/oauth2/) | A client library for authenticating with a remote service via OAuth2 on behalf of a user, and making authorized HTTP requests with the user's OAuth2 credentials. | [![package issues](https://img.shields.io/badge/package:oauth2-4774bc)](https://github.com/dart-lang/tools/issues?q=is%3Aissue+is%3Aopen+label%3Apackage%3Aoauth2) | [![pub package](https://img.shields.io/pub/v/oauth2.svg)](https://pub.dev/packages/oauth2) |
3637
| [package_config](pkgs/package_config/) | Support for reading and writing Dart Package Configuration files. | [![package issues](https://img.shields.io/badge/package:package_config-4774bc)](https://github.com/dart-lang/tools/issues?q=is%3Aissue+is%3Aopen+label%3Apackage%3Apackage_config) | [![pub package](https://img.shields.io/pub/v/package_config.svg)](https://pub.dev/packages/package_config) |

pkgs/markdown/.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
.dart_tool
2+
.packages
3+
.pub
4+
pubspec.lock
5+
doc/

pkgs/markdown/AUTHORS

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Below is a list of people and organizations that have contributed
2+
# to the Dart project. Names should be added to the list like so:
3+
#
4+
# Name/Organization <email address>
5+
6+
Google Inc.
7+
8+
David Peek <[email protected]>
9+
Daniel Schubert <[email protected]>
10+
Jirka Daněk <[email protected]>
11+
Seth Westphal <[email protected]>
12+
Tim Maffett <[email protected]>
13+

0 commit comments

Comments
 (0)