Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use a file: dependency for sass-parser -> sass #2340

Merged
merged 1 commit into from
Sep 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,11 @@ jobs:
version: 'lts/*'
check-latest: true
registry-url: 'https://registry.npmjs.org'

# The repo package has a file dependency, but the released version needs
# a real dependency on the released version of Sass.
- run: npm install sass@${{ steps.version.outputs.version }}

- run: npm publish
env:
NODE_AUTH_TOKEN: '${{ secrets.NPM_TOKEN }}'
Expand Down
11 changes: 7 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -344,12 +344,8 @@ jobs:

- run: dart run grinder pkg-npm-dev
env: {UPDATE_SASS_SASS_REPO: false}
- run: npm link
working-directory: build/npm
- run: npm install
working-directory: pkg/sass-parser/
- run: npm link sass
working-directory: pkg/sass-parser/
- name: Run tests
run: npm test
working-directory: pkg/sass-parser/
Expand All @@ -362,6 +358,13 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with: {node-version: 'lts/*'}
- uses: ./.github/util/initialize
with: {github-token: "${{ github.token }}"}

- run: dart run grinder pkg-npm-dev
env: {UPDATE_SASS_SASS_REPO: false}
- run: npm install
working-directory: build/npm/
- run: npm install
working-directory: pkg/sass-parser/
- name: Run static analysis
Expand Down
2 changes: 1 addition & 1 deletion pkg/sass-parser/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
},
"dependencies": {
"postcss": ">=8.4.41 <8.5.0",
"sass": "1.78.0"
"sass": "file:../../build/npm"
},
"devDependencies": {
"@types/jest": "^29.5.12",
Expand Down
8 changes: 0 additions & 8 deletions test/double_check_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -111,14 +111,6 @@ void main() {
() => expect(packageJson["version"].toString(),
matchesChangelogVersion(_changelogVersion("pkg/sass-parser"))));

test("depends on the current sass version", () {
if (_isDevVersion(sassPubspec.version!)) return;

var dependencies = packageJson["dependencies"] as Map<String, Object?>;
expect(
dependencies, containsPair("sass", sassPubspec.version.toString()));
});

test(
"increments along with the sass version",
() => _checkVersionIncrementsAlong('sass-parser', sassPubspec,
Expand Down