Skip to content

Commit 94fabbf

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

Some content is hidden

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

61 files changed

+590
-1183
lines changed

.github/workflows/conventional_commits.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
with:
1818
sdk: 3.5
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

+1-1
Original file line numberDiff line numberDiff line change
@@ -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.

.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.

packages/neon_framework/example/pubspec.yaml

+10-25
Original file line numberDiff line numberDiff line change
@@ -1,51 +1,36 @@
11
name: example
22
version: 1.0.0
33
publish_to: 'none'
4+
resolution: workspace
45

56
environment:
6-
sdk: ^3.0.0
7+
sdk: ^3.5.0
78
flutter: ^3.22.0
89

910
dependencies:
1011
built_collection: ^5.0.0
1112
dashboard_app:
12-
git:
13-
url: https://github.com/nextcloud/neon
14-
path: packages/neon_framework/packages/dashboard_app
13+
path: ../packages/dashboard_app
1514
files_app:
16-
git:
17-
url: https://github.com/nextcloud/neon
18-
path: packages/neon_framework/packages/files_app
15+
path: ../packages/files_app
1916
flutter:
2017
sdk: flutter
2118
neon_framework:
22-
git:
23-
url: https://github.com/nextcloud/neon
24-
path: packages/neon_framework
19+
path: ..
2520
news_app:
26-
git:
27-
url: https://github.com/nextcloud/neon
28-
path: packages/neon_framework/packages/news_app
21+
path: ../packages/news_app
2922
notes_app:
30-
git:
31-
url: https://github.com/nextcloud/neon
32-
path: packages/neon_framework/packages/notes_app
23+
path: ../packages/notes_app
3324
notifications_app:
34-
git:
35-
url: https://github.com/nextcloud/neon
36-
path: packages/neon_framework/packages/notifications_app
25+
path: ../packages/notifications_app
3726
talk_app:
38-
git:
39-
url: https://github.com/nextcloud/neon
40-
path: packages/neon_framework/packages/talk_app
27+
path: ../packages/talk_app
4128
vector_graphics: any
4229

4330
dev_dependencies:
4431
custom_lint: ^0.7.0
4532
neon_lints:
46-
git:
47-
url: https://github.com/nextcloud/neon
48-
path: packages/neon_lints
33+
path: ../../neon_lints
4934
vector_graphics_compiler: any
5035

5136
flutter:

packages/neon_framework/example/pubspec_overrides.yaml

-36
This file was deleted.

0 commit comments

Comments
 (0)