Skip to content

Commit

Permalink
fix: var mutation which exluded array elements (#20)
Browse files Browse the repository at this point in the history
  • Loading branch information
felangel authored Jan 7, 2021
1 parent f777697 commit e8c9ac7
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# 0.0.1-dev.22

- fix: issue with variable mutation which excluded variables within arrays

# 0.0.1-dev.21

- feat: export `MasonGenerator` and relevant objects to allow `mason` to be consumed as a library
Expand Down
2 changes: 1 addition & 1 deletion lib/src/generator.dart
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ abstract class Generator implements Comparable<Generator> {
fileCount++;
}

final resultFiles = file.runSubstitution(vars ?? <String, dynamic>{});
final resultFiles = file.runSubstitution(Map<String, dynamic>.of(vars));
for (final file in resultFiles) {
await target.createFile(file.path, file.content);
fileCount++;
Expand Down
2 changes: 1 addition & 1 deletion lib/src/version.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: mason
description: >
A Dart template generator which helps teams generate files quickly and consistently.
version: 0.0.1-dev.21
version: 0.0.1-dev.22
homepage: https://github.com/felangel/mason

environment:
Expand Down

0 comments on commit e8c9ac7

Please sign in to comment.