Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: sass/dart-sass
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 89dac15c030caf728f4760bfdea3f86c814338ed
Choose a base ref
...
head repository: sass/dart-sass
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: f3c7be5affba170655fd5190a2bf9f0c53c99f08
Choose a head ref
  • 11 commits
  • 65 files changed
  • 4 contributors

Commits on Nov 3, 2023

  1. Remove dead code (#2129)

    The key being removed could not exist in the map as it is not even the
    same type than keys.
    stof authored Nov 3, 2023
    Copy the full SHA
    54caf19 View commit details
  2. Write implementation documentation (#2042)

    Also rename Dispatcher to CompilationDispatcher for clarity
    nex3 authored Nov 3, 2023
    Copy the full SHA
    dd56d28 View commit details

Commits on Nov 13, 2023

  1. Copy the full SHA
    cd3b0cc View commit details

Commits on Dec 5, 2023

  1. Copy the full SHA
    13830a5 View commit details
  2. Copy the full SHA
    bd80c58 View commit details

Commits on Dec 8, 2023

  1. Copy the full SHA
    cd798bf View commit details
  2. Escape non-US-ASCII characters in SassException.toCssString() (#2143)

    Co-authored-by: Natalie Weizenbaum <nweiz@google.com>
    ntkme and nex3 authored Dec 8, 2023
    Copy the full SHA
    4daf0b4 View commit details

Commits on Dec 11, 2023

  1. Bump dartdoc from 7.0.2 to 8.0.2 (#2146)

    Bumps [dartdoc](https://github.com/dart-lang/dartdoc) from 7.0.2 to 8.0.2.
    - [Release notes](https://github.com/dart-lang/dartdoc/releases)
    - [Changelog](https://github.com/dart-lang/dartdoc/blob/main/CHANGELOG.md)
    - [Commits](dart-lang/dartdoc@v7.0.2...v8.0.2)
    
    ---
    updated-dependencies:
    - dependency-name: dartdoc
      dependency-type: direct:production
      update-type: version-update:semver-major
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored Dec 11, 2023
    Copy the full SHA
    f5dab76 View commit details
  2. Escape unprintable 0x7F (delete control character) (#2144)

    Co-authored-by: Natalie Weizenbaum <nweiz@google.com>
    ntkme and nex3 authored Dec 11, 2023
    Copy the full SHA
    6f665c1 View commit details

Commits on Dec 15, 2023

  1. Upload releases for musl-libc and android (#2149)

    Co-authored-by: Natalie Weizenbaum <nweiz@google.com>
    ntkme and nex3 authored Dec 15, 2023
    Copy the full SHA
    1fc740d View commit details

Commits on Dec 28, 2023

  1. Copy the full SHA
    f3c7be5 View commit details
Showing with 1,686 additions and 796 deletions.
  1. +1 −1 .github/util/initialize/action.yml
  2. +71 −0 .github/workflows/build-android.yml
  3. +89 −0 .github/workflows/build-linux-musl.yml
  4. +62 −0 .github/workflows/build-linux.yml
  5. +38 −0 .github/workflows/build-macos.yml
  6. +41 −0 .github/workflows/build-windows.yml
  7. +17 −637 .github/workflows/ci.yml
  8. +219 −0 .github/workflows/release.yml
  9. +72 −0 .github/workflows/test-vendor.yml
  10. +309 −0 .github/workflows/test.yml
  11. +20 −0 CHANGELOG.md
  12. +11 −0 CONTRIBUTING.md
  13. +1 −1 README.md
  14. +230 −0 lib/src/README.md
  15. +52 −0 lib/src/ast/css/README.md
  16. +34 −0 lib/src/ast/sass/README.md
  17. +2 −7 lib/src/ast/sass/statement/function_rule.dart
  18. +1 −1 lib/src/ast/sass/statement/if_rule.dart
  19. +2 −7 lib/src/ast/sass/statement/mixin_rule.dart
  20. +24 −0 lib/src/ast/selector/README.md
  21. +2 −3 lib/src/ast/selector/complex.dart
  22. +2 −4 lib/src/ast/selector/compound.dart
  23. +2 −4 lib/src/ast/selector/list.dart
  24. +1 −2 lib/src/ast/selector/parent.dart
  25. +1 −2 lib/src/ast/selector/simple.dart
  26. +1 −2 lib/src/ast/selector/universal.dart
  27. +1 −2 lib/src/configuration.dart
  28. +28 −0 lib/src/embedded/README.md
  29. +4 −4 lib/src/embedded/{dispatcher.dart → compilation_dispatcher.dart}
  30. +2 −2 lib/src/embedded/host_callable.dart
  31. +3 −3 lib/src/embedded/importer/base.dart
  32. +1 −2 lib/src/embedded/importer/file.dart
  33. +3 −5 lib/src/embedded/importer/host.dart
  34. +2 −2 lib/src/embedded/isolate_dispatcher.dart
  35. +3 −3 lib/src/embedded/logger.dart
  36. +2 −2 lib/src/embedded/protofier.dart
  37. +10 −15 lib/src/exception.dart
  38. +35 −0 lib/src/extend/README.md
  39. +0 −5 lib/src/extend/extension_store.dart
  40. +1 −0 lib/src/extend/functions.dart
  41. +24 −0 lib/src/functions/README.md
  42. +17 −0 lib/src/io/README.md
  43. +58 −0 lib/src/js/README.md
  44. +3 −1 lib/src/js/source_span.dart
  45. +33 −0 lib/src/parse/README.md
  46. +2 −6 lib/src/parse/at_root_query.dart
  47. +1 −3 lib/src/parse/css.dart
  48. +2 −6 lib/src/parse/keyframe_selector.dart
  49. +2 −6 lib/src/parse/media_query.dart
  50. +1 −3 lib/src/parse/sass.dart
  51. +1 −2 lib/src/parse/scss.dart
  52. +5 −9 lib/src/parse/selector.dart
  53. +1 −2 lib/src/parse/stylesheet.dart
  54. +13 −0 lib/src/value/README.md
  55. +2 −4 lib/src/value/argument_list.dart
  56. +1 −2 lib/src/value/number/unitless.dart
  57. +15 −0 lib/src/visitor/README.md
  58. +2 −1 lib/src/visitor/async_evaluate.dart
  59. +1 −1 lib/src/visitor/evaluate.dart
  60. +42 −23 lib/src/visitor/serialize.dart
  61. +4 −0 pkg/sass_api/CHANGELOG.md
  62. +2 −2 pkg/sass_api/pubspec.yaml
  63. +2 −2 pubspec.yaml
  64. +4 −4 test/embedded/function_test.dart
  65. +48 −3 test/output_test.dart
2 changes: 1 addition & 1 deletion .github/util/initialize/action.yml
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@ name: Initialize
description: Check out Dart Sass and build the embedded protocol buffer.
inputs:
github-token: {required: true}
node-version: {required: false, default: 18}
node-version: {required: false, default: 'lts/*'}
dart-sdk: {required: false, default: stable}
architecture: {required: false}
runs:
71 changes: 71 additions & 0 deletions .github/workflows/build-android.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
name: Build for android

on:
workflow_call:
workflow_dispatch:

jobs:
build:
name: Build

runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
include:
- arch: x64
lib: lib64
platform: linux/amd64
- arch: ia32
lib: lib
platform: linux/amd64
- arch: arm64
lib: lib64
platform: linux/arm64
- arch: arm
lib: lib
platform: linux/arm64

steps:
- uses: actions/checkout@v4

- name: Set up QEMU
uses: docker/setup-qemu-action@v3
with:
image: tonistiigi/binfmt:master # need qemu >= 7.0.0

- name: Compile Protobuf
run: |
docker run --rm -i \
--volume "$PWD:$PWD" \
--workdir "$PWD" \
docker.io/library/dart <<'EOF'
set -e
curl -fsSL -H "Authorization: Bearer ${{ github.token }}" "https://github.com/bufbuild/buf/releases/latest/download/buf-$(uname -s)-$(uname -m).tar.gz" | tar -xzC /usr/local --strip-components 1
dart pub get
dart run grinder protobuf
EOF
- name: Build
run: |
docker run --rm -i \
--platform ${{ matrix.platform }} \
--privileged \
--volume "$PWD:$PWD" \
--workdir "$PWD" \
ghcr.io/dart-android/dart <<'EOF'
set -e
export DART_SDK=/system/${{ matrix.lib }}/dart
export PATH=$DART_SDK/bin:$PATH
dart pub get
dart run grinder pkg-standalone-android-${{ matrix.arch }}
EOF
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: build-android-${{ matrix.arch }}
path: build/*.tar.gz
if-no-files-found: error
compression-level: 0
89 changes: 89 additions & 0 deletions .github/workflows/build-linux-musl.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
name: Build for linux-musl

on:
workflow_call:
workflow_dispatch:

jobs:
build:
name: Build

runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
include:
- arch: x64
platform: linux/amd64
- arch: ia32
platform: linux/386
- arch: arm64
platform: linux/arm64
- arch: arm
platform: linux/arm/v7

steps:
- uses: actions/checkout@v4

- name: Set up QEMU
uses: docker/setup-qemu-action@v3

- name: Compile Protobuf
run: |
docker run --rm -i \
--volume "$PWD:$PWD" \
--workdir "$PWD" \
docker.io/library/dart <<'EOF'
set -e
curl -fsSL -H "Authorization: Bearer ${{ github.token }}" "https://github.com/bufbuild/buf/releases/latest/download/buf-$(uname -s)-$(uname -m).tar.gz" | tar -xzC /usr/local --strip-components 1
dart pub get
dart run grinder protobuf
EOF
# https://gitlab.com/qemu-project/qemu/-/issues/1729
#
# There is a bug in qemu's mremap causing pthread_getattr_np in musl to stuck in a loop on arm.
# Unless qemu fixes the bug or we get a real linux-arm runner, we cannot build aot-snapshot
# for arm on CI. So, we create a kernel snapshot for arm build in amd64 container instead.
- name: Build
run: |
docker run --rm -i \
--platform ${{ matrix.arch == 'arm' && 'linux/amd64' || matrix.platform }} \
--volume "$PWD:$PWD" \
--workdir "$PWD" \
ghcr.io/dart-musl/dart <<'EOF'
set -e
dart pub get
dart run grinder pkg-standalone-linux-${{ matrix.arch }}
# Rename the artifact from -linux- to -linux-musl- to avoid conflict with glibc builds.
find build -name '*.tar.gz' -print0 | xargs -0 -n 1 -- sh -xc 'mv "$1" "$(echo "$1" | sed -e "s/linux/linux-musl/")"' --
EOF
# The kernel snapshot created for arm in the previous step is bundling a glibc based dart runtime
# due to how cli_pkg downloads the sdk for building non-native platforms. Therefore we need to
# replace it with musl-libc based dart runtime to create a working linux-musl-arm package.
- name: Fix Dart Runtime
if: matrix.arch == 'arm'
run: |
docker run --rm -i \
--platform ${{ matrix.platform }} \
--volume $PWD:$PWD \
--workdir $PWD \
ghcr.io/dart-musl/dart <<'EOF'
set -e
apk add --no-cache tar
cd build
DART_RUNTIME=$(tar -tzf *.tar.gz --wildcards "*/src/dart")
tar -xzf *.tar.gz
cp $DART_SDK/bin/dart $DART_RUNTIME
tar -czf *.tar.gz "$(dirname "$(dirname "$DART_RUNTIME")")"
EOF
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: build-linux-musl-${{ matrix.arch }}
path: build/*.tar.gz
if-no-files-found: error
compression-level: 0
62 changes: 62 additions & 0 deletions .github/workflows/build-linux.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: Build for linux

on:
workflow_call:
workflow_dispatch:

jobs:
build:
name: Build

runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
include:
- arch: x64
platform: linux/amd64
- arch: ia32
platform: linux/amd64
- arch: arm
platform: linux/arm/v7
- arch: arm64
platform: linux/arm64

steps:
- uses: actions/checkout@v4

- name: Set up QEMU
uses: docker/setup-qemu-action@v3

- name: Compile Protobuf
run: |
docker run --rm -i \
--volume "$PWD:$PWD" \
--workdir "$PWD" \
docker.io/library/dart <<'EOF'
set -e
curl -fsSL -H "Authorization: Bearer ${{ github.token }}" "https://github.com/bufbuild/buf/releases/latest/download/buf-$(uname -s)-$(uname -m).tar.gz" | tar -xzC /usr/local --strip-components 1
dart pub get
dart run grinder protobuf
EOF
- name: Build
run: |
docker run --rm -i \
--platform ${{ matrix.platform }} \
--volume "$PWD:$PWD" \
--workdir "$PWD" \
docker.io/library/dart:latest <<'EOF'
set -e
dart pub get
dart run grinder pkg-standalone-linux-${{ matrix.arch }}
EOF
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: build-linux-${{ matrix.arch }}
path: build/*.tar.gz
if-no-files-found: error
compression-level: 0
38 changes: 38 additions & 0 deletions .github/workflows/build-macos.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Build for macos

on:
workflow_call:
workflow_dispatch:

jobs:
build:
name: Build

runs-on: ${{ matrix.runner }}

strategy:
fail-fast: false
matrix:
include:
- arch: x64
runner: macos-latest
# https://github.blog/2023-10-02-introducing-the-new-apple-silicon-powered-m1-macos-larger-runner-for-github-actions/
- arch: arm64
runner: macos-latest-xlarge

steps:
- uses: actions/checkout@v4

- uses: ./.github/util/initialize
with: {github-token: "${{ github.token }}"}

- name: Build
run: dart run grinder pkg-standalone-macos-${{ matrix.arch }}

- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: build-macos-${{ matrix.arch }}
path: build/*.tar.gz
if-no-files-found: error
compression-level: 0
41 changes: 41 additions & 0 deletions .github/workflows/build-windows.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Build for windows

on:
workflow_call:
workflow_dispatch:

jobs:
build:
name: Build

runs-on: ${{ matrix.runner }}

strategy:
fail-fast: false
matrix:
include:
- arch: x64
runner: windows-latest
- arch: ia32
runner: windows-latest
# The support of windows-arm64 dart-sdk is in beta.
# TODO: Enable this once windows-arm64 support is stable.
# - arch: arm64
# runner: windows-latest

steps:
- uses: actions/checkout@v4

- uses: ./.github/util/initialize
with: {github-token: "${{ github.token }}"}

- name: Build
run: dart run grinder pkg-standalone-windows-${{ matrix.arch }}

- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: build-windows-${{ matrix.arch }}
path: build/*.zip
if-no-files-found: error
compression-level: 0
Loading