Fix an unmodifiable map modification in the sass_api deploy (#1418)

This commit is contained in:
Natalie Weizenbaum 2021-08-03 20:33:54 +00:00 committed by GitHub
parent 2a0b6d05ef
commit 667e9f40e6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 9 additions and 5 deletions

View File

@ -1,3 +1,7 @@
## 1.37.3
* No user-visible changes.
## 1.37.2
* No user-visible changes.

View File

@ -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: ../..}

View File

@ -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

View File

@ -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));