Skip to content

Commit c882b3a

Browse files
committed
build!: Migrate to pub workspace
Signed-off-by: provokateurin <[email protected]>
1 parent 888e95f commit c882b3a

File tree

64 files changed

+596
-1189
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

64 files changed

+596
-1189
lines changed

.github/workflows/conventional_commits.yaml

+3-3
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ jobs:
1515
- name: Install dart
1616
uses: dart-lang/setup-dart@e630b99d28a3b71860378cafdc2a067c71107f94 # v1
1717
with:
18-
sdk: 3.5
18+
sdk: 3.6
1919
- name: Install commitlint_cli
20-
run: dart pub get
20+
run: dart pub global activate commitlint_cli
2121

2222
- name: Lint conventional commits
23-
run: dart run commitlint_cli --from=${{ github.event.pull_request.head.sha }}~${{ github.event.pull_request.commits }} --to=${{ github.event.pull_request.head.sha }}
23+
run: dart pub global run commitlint_cli --from=${{ github.event.pull_request.head.sha }}~${{ github.event.pull_request.commits }} --to=${{ github.event.pull_request.head.sha }}

.github/workflows/dart.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ jobs:
3737
- name: Install dart
3838
uses: dart-lang/setup-dart@e630b99d28a3b71860378cafdc2a067c71107f94 # v1
3939
with:
40-
sdk: 3.5
40+
sdk: 3.6
4141
- name: Setup
4242
run: ./tool/setup.sh
4343

@@ -48,7 +48,7 @@ jobs:
4848
if: ${{ matrix.dependencies == 'downgrade' }}
4949
run: |
5050
git apply .github/workflows/dependency_overrides.patch
51-
melos exec dart pub downgrade
51+
fvm dart pub downgrade
5252
- name: Check formatting
5353
run: melos run format:check
5454
- name: Lint code

.github/workflows/dependency_overrides.patch

+6-450
Large diffs are not rendered by default.

.github/workflows/generate.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ jobs:
4141
- name: Install dart
4242
uses: dart-lang/setup-dart@e630b99d28a3b71860378cafdc2a067c71107f94 # v1
4343
with:
44-
sdk: 3.5
44+
sdk: 3.6
4545
- name: Setup
4646
run: ./tool/setup.sh
4747

.github/workflows/publish.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
- name: Install dart
2626
uses: dart-lang/setup-dart@e630b99d28a3b71860378cafdc2a067c71107f94 # v1
2727
with:
28-
sdk: 3.5
28+
sdk: 3.6
2929
- name: Setup
3030
run: ./tool/setup.sh
3131

@@ -103,7 +103,7 @@ jobs:
103103
- name: Install dart
104104
uses: dart-lang/setup-dart@e630b99d28a3b71860378cafdc2a067c71107f94 # v1
105105
with:
106-
sdk: 3.5
106+
sdk: 3.6
107107
- name: Setup
108108
run: ./tool/setup.sh
109109
- name: Build

.github/workflows/update_presets.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
- name: Install dart
1717
uses: dart-lang/setup-dart@e630b99d28a3b71860378cafdc2a067c71107f94 # v1
1818
with:
19-
sdk: 3.5
19+
sdk: 3.6
2020
- name: Setup
2121
run: ./tool/setup.sh
2222

.gitignore

+2-5
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,17 @@
11
.dart_tool
2-
pubspec.lock
2+
.flutter-plugins
3+
.flutter-plugins-dependencies
34

45
packages/**/.idea
56
packages/**/*.iml
67
packages/**/*.symbols
78
packages/**/*.log
8-
packages/**/.flutter-plugins
9-
packages/**/.flutter-plugins-dependencies
109
packages/**/coverage
1110
packages/**/build
1211
packages/**/build-dir
1312
packages/**/.flatpak-builder
1413
packages/**/doc/api
1514

16-
!packages/neon_framework/example/pubspec.lock
17-
1815
# Melos recommends adding them, but renovate does not generate them which would end up with broken lockfiles
1916
# **/pubspec_overrides.yaml
2017

docs/workflows.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
If you need to add a new package to the Neon project please make sure to execute all the following steps:
66
1. Use the according template by running `fvm dart create -t package package_name` or `fvm flutter create -t package package_name`.
77
2. Make sure to activate our strict linting by adding it to the package.
8-
3. Regenerate the dependency overrides by executing `melos bootstrap`.
9-
4. Add a Symlink to our main [license](../assets/AGPL-3.0.txt).
8+
3. Add a Symlink to our main [license](../assets/AGPL-3.0.txt).
9+
4. Update the workspace [pubspec.yaml](../pubspec.yaml) by adding the new package path.
1010
5. Update [commitlint.yaml](../commitlint.yaml) by adding the new package name.
1111
6. Remove the package `.gitignore` (a global `.gitignore` for all packages is used instead).
1212

melos.yaml

+1-4
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,6 @@ command:
2424
post: melos run format
2525
version:
2626
hooks:
27-
preCommit: |
28-
melos bootstrap
29-
git add packages/neon_framework/example/pubspec.lock
3027
# Needed until https://github.com/invertase/melos/issues/591 is supported
3128
post: |
3229
git commit --amend --signoff --no-edit
@@ -44,7 +41,7 @@ scripts:
4441
test:dart: >
4542
melos exec --no-flutter --concurrency=1 --fail-fast --dir-exists=test -- "
4643
dart test --concurrency=$(nproc --all) --coverage=coverage &&
47-
dart pub global run coverage:format_coverage --packages=.dart_tool/package_config.json --report-on=lib --lcov -o ./coverage/lcov.info -i ./coverage
44+
dart pub global run coverage:format_coverage --packages=MELOS_ROOT_PATH/.dart_tool/package_config.json --report-on=lib --lcov -o ./coverage/lcov.info -i ./coverage
4845
"
4946
test:flutter: melos exec --flutter --concurrency=1 --fail-fast --dir-exists=test -- flutter test --concurrency=$(nproc --all) --coverage
5047
generate:neon:build_runner: melos exec --scope="neon*" --file-exists="build.yaml" -- dart run build_runner build --delete-conflicting-outputs && melos run format

packages/cookie_store/packages/cookie_store_conformance_tests/pubspec.yaml

+5-7
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,17 @@ description: >-
33
A library that tests whether implementations of package:cookie_store's `CookieStore`
44
class behave as expected.
55
publish_to: none
6+
resolution: workspace
7+
68
environment:
7-
sdk: ^3.0.0
9+
sdk: ^3.5.0
810

911
dependencies:
1012
cookie_store:
11-
git:
12-
url: https://github.com/nextcloud/neon
13-
path: packages/cookie_store
13+
path: ../..
1414
meta: ^1.0.0
1515
test: ^1.21.2
1616

1717
dev_dependencies:
1818
neon_lints:
19-
git:
20-
url: https://github.com/nextcloud/neon
21-
path: packages/neon_lints
19+
path: ../../../neon_lints

packages/cookie_store/packages/cookie_store_conformance_tests/pubspec_overrides.yaml

-6
This file was deleted.

packages/cookie_store/pubspec.yaml

+5-8
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,18 @@ name: cookie_store
22
description: A RFC compliant cookie store
33
version: 0.1.0
44
publish_to: none
5+
resolution: workspace
56

67
environment:
7-
sdk: ^3.0.0
8+
sdk: ^3.5.0
89

910
dependencies:
1011
meta: ^1.0.0
1112
timezone: ^0.9.4
1213

1314
dev_dependencies:
1415
cookie_store_conformance_tests:
15-
git:
16-
url: https://github.com/nextcloud/neon
17-
path: packages/cookie_store/packages/cookie_store_conformance_tests
16+
path: packages/cookie_store_conformance_tests
1817
neon_lints:
19-
git:
20-
url: https://github.com/nextcloud/neon
21-
path: packages/neon_lints
22-
test: ^1.25.8
18+
path: ../neon_lints
19+
test: ^1.24.0

packages/cookie_store/pubspec_overrides.yaml

-6
This file was deleted.

packages/dynamite/example/pubspec.yaml

+3-4
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,10 @@ name: dynamite_petstore_example
22
description: An example showing how to use dynamite for the Petstore example API.
33
version: 1.0.0
44
publish_to: none
5+
resolution: workspace
56

67
environment:
7-
sdk: ^3.0.0
8+
sdk: ^3.5.0
89

910
dependencies:
1011
built_collection: ^5.0.0
@@ -19,6 +20,4 @@ dev_dependencies:
1920
built_value_generator: ^8.9.2
2021
dynamite: ^0.5.0+1
2122
neon_lints:
22-
git:
23-
url: https://github.com/nextcloud/neon
24-
path: packages/neon_lints
23+
path: ../../neon_lints

packages/dynamite/example/pubspec_overrides.yaml

-8
This file was deleted.

packages/dynamite/packages/dynamite_end_to_end_test/pubspec.yaml

+5-5
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,10 @@ name: dynamite_end_to_end_test
22
publish_to: none
33
description: Tests for dynamite. Not meant for publishing.
44
version: 1.0.0
5+
resolution: workspace
56

67
environment:
7-
sdk: ^3.0.0
8+
sdk: ^3.5.0
89

910
dependencies:
1011
built_collection: ^5.0.0
@@ -21,7 +22,6 @@ dev_dependencies:
2122
built_value_test: ^8.9.2
2223
dynamite: ^0.5.0+1
2324
neon_lints:
24-
git:
25-
url: https://github.com/nextcloud/neon
26-
path: packages/neon_lints
27-
test: ^1.25.8
25+
path: ../../../neon_lints
26+
test: ^1.24.0
27+

packages/dynamite/packages/dynamite_end_to_end_test/pubspec_overrides.yaml

-8
This file was deleted.

packages/dynamite/packages/dynamite_runtime/pubspec.yaml

+5-5
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,10 @@ topics:
77
- openapi
88
- codegen
99
- build-runner
10+
resolution: workspace
1011

1112
environment:
12-
sdk: ^3.0.0
13+
sdk: ^3.5.0
1314

1415
dependencies:
1516
built_collection: ^5.0.0
@@ -24,10 +25,9 @@ dev_dependencies:
2425
build_runner: ^2.4.13
2526
built_value_generator: ^8.9.2
2627
neon_lints:
27-
git:
28-
url: https://github.com/nextcloud/neon
29-
path: packages/neon_lints
30-
test: ^1.25.8
28+
path: ../../../neon_lints
29+
test: ^1.24.0
30+
3131

3232
platforms:
3333
windows:

packages/dynamite/packages/dynamite_runtime/pubspec_overrides.yaml

-4
This file was deleted.

packages/dynamite/pubspec.yaml

+4-5
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,10 @@ topics:
77
- openapi
88
- codegen
99
- build-runner
10+
resolution: workspace
1011

1112
environment:
12-
sdk: ^3.0.0
13+
sdk: ^3.5.0
1314

1415
dependencies:
1516
build: ^2.0.0
@@ -35,7 +36,5 @@ dev_dependencies:
3536
built_value_generator: ^8.9.2
3637
built_value_test: ^8.9.2
3738
neon_lints:
38-
git:
39-
url: https://github.com/nextcloud/neon
40-
path: packages/neon_lints
41-
test: ^1.25.8
39+
path: ../neon_lints
40+
test: ^1.24.0

packages/dynamite/pubspec_overrides.yaml

-4
This file was deleted.

packages/interceptor_http_client/pubspec.yaml

+6-8
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,15 @@ name: interceptor_http_client
22
description: A http client with request and response interceptors.
33
version: 0.1.0
44
publish_to: none
5+
resolution: workspace
56

67
environment:
7-
sdk: ^3.0.0
8+
sdk: ^3.5.0
89

910
dependencies:
1011
built_collection: ^5.0.0
1112
cookie_store:
12-
git:
13-
url: https://github.com/nextcloud/neon
14-
path: packages/cookie_store
13+
path: ../cookie_store
1514
http: ^1.0.0
1615
meta: ^1.0.0
1716

@@ -23,7 +22,6 @@ dev_dependencies:
2322
ref: 76512c4cbf987361421030349fd1946e63e33359
2423
mocktail: ^1.0.4
2524
neon_lints:
26-
git:
27-
url: https://github.com/nextcloud/neon
28-
path: packages/neon_lints
29-
test: ^1.25.8
25+
path: ../neon_lints
26+
test: ^1.24.0
27+

packages/interceptor_http_client/pubspec_overrides.yaml

-6
This file was deleted.

0 commit comments

Comments
 (0)