Skip to content

Commit

Permalink
Allow PRs to be linked to sass/sass PRs
Browse files Browse the repository at this point in the history
  • Loading branch information
nex3 committed Oct 6, 2021
1 parent 4379462 commit 2d56fe0
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 66 deletions.
21 changes: 9 additions & 12 deletions .github/workflows/ci.yml
Expand Up @@ -36,12 +36,9 @@ jobs:
- uses: dart-lang/setup-dart@v1
with: {sdk: "${{ matrix.dart_channel }}"}
- run: dart pub get
- name: Set up sass-spec
run: tool/github-action/check-out-sass-spec.sh
env:
PR_BRANCH: "${{ github.base_ref }}"
CURRENT_REF: "${{ github.ref }}"
PR_BODY: "${{ github.event.pull_request.body }}"
- name: Check out sass-spec
uses: sass/clone-linked-repo@v1
with: {repo: sass/sass-spec}
- uses: actions/setup-node@v2
with: {node-version: "${{ env.DEFAULT_NODE_VERSION }}"}
- run: npm install
Expand Down Expand Up @@ -86,11 +83,8 @@ jobs:
- run: npm install

- name: Check out sass-spec
run: tool/github-action/check-out-sass-spec.sh
env:
PR_BRANCH: "${{ github.base_ref }}"
CURRENT_REF: "${{ github.ref }}"
PR_BODY: "${{ github.event.pull_request.body }}"
uses: sass/clone-linked-repo@v1
with: {repo: sass/sass-spec}

- name: Build JS
run: dart pub run grinder pkg-npm-dev
Expand All @@ -100,7 +94,10 @@ jobs:
working-directory: sass-spec

- name: Check out Sass specification
run: git clone https://github.com/sass/sass.git language --depth 1
uses: sass/clone-linked-repo@v1
with:
repo: sass/sass
path: language

- name: Run tests
run: npm run js-api-spec -- --sassSassRepo ../language
Expand Down
4 changes: 1 addition & 3 deletions lib/src/importer/node_to_dart/async_file.dart
Expand Up @@ -47,9 +47,7 @@ class NodeToDartAsyncFileImporter extends AsyncImporter {
'"$url".'));
}

var canonical = _filesystemImporter.canonicalize(resultUrl);
if (canonical == null) return null;
return canonical;
return _filesystemImporter.canonicalize(resultUrl);
}

ImporterResult? load(Uri url) => _filesystemImporter.load(url);
Expand Down
6 changes: 2 additions & 4 deletions lib/src/importer/node_to_dart/file.dart
Expand Up @@ -35,7 +35,7 @@ class NodeToDartFileImporter extends Importer {

if (isPromise(result)) {
jsThrow(JsError(
"The canonicalize() function can't return a Promise for synchronous "
"The findFileUrl() function can't return a Promise for synchron "
"compile functions."));
} else if (!isJSUrl(result)) {
jsThrow(JsError("The findFileUrl() method must return a URL."));
Expand All @@ -48,9 +48,7 @@ class NodeToDartFileImporter extends Importer {
'"$url".'));
}

var canonical = _filesystemImporter.canonicalize(resultUrl);
if (canonical == null) return null;
return canonical;
return _filesystemImporter.canonicalize(resultUrl);
}

ImporterResult? load(Uri url) => _filesystemImporter.load(url);
Expand Down
47 changes: 0 additions & 47 deletions tool/github-action/check-out-sass-spec.sh

This file was deleted.

0 comments on commit 2d56fe0

Please sign in to comment.