commit-and-tag-version 12.1.0 → 12.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -2,6 +2,25 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. See [commit-and-tag-version](https://github.com/absolute-version/commit-and-tag-version) for commit guidelines.
4
4
 
5
+ ## [12.3.0](https://github.com/absolute-version/commit-and-tag-version/compare/v12.2.0...v12.3.0) (2024-04-19)
6
+
7
+
8
+ ### Features
9
+
10
+ * **updater:** add YAML support ([#137](https://github.com/absolute-version/commit-and-tag-version/issues/137)) ([b9dccc2](https://github.com/absolute-version/commit-and-tag-version/commit/b9dccc23ec05e4026899c676f3275d4dedf8c686))
11
+
12
+
13
+ ### Bug Fixes
14
+
15
+ * Add debug messages for exclusions during bump lifecycle ([#131](https://github.com/absolute-version/commit-and-tag-version/issues/131)) ([a9191f2](https://github.com/absolute-version/commit-and-tag-version/commit/a9191f293eb9302afb1093ad37e9fa076f6b37a2))
16
+
17
+ ## [12.2.0](https://github.com/absolute-version/commit-and-tag-version/compare/v12.1.0...v12.2.0) (2024-01-15)
18
+
19
+
20
+ ### Features
21
+
22
+ * **updater:** add maven pom.xml file support ([#33](https://github.com/absolute-version/commit-and-tag-version/issues/33), [#109](https://github.com/absolute-version/commit-and-tag-version/issues/109)) ([#123](https://github.com/absolute-version/commit-and-tag-version/issues/123)) ([6466beb](https://github.com/absolute-version/commit-and-tag-version/commit/6466bebf849bbdcdaebf493a1ccce9670c469fde))
23
+
5
24
  ## [12.1.0](https://github.com/absolute-version/commit-and-tag-version/compare/v12.0.0...v12.1.0) (2024-01-06)
6
25
 
7
26
 
package/README.md CHANGED
@@ -6,7 +6,6 @@
6
6
 
7
7
  > **`Why was it renamed commit-and-tag-version?`**. I didn't want to scope the package or name it `standard-version-fork`, and it was a good opportunity to make the purpose of the tool clearer. I also wanted to distinguish it from the other tool in this organisation, [`absolute-version`](https://github.com/absolute-version/absolute-version-js), which just prints version information for pre-releases.
8
8
 
9
-
10
9
  A utility for versioning using [semver](https://semver.org/) and CHANGELOG generation powered by [Conventional Commits](https://conventionalcommits.org).
11
10
 
12
11
  ![ci](https://github.com/absolute-version/commit-and-tag-version/workflows/ci/badge.svg)
@@ -20,6 +19,7 @@ _Having problems? Want to contribute? Join us on the [node-tooling community Sla
20
19
  - [Commit and Tag Version](#commit-and-tag-version)
21
20
  - [How It Works:](#how-it-works)
22
21
  - [`bumpFiles`, `packageFiles` and `updaters`](#bumpfiles-packagefiles-and-updaters)
22
+ - [Maven Support (Java/Kotlin)](#maven-support-javakotlin)
23
23
  - [Gradle Support (Java/Kotlin)](#gradle-support-javakotlin)
24
24
  - [.NET Support](#net-support)
25
25
  - [Installing `commit-and-tag-version`](#installing-commit-and-tag-version)
@@ -55,7 +55,7 @@ _Having problems? Want to contribute? Join us on the [node-tooling community Sla
55
55
  - [License](#license)
56
56
 
57
57
 
58
- ### How It Works:
58
+ ### How It Works
59
59
 
60
60
  1. Follow the [Conventional Commits Specification](https://conventionalcommits.org) in your repository.
61
61
  2. When you're ready to release, run `commit-and-tag-version`.
@@ -83,6 +83,14 @@ By default, `commit-and-tag-version` assumes you're working in a NodeJS based pr
83
83
 
84
84
  That said, if you find your self asking [How can I use commit-and-tag-version for additional metadata files, languages or version files?](#can-i-use-commit-and-tag-version-for-additional-metadata-files-languages-or-version-files) – these configuration options will help!
85
85
 
86
+ ### Maven Support (Java/Kotlin)
87
+
88
+ If you are using Maven, then just point to your `pom.xml` file.
89
+
90
+ ```sh
91
+ commit-and-tag-version --packageFiles pom.xml --bumpFiles pom.xml
92
+ ```
93
+
86
94
  ### Gradle Support (Java/Kotlin)
87
95
 
88
96
  If you are using Gradle, then just point to your `build.gradle` file (or `build.gradle.kts` if using Kotlin DSL).
@@ -95,10 +103,20 @@ commit-and-tag-version --packageFiles build.gradle --bumpFiles build.gradle
95
103
 
96
104
  If you are using .NET with `.csproj` files.
97
105
  This is going to read and update only the `<Version>` tag in the file.
106
+
98
107
  ```sh
99
108
  commit-and-tag-version --packageFiles <YOUR-PROJECT-NAME>.csproj --bumpFiles <YOUR-PROJECT-NAME>.csproj
100
109
  ```
101
110
 
111
+ ### YAML Support
112
+
113
+ If you are using YAML files.
114
+ This is going to read and update only the `version:` tag in the file.
115
+
116
+ ```sh
117
+ commit-and-tag-version --packageFiles file.yaml --bumpFiles file.yaml
118
+ ```
119
+
102
120
  ## Installing `commit-and-tag-version`
103
121
 
104
122
  ### As a local `npm run` script
@@ -148,7 +166,7 @@ You can configure `commit-and-tag-version` either by:
148
166
  1. Placing a `commit-and-tag-version` stanza in your `package.json` (assuming
149
167
  your project is JavaScript).
150
168
 
151
- > Note for users who have migrated to
169
+ > Note for users who have migrated to
152
170
  `commit-and-tag-version` from `standard-version`: the previous package.json configuration key of `standard-version` will still work.
153
171
 
154
172
  2. Creating a `.versionrc`, `.versionrc.json` or `.versionrc.js`.
@@ -312,7 +330,7 @@ Simply add the following to your package.json to configure lifecycle scripts:
312
330
  ```
313
331
 
314
332
  As an example to change from using GitHub to track your items to using your projects Jira use a
315
- `postchangelog` script to replace the url fragment containing 'https://github.com/`myproject`/issues/'
333
+ `postchangelog` script to replace the url fragment containing '<https://github.com/`myproject`/issues/>'
316
334
  with a link to your Jira - assuming you have already installed [replace](https://www.npmjs.com/package/replace)
317
335
 
318
336
  ```json
@@ -222,10 +222,20 @@ function updateConfigs(args, newVersion) {
222
222
  }
223
223
  const configPath = path.resolve(process.cwd(), updater.filename);
224
224
  try {
225
- if (dotgit.ignore(updater.filename)) return;
225
+ if (dotgit.ignore(updater.filename)) {
226
+ console.debug(
227
+ `Not updating file '${updater.filename}', as it is ignored in Git`,
228
+ );
229
+ return;
230
+ }
226
231
  const stat = fs.lstatSync(configPath);
227
232
 
228
- if (!stat.isFile()) return;
233
+ if (!stat.isFile()) {
234
+ console.debug(
235
+ `Not updating '${updater.filename}', as it is not a file`,
236
+ );
237
+ return;
238
+ }
229
239
  const contents = fs.readFileSync(configPath, 'utf8');
230
240
  const newContents = updater.updater.writeVersion(contents, newVersion);
231
241
  const realNewVersion = updater.updater.readVersion(newContents);
@@ -3,8 +3,10 @@ const JSON_BUMP_FILES = require('../../defaults').bumpFiles;
3
3
  const updatersByType = {
4
4
  json: require('./types/json'),
5
5
  'plain-text': require('./types/plain-text'),
6
+ maven: require('./types/maven'),
6
7
  gradle: require('./types/gradle'),
7
8
  csproj: require('./types/csproj'),
9
+ yaml: require('./types/yaml'),
8
10
  };
9
11
  const PLAIN_TEXT_BUMP_FILES = ['VERSION.txt', 'version.txt'];
10
12
 
@@ -23,12 +25,18 @@ function getUpdaterByFilename(filename) {
23
25
  if (PLAIN_TEXT_BUMP_FILES.includes(filename)) {
24
26
  return getUpdaterByType('plain-text');
25
27
  }
28
+ if (/pom.xml/.test(filename)) {
29
+ return getUpdaterByType('maven');
30
+ }
26
31
  if (/build.gradle/.test(filename)) {
27
32
  return getUpdaterByType('gradle');
28
33
  }
29
34
  if (filename.endsWith('.csproj')) {
30
35
  return getUpdaterByType('csproj');
31
36
  }
37
+ if (/\.ya?ml$/.test(filename)) {
38
+ return getUpdaterByType('yaml');
39
+ }
32
40
  throw Error(
33
41
  `Unsupported file (${filename}) provided for bumping.\n Please specify the updater \`type\` or use a custom \`updater\`.`,
34
42
  );
@@ -0,0 +1,44 @@
1
+ const jsdom = require('jsdom');
2
+ const serialize = require('w3c-xmlserializer');
3
+ const detectNewline = require('detect-newline');
4
+ const CRLF = '\r\n';
5
+ const LF = '\n';
6
+
7
+ function pomDocument(contents) {
8
+ const dom = new jsdom.JSDOM('');
9
+ const parser = new dom.window.DOMParser();
10
+ return parser.parseFromString(contents, 'application/xml');
11
+ }
12
+
13
+ function pomVersionElement(document) {
14
+ const versionElement = document.querySelector('project > version');
15
+
16
+ if (!versionElement) {
17
+ throw new Error(
18
+ 'Failed to read the version field in your pom file - is it present?',
19
+ );
20
+ }
21
+
22
+ return versionElement;
23
+ }
24
+
25
+ module.exports.readVersion = function (contents) {
26
+ const document = pomDocument(contents);
27
+ return pomVersionElement(document).textContent;
28
+ };
29
+
30
+ module.exports.writeVersion = function (contents, version) {
31
+ const newline = detectNewline(contents);
32
+ const document = pomDocument(contents);
33
+ const versionElement = pomVersionElement(document);
34
+
35
+ versionElement.textContent = version;
36
+
37
+ const xml = serialize(document);
38
+
39
+ if (newline === CRLF) {
40
+ return xml.replace(/\n/g, CRLF) + CRLF;
41
+ }
42
+
43
+ return xml + LF;
44
+ };
@@ -0,0 +1,15 @@
1
+ const yaml = require('yaml');
2
+ const detectNewline = require('detect-newline');
3
+
4
+ module.exports.readVersion = function (contents) {
5
+ return yaml.parse(contents).version;
6
+ };
7
+
8
+ module.exports.writeVersion = function (contents, version) {
9
+ const newline = detectNewline(contents);
10
+ const document = yaml.parseDocument(contents);
11
+
12
+ document.set('version', version);
13
+
14
+ return document.toString().replace(/\r?\n/g, newline);
15
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "commit-and-tag-version",
3
- "version": "12.1.0",
3
+ "version": "12.3.0",
4
4
  "description": "replacement for `npm version` with automatic CHANGELOG generation",
5
5
  "bin": "bin/cli.js",
6
6
  "scripts": {
@@ -49,7 +49,10 @@
49
49
  "figures": "^3.1.0",
50
50
  "find-up": "^5.0.0",
51
51
  "git-semver-tags": "^5.0.0",
52
+ "jsdom": "^23.2.0",
52
53
  "semver": "^7.5.4",
54
+ "w3c-xmlserializer": "^5.0.0",
55
+ "yaml": "^2.4.1",
53
56
  "yargs": "^17.7.2"
54
57
  },
55
58
  "devDependencies": {
package/test/core.spec.js CHANGED
@@ -1180,29 +1180,97 @@ describe('cli', function () {
1180
1180
  });
1181
1181
  });
1182
1182
 
1183
+ it('bumps version in Maven `pom.xml` file with CRLF Line Endings', async function () {
1184
+ const expected = fs.readFileSync(
1185
+ './test/mocks/pom-6.4.0-crlf.xml',
1186
+ 'utf-8',
1187
+ );
1188
+ const filename = 'pom.xml';
1189
+ mock({
1190
+ bump: 'minor',
1191
+ realTestFiles: [
1192
+ {
1193
+ filename,
1194
+ path: './test/mocks/pom-6.3.1-crlf.xml',
1195
+ },
1196
+ ],
1197
+ });
1198
+ await exec({
1199
+ packageFiles: [{ filename, type: 'maven' }],
1200
+ bumpFiles: [{ filename, type: 'maven' }],
1201
+ });
1202
+
1203
+ // filePath is the first arg passed to writeFileSync
1204
+ const packageJsonWriteFileSynchCall = findWriteFileCallForPath({
1205
+ writeFileSyncSpy,
1206
+ filename,
1207
+ });
1208
+
1209
+ if (!packageJsonWriteFileSynchCall) {
1210
+ throw new Error(`writeFileSynch not invoked with path ${filename}`);
1211
+ }
1212
+
1213
+ const calledWithContentStr = packageJsonWriteFileSynchCall[1];
1214
+ expect(calledWithContentStr).toEqual(expected);
1215
+ });
1216
+
1217
+ it('bumps version in Maven `pom.xml` file with LF Line Endings', async function () {
1218
+ const expected = fs.readFileSync(
1219
+ './test/mocks/pom-6.4.0-lf.xml',
1220
+ 'utf-8',
1221
+ );
1222
+ const filename = 'pom.xml';
1223
+ mock({
1224
+ bump: 'minor',
1225
+ realTestFiles: [
1226
+ {
1227
+ filename,
1228
+ path: './test/mocks/pom-6.3.1-lf.xml',
1229
+ },
1230
+ ],
1231
+ });
1232
+ await exec({
1233
+ packageFiles: [{ filename, type: 'maven' }],
1234
+ bumpFiles: [{ filename, type: 'maven' }],
1235
+ });
1236
+
1237
+ // filePath is the first arg passed to writeFileSync
1238
+ const packageJsonWriteFileSynchCall = findWriteFileCallForPath({
1239
+ writeFileSyncSpy,
1240
+ filename,
1241
+ });
1242
+
1243
+ if (!packageJsonWriteFileSynchCall) {
1244
+ throw new Error(`writeFileSynch not invoked with path ${filename}`);
1245
+ }
1246
+
1247
+ const calledWithContentStr = packageJsonWriteFileSynchCall[1];
1248
+ expect(calledWithContentStr).toEqual(expected);
1249
+ });
1250
+
1183
1251
  it('bumps version in Gradle `build.gradle.kts` file', async function () {
1184
1252
  const expected = fs.readFileSync(
1185
1253
  './test/mocks/build-6.4.0.gradle.kts',
1186
1254
  'utf-8',
1187
1255
  );
1188
1256
 
1257
+ const filename = 'build.gradle.kts';
1189
1258
  mock({
1190
1259
  bump: 'minor',
1191
1260
  realTestFiles: [
1192
1261
  {
1193
- filename: 'build.gradle.kts',
1262
+ filename,
1194
1263
  path: './test/mocks/build-6.3.1.gradle.kts',
1195
1264
  },
1196
1265
  ],
1197
1266
  });
1198
1267
 
1199
1268
  await exec({
1200
- packageFiles: [{ filename: 'build.gradle.kts', type: 'gradle' }],
1201
- bumpFiles: [{ filename: 'build.gradle.kts', type: 'gradle' }],
1269
+ packageFiles: [{ filename, type: 'gradle' }],
1270
+ bumpFiles: [{ filename, type: 'gradle' }],
1202
1271
  });
1203
1272
 
1204
1273
  // filePath is the first arg passed to writeFileSync
1205
- const filename = 'build.gradle.kts';
1206
1274
  const packageJsonWriteFileSynchCall = findWriteFileCallForPath({
1207
1275
  writeFileSyncSpy,
1208
1276
  filename,
@@ -1297,6 +1365,78 @@ describe('cli', function () {
1297
1365
  verifyPackageVersion({ writeFileSyncSpy, expectedVersion: '1.1.0' });
1298
1366
  });
1299
1367
 
1368
+ it('bumps version in Dart `pubspec.yaml` file', async function () {
1369
+ const expected = fs.readFileSync(
1370
+ './test/mocks/pubspec-6.4.0.yaml',
1371
+ 'utf-8',
1372
+ );
1373
+
1374
+ const filename = 'pubspec.yaml';
1375
+ mock({
1376
+ bump: 'minor',
1377
+ realTestFiles: [
1378
+ {
1379
+ filename,
1380
+ path: './test/mocks/pubspec-6.3.1.yaml',
1381
+ },
1382
+ ],
1383
+ });
1384
+
1385
+ await exec({
1386
+ packageFiles: [{ filename, type: 'yaml' }],
1387
+ bumpFiles: [{ filename, type: 'yaml' }],
1388
+ });
1389
+
1390
+ // filePath is the first arg passed to writeFileSync
1391
+ const packageJsonWriteFileSynchCall = findWriteFileCallForPath({
1392
+ writeFileSyncSpy,
1393
+ filename,
1394
+ });
1395
+
1396
+ if (!packageJsonWriteFileSynchCall) {
1397
+ throw new Error(`writeFileSynch not invoked with path ${filename}`);
1398
+ }
1399
+
1400
+ const calledWithContentStr = packageJsonWriteFileSynchCall[1];
1401
+ expect(calledWithContentStr).toEqual(expected);
1402
+ });
1403
+
1404
+ it('bumps version in Dart `pubspec.yaml` file with CRLF line endings', async function () {
1405
+ const expected = fs.readFileSync(
1406
+ './test/mocks/pubspec-6.4.0-crlf.yaml',
1407
+ 'utf-8',
1408
+ );
1409
+
1410
+ const filename = 'pubspec.yaml';
1411
+ mock({
1412
+ bump: 'minor',
1413
+ realTestFiles: [
1414
+ {
1415
+ filename,
1416
+ path: './test/mocks/pubspec-6.3.1-crlf.yaml',
1417
+ },
1418
+ ],
1419
+ });
1420
+
1421
+ await exec({
1422
+ packageFiles: [{ filename, type: 'yaml' }],
1423
+ bumpFiles: [{ filename, type: 'yaml' }],
1424
+ });
1425
+
1426
+ // filePath is the first arg passed to writeFileSync
1427
+ const packageJsonWriteFileSynchCall = findWriteFileCallForPath({
1428
+ writeFileSyncSpy,
1429
+ filename,
1430
+ });
1431
+
1432
+ if (!packageJsonWriteFileSynchCall) {
1433
+ throw new Error(`writeFileSynch not invoked with path ${filename}`);
1434
+ }
1435
+
1436
+ const calledWithContentStr = packageJsonWriteFileSynchCall[1];
1437
+ expect(calledWithContentStr).toEqual(expected);
1438
+ });
1439
+
1300
1440
  describe('skip', function () {
1301
1441
  it('allows bump and changelog generation to be skipped', async function () {
1302
1442
  const changelogContent = 'legacy header format<a name="1.0.0">\n';
@@ -0,0 +1,30 @@
1
+ <project>
2
+ <modelVersion>4.0.0</modelVersion>
3
+
4
+ <parent>
5
+ <groupId>com.mycompany.app</groupId>
6
+ <artifactId>my-app</artifactId>
7
+ <version>3.0.0</version>
8
+ </parent>
9
+
10
+ <groupId>com.mycompany.app</groupId>
11
+ <artifactId>my-module</artifactId>
12
+ <version>6.3.1</version>
13
+
14
+ <properties>
15
+ <some.version>2.0.0</some.version>
16
+ </properties>
17
+
18
+ <dependencies>
19
+ <dependency>
20
+ <groupId>org.some.dependency</groupId>
21
+ <artifactId>some-artifact</artifactId>
22
+ <version>${some.version}</version>
23
+ </dependency>
24
+ <dependency>
25
+ <groupId>org.another.dependency</groupId>
26
+ <artifactId>another-artifact</artifactId>
27
+ <version>1.0.0</version>
28
+ </dependency>
29
+ </dependencies>
30
+ </project>
@@ -0,0 +1,30 @@
1
+ <project>
2
+ <modelVersion>4.0.0</modelVersion>
3
+
4
+ <parent>
5
+ <groupId>com.mycompany.app</groupId>
6
+ <artifactId>my-app</artifactId>
7
+ <version>3.0.0</version>
8
+ </parent>
9
+
10
+ <groupId>com.mycompany.app</groupId>
11
+ <artifactId>my-module</artifactId>
12
+ <version>6.3.1</version>
13
+
14
+ <properties>
15
+ <some.version>2.0.0</some.version>
16
+ </properties>
17
+
18
+ <dependencies>
19
+ <dependency>
20
+ <groupId>org.some.dependency</groupId>
21
+ <artifactId>some-artifact</artifactId>
22
+ <version>${some.version}</version>
23
+ </dependency>
24
+ <dependency>
25
+ <groupId>org.another.dependency</groupId>
26
+ <artifactId>another-artifact</artifactId>
27
+ <version>1.0.0</version>
28
+ </dependency>
29
+ </dependencies>
30
+ </project>
@@ -0,0 +1,30 @@
1
+ <project>
2
+ <modelVersion>4.0.0</modelVersion>
3
+
4
+ <parent>
5
+ <groupId>com.mycompany.app</groupId>
6
+ <artifactId>my-app</artifactId>
7
+ <version>3.0.0</version>
8
+ </parent>
9
+
10
+ <groupId>com.mycompany.app</groupId>
11
+ <artifactId>my-module</artifactId>
12
+ <version>6.4.0</version>
13
+
14
+ <properties>
15
+ <some.version>2.0.0</some.version>
16
+ </properties>
17
+
18
+ <dependencies>
19
+ <dependency>
20
+ <groupId>org.some.dependency</groupId>
21
+ <artifactId>some-artifact</artifactId>
22
+ <version>${some.version}</version>
23
+ </dependency>
24
+ <dependency>
25
+ <groupId>org.another.dependency</groupId>
26
+ <artifactId>another-artifact</artifactId>
27
+ <version>1.0.0</version>
28
+ </dependency>
29
+ </dependencies>
30
+ </project>
@@ -0,0 +1,30 @@
1
+ <project>
2
+ <modelVersion>4.0.0</modelVersion>
3
+
4
+ <parent>
5
+ <groupId>com.mycompany.app</groupId>
6
+ <artifactId>my-app</artifactId>
7
+ <version>3.0.0</version>
8
+ </parent>
9
+
10
+ <groupId>com.mycompany.app</groupId>
11
+ <artifactId>my-module</artifactId>
12
+ <version>6.4.0</version>
13
+
14
+ <properties>
15
+ <some.version>2.0.0</some.version>
16
+ </properties>
17
+
18
+ <dependencies>
19
+ <dependency>
20
+ <groupId>org.some.dependency</groupId>
21
+ <artifactId>some-artifact</artifactId>
22
+ <version>${some.version}</version>
23
+ </dependency>
24
+ <dependency>
25
+ <groupId>org.another.dependency</groupId>
26
+ <artifactId>another-artifact</artifactId>
27
+ <version>1.0.0</version>
28
+ </dependency>
29
+ </dependencies>
30
+ </project>
@@ -0,0 +1,33 @@
1
+ # This is a comment that should be preserved
2
+ name: mock
3
+ description: "A mock YAML file"
4
+ version: 6.3.1
5
+
6
+ environment:
7
+ dart: ">=3.2.6 <4.0.0"
8
+ flutter: ">=1.17.0"
9
+
10
+ dependencies:
11
+ flutter:
12
+ sdk: flutter
13
+
14
+ dev_dependencies:
15
+ flutter_test:
16
+ sdk: flutter
17
+
18
+ # For information on the generic Dart part of this file, see the
19
+ # following page: https://dart.dev/tools/pub/pubspec
20
+
21
+ # The following section is specific to Flutter packages.
22
+ flutter:
23
+ uses-material-design: true
24
+ generate: true
25
+
26
+ # More comments here nested under one entry
27
+ #
28
+ # These comments should also be preserved.
29
+
30
+ # Another comment block, separated from the first one
31
+ assets:
32
+ - assets/icons/
33
+ - assets/images/
@@ -0,0 +1,33 @@
1
+ # This is a comment that should be preserved
2
+ name: mock
3
+ description: "A mock YAML file"
4
+ version: 6.3.1
5
+
6
+ environment:
7
+ dart: ">=3.2.6 <4.0.0"
8
+ flutter: ">=1.17.0"
9
+
10
+ dependencies:
11
+ flutter:
12
+ sdk: flutter
13
+
14
+ dev_dependencies:
15
+ flutter_test:
16
+ sdk: flutter
17
+
18
+ # For information on the generic Dart part of this file, see the
19
+ # following page: https://dart.dev/tools/pub/pubspec
20
+
21
+ # The following section is specific to Flutter packages.
22
+ flutter:
23
+ uses-material-design: true
24
+ generate: true
25
+
26
+ # More comments here nested under one entry
27
+ #
28
+ # These comments should also be preserved.
29
+
30
+ # Another comment block, separated from the first one
31
+ assets:
32
+ - assets/icons/
33
+ - assets/images/
@@ -0,0 +1,33 @@
1
+ # This is a comment that should be preserved
2
+ name: mock
3
+ description: "A mock YAML file"
4
+ version: 6.4.0
5
+
6
+ environment:
7
+ dart: ">=3.2.6 <4.0.0"
8
+ flutter: ">=1.17.0"
9
+
10
+ dependencies:
11
+ flutter:
12
+ sdk: flutter
13
+
14
+ dev_dependencies:
15
+ flutter_test:
16
+ sdk: flutter
17
+
18
+ # For information on the generic Dart part of this file, see the
19
+ # following page: https://dart.dev/tools/pub/pubspec
20
+
21
+ # The following section is specific to Flutter packages.
22
+ flutter:
23
+ uses-material-design: true
24
+ generate: true
25
+
26
+ # More comments here nested under one entry
27
+ #
28
+ # These comments should also be preserved.
29
+
30
+ # Another comment block, separated from the first one
31
+ assets:
32
+ - assets/icons/
33
+ - assets/images/
@@ -0,0 +1,33 @@
1
+ # This is a comment that should be preserved
2
+ name: mock
3
+ description: "A mock YAML file"
4
+ version: 6.4.0
5
+
6
+ environment:
7
+ dart: ">=3.2.6 <4.0.0"
8
+ flutter: ">=1.17.0"
9
+
10
+ dependencies:
11
+ flutter:
12
+ sdk: flutter
13
+
14
+ dev_dependencies:
15
+ flutter_test:
16
+ sdk: flutter
17
+
18
+ # For information on the generic Dart part of this file, see the
19
+ # following page: https://dart.dev/tools/pub/pubspec
20
+
21
+ # The following section is specific to Flutter packages.
22
+ flutter:
23
+ uses-material-design: true
24
+ generate: true
25
+
26
+ # More comments here nested under one entry
27
+ #
28
+ # These comments should also be preserved.
29
+
30
+ # Another comment block, separated from the first one
31
+ assets:
32
+ - assets/icons/
33
+ - assets/images/