Skip to content

Commit 4b60d87

Browse files
authored
feat: add pub workspace support and update dependencies (#17)
* feat: add pub workspace support and update dependencies * fix CI * again * linter love * removed lintervention from workspace * add it back * fix test syntax * comment out entire workspace * removed library name
1 parent 1f21aaa commit 4b60d87

15 files changed

Lines changed: 102 additions & 84 deletions

File tree

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
include: package:lintervention/analysis_options.yaml
1+
{{#publishable}}include: package:lintervention/package.yaml{{/publishable}}
2+
{{^publishable}}include: package:lintervention/app.yaml{{/publishable}}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
/// {{{description}}}
2-
library {{project_name.snakeCase()}};
2+
library;
33

44
export 'src/{{project_name.snakeCase()}}.dart';

wnma_dart_package/__brick__/{{project_name.snakeCase()}}/pubspec.yaml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,12 @@ name: {{project_name.snakeCase()}}
22
description: {{{description}}}
33
version: 0.1.0
44
{{^publishable}}publish_to: none{{/publishable}}
5+
{{#workspace}}resolution: workspace{{/workspace}}
56

67
environment:
7-
sdk: ">=3.0.0 <4.0.0"
8+
sdk: ">=3.9.0 <4.0.0"
89

910
dev_dependencies:
10-
lintervention: ^0.3.1
11+
lintervention: ^0.4.0
1112
mocktail: ^1.0.4
12-
test: ^1.26.2
13+
test: ^1.26.3

wnma_dart_package/__brick__/{{project_name.snakeCase()}}/test/src/{{project_name.snakeCase()}}_test.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// We ignore prefer_const_constructors here to make testing more convenient.
12
// ignore_for_file: prefer_const_constructors
23
import 'package:test/test.dart';
34
import 'package:{{project_name.snakeCase()}}/{{project_name.snakeCase()}}.dart';

wnma_dart_package/brick.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,8 @@ vars:
2222
description: Whether the generated package is intended to be published.
2323
default: false
2424
prompt: Will the package be published?
25+
workspace:
26+
type: boolean
27+
description: Whether this package is part of a dart workspace (such as melos >7.0.0)
28+
default: true
29+
prompt: Is this package part of a workspace?

wnma_dart_package/config.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"project_name": "test_package",
33
"description": "Package for testing",
4-
"publishable": true
4+
"publishable": true,
5+
"workspace": false
56
}
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
include: package:lintervention/analysis_options.yaml
1+
{{#publishable}}include: package:lintervention/package.yaml{{/publishable}}
2+
{{^publishable}}include: package:lintervention/app.yaml{{/publishable}}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
/// {{{description}}}
2-
library {{project_name.snakeCase()}};
2+
library;
33

44
export 'src/{{project_name.snakeCase()}}.dart';

wnma_flutter_package/__brick__/{{project_name.snakeCase()}}/pubspec.yaml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,11 @@ name: {{project_name.snakeCase()}}
22
description: {{{description}}}
33
version: 0.1.0
44
{{^publishable}}publish_to: none{{/publishable}}
5+
{{#workspace}}resolution: workspace{{/workspace}}
56

67
environment:
7-
sdk: ">=3.8.0 <4.0.0"
8-
flutter: ">=3.32.0"
8+
sdk: ">=3.9.0 <4.0.0"
9+
flutter: ">=3.35.0"
910

1011
dependencies:
1112
flutter:
@@ -14,5 +15,5 @@ dependencies:
1415
dev_dependencies:
1516
flutter_test:
1617
sdk: flutter
17-
lintervention: ^0.3.1
18+
lintervention: ^0.4.0
1819
mocktail: ^1.0.4

wnma_flutter_package/__brick__/{{project_name.snakeCase()}}/test/src/{{project_name.snakeCase()}}_test.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// We ignore prefer_const_constructors here to make testing more convenient.
12
// ignore_for_file: prefer_const_constructors
23
import 'package:flutter_test/flutter_test.dart';
34
import 'package:{{project_name.snakeCase()}}/{{project_name.snakeCase()}}.dart';

0 commit comments

Comments
 (0)