Skip to content

Commit

Permalink
Fix an unmodifiable map modification in the sass_api deploy (#1418)
Browse files Browse the repository at this point in the history
  • Loading branch information
nex3 committed Aug 3, 2021
1 parent 2a0b6d0 commit 667e9f4
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 5 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 1.37.3

* No user-visible changes.

## 1.37.2

* No user-visible changes.
Expand Down
2 changes: 1 addition & 1 deletion pkg/sass_api/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ environment:
sdk: '>=2.12.0 <3.0.0'

dependencies:
sass: 1.37.2
sass: 1.37.3

dependency_overrides:
sass: {path: ../..}
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: sass
version: 1.37.2
version: 1.37.3
description: A Sass implementation in Dart.
homepage: https://github.com/sass/dart-sass

Expand Down
6 changes: 3 additions & 3 deletions tool/grind/subpackages.dart
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,13 @@ Future<void> deploySubPackages() async {
var client = http.Client();
for (var package in Directory("pkg").listSync().map((dir) => dir.path)) {
var pubspecPath = "$package/pubspec.yaml";
var pubspec = Pubspec.parse(
File(pubspecPath).readAsStringSync(),
var pubspec = Pubspec.parse(File(pubspecPath).readAsStringSync(),
sourceUrl: p.toUri(pubspecPath));

// Remove the dependency override on `sass`, because otherwise it will block
// publishing.
var pubspecYaml = loadYaml(File(pubspecPath).readAsStringSync());
var pubspecYaml = Map<dynamic, dynamic>.of(
loadYaml(File(pubspecPath).readAsStringSync()) as YamlMap);
pubspecYaml.remove("dependency_overrides");
File(pubspecPath).writeAsStringSync(json.encode(pubspecYaml));

Expand Down

0 comments on commit 667e9f4

Please sign in to comment.