Skip to content

Commit 4888878

Browse files
Preps for release 1.1.0
1 parent 2cc8929 commit 4888878

File tree

3 files changed

+15
-21
lines changed

3 files changed

+15
-21
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
## [1.1.0] - 2020-03-23
2+
* Support for command-line executables provided by the package
3+
* PubspecYaml instances can be created from YAML using string extension method
4+
* This version requires Dart 2.7
5+
* Major refactoring to improve maintainability
6+
17
## [1.0.0+1] - 2019-12-22
28
* README.md correction
39

README.md

Lines changed: 8 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -20,38 +20,26 @@ The following fields are supported:
2020

2121
Other fields are accessible via PubspecYaml.customFields as a JSON structure (Map<String, dynamic>).
2222

23-
## YAML Import / Export
23+
## YAML Import
2424

25-
PubspecYaml provides two methods to serialize pubspec.yaml content:
25+
PubspecYaml provides two methods to import pubspec.yaml content:
2626
* The factory method PubspecYaml.loadFromYamlString() creates an object from a string with pubspec.yaml content
27-
* PubspecYaml.toYamlString() produces pubspec.yaml content that can be written to a file
27+
* String extension method toPubspecYaml()
2828

29-
## Data Manipulation
30-
31-
PubspecYaml uses functional_data extensions to enable equality operations and lenses (https://pub.dev/packages/functional_data).
29+
## YAML Export
3230

33-
## Usage
31+
PubspecYaml.toYamlString() produces pubspec.yaml content that can be written to a file
3432

35-
To use pubspec_yaml, add the following dependency to pubspec.yaml:
33+
## Data Manipulation
3634

37-
```
38-
dependencies:
39-
pubspec_yaml: ^1.0.0
40-
```
35+
PubspecYaml uses functional_data extensions to enable equality operations and lenses (https://pub.dev/packages/functional_data).
4136

4237
## Example
4338

4439
The following Dart script checks whether production dependencies have overrides:
4540
```
46-
import 'dart:io';
47-
48-
import 'package:pubspec_yaml/pubspec_yaml.dart';
49-
50-
// ignore_for_file: avoid_print
51-
5241
void main() {
53-
final pubspecYamlContent = File('pubspec.yaml').readAsStringSync();
54-
final pubspecYaml = PubspecYaml.loadFromYamlString(pubspecYamlContent);
42+
final pubspecYaml = File('pubspec.yaml').readAsStringSync().toPubspecYaml();
5543
5644
final productionOverrides = pubspecYaml.dependencyOverrides.where(
5745
(override) => pubspecYaml.dependencies.any((

pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: pubspec_yaml
22
description: Dart library to access and manipulate content of pubpec.yaml files
3-
version: 1.0.0+1
3+
version: 1.1.0
44
homepage: https://github.com/alexei-sintotski/pubspec_yaml
55

66
environment:

0 commit comments

Comments
 (0)