Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/dart-lang/csslib
Browse files Browse the repository at this point in the history
# Conflicts:
#	.github/dependabot.yml
#	.github/workflows/test-package.yml
#	pubspec.yaml
  • Loading branch information
ik-make committed Feb 7, 2024
2 parents 467d820 + 62ae85e commit 009c0ca
Show file tree
Hide file tree
Showing 34 changed files with 833 additions and 678 deletions.
11 changes: 11 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Dependabot configuration file.
# See https://docs.github.com/en/code-security/dependabot/dependabot-version-updates
version: 2

updates:
- package-ecosystem: github-actions
directory: /
schedule:
interval: monthly
labels:
- autosubmit
37 changes: 37 additions & 0 deletions .github/workflows/no-response.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# A workflow to close issues where the author hasn't responded to a request for
# more information; see https://github.com/actions/stale.

name: No Response

# Run as a daily cron.
on:
schedule:
# Every day at 8am
- cron: '0 8 * * *'

# All permissions not specified are set to 'none'.
permissions:
issues: write
pull-requests: write

jobs:
no-response:
runs-on: ubuntu-latest
if: ${{ github.repository_owner == 'dart-lang' }}
steps:
- uses: actions/stale@28ca1036281a5e5922ead5184a1bbf96e5fc984e
with:
# Don't automatically mark inactive issues+PRs as stale.
days-before-stale: -1
# Close needs-info issues and PRs after 14 days of inactivity.
days-before-close: 14
stale-issue-label: "needs-info"
close-issue-message: >
Without additional information we're not able to resolve this issue.
Feel free to add more info or respond to any questions above and we
can reopen the case. Thanks for your contribution!
stale-pr-label: "needs-info"
close-pr-message: >
Without additional information we're not able to resolve this PR.
Feel free to add more info or respond to any questions above.
Thanks for your contribution!
17 changes: 17 additions & 0 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# A CI configuration to auto-publish pub packages.

name: Publish

on:
pull_request:
branches: [ main ]
push:
tags: [ 'v[0-9]+.[0-9]+.[0-9]+' ]

jobs:
publish:
if: ${{ github.repository_owner == 'dart-lang' }}
uses: dart-lang/ecosystem/.github/workflows/publish.yaml@main
permissions:
id-token: write # Required for authentication using OIDC
pull-requests: write # Required for writing the pull request note
61 changes: 61 additions & 0 deletions .github/workflows/test-package.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: Dart CI

on:
# Run on PRs and pushes to the default branch.
push:
branches: [ main ]
pull_request:
branches: [ main ]
schedule:
- cron: "0 0 * * 0"

env:
PUB_ENVIRONMENT: bot.github

jobs:
# Check code formatting and static analysis on a single OS (linux)
# against Dart dev.
analyze:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
sdk: [dev]
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
- uses: dart-lang/setup-dart@fedb1266e91cf51be2fdb382869461a434b920a3
with:
sdk: ${{ matrix.sdk }}
- id: install
name: Install dependencies
run: dart pub get
- name: Check formatting
run: dart format --output=none --set-exit-if-changed .
if: always() && steps.install.outcome == 'success'
- name: Analyze code
run: dart analyze --fatal-infos
if: always() && steps.install.outcome == 'success'

# Run tests on a matrix consisting of two dimensions:
# 1. OS: ubuntu-latest, (macos-latest, windows-latest)
# 2. release channel: dev
test:
needs: analyze
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
# Add macos-latest and/or windows-latest if relevant for this package.
os: [ubuntu-latest, windows-latest]
sdk: [3.0, dev]
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
- uses: dart-lang/setup-dart@fedb1266e91cf51be2fdb382869461a434b920a3
with:
sdk: ${{ matrix.sdk }}
- id: install
name: Install dependencies
run: dart pub get
- name: Run VM tests
run: dart test --platform vm
if: always() && steps.install.outcome == 'success'
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.dart_tool
.packages
pubspec.lock
doc/api/
15 changes: 13 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,22 @@
## 0.17.3-dev
## 1.0.1-wip

- Require Dart 3.0

## 1.0.0

- Rev to `1.0.0` (note however that there are no API changes from `0.17.x`).

## 0.17.3

- Add markdown badges to the readme.
- Adopted `package:dart_flutter_team_lints` linting rules.
- Addressed an issue parsing font names not surrounded by quotes.
- Fixed the reported span for `Expression` nodes.
- Fixed a regression parsing declaration values containing spaces.
- Add support for `lh` and `rlh` units.
- Refactor the package example.
- Addressed an issue with the indent level of the `CssPrinter` output.
- Require Dart 2.19.

## 0.17.2

Expand Down Expand Up @@ -186,7 +197,7 @@

## 0.12.0+1

* Allow the lastest version of `logging` package.
* Allow the latest version of `logging` package.

## 0.12.0

Expand Down
6 changes: 6 additions & 0 deletions analysis_options.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,9 @@ analyzer:
strict-casts: true
strict-inference: true
strict-raw-types: true
errors:
comment_references: ignore #too many false positives

linter:
rules:
- prefer_expression_function_bodies
5 changes: 2 additions & 3 deletions example/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,8 @@ StyleSheet parseCss(
String cssInput, {
List<css.Message>? errors,
css.PreprocessorOptions? opts,
}) {
return css.parse(cssInput, errors: errors, options: opts ?? _default);
}
}) =>
css.parse(cssInput, errors: errors, options: opts ?? _default);

/// Pretty printer for CSS.
String prettyPrint(StyleSheet ss) =>
Expand Down
Loading

0 comments on commit 009c0ca

Please sign in to comment.