Skip to content

Commit 088812e

Browse files
authored
Migrate to pub workspaces (#7762)
1 parent 85190f4 commit 088812e

28 files changed

+239
-6157
lines changed

Diff for: Dockerfile.app

+3
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ COPY static /project/static
1717
COPY doc /project/doc
1818
COPY third_party /project/third_party
1919
COPY tool /project/tool
20+
COPY pubspec.lock /project/pubspec.lock
21+
COPY pubspec.yaml /project/pubspec.yaml
22+
2023

2124
WORKDIR /project/pkg/web_app
2225
RUN dart /project/tool/pub_get_offline.dart /project/pkg/web_app

Diff for: app/pubspec.yaml

+2-6
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
name: pub_dev
22
description: The pub.dartlang.org website.
33
environment:
4-
sdk: ^3.5.0
4+
sdk: '^3.5.0'
5+
resolution: workspace
56
dependencies:
67
_popularity:
7-
path: ../pkg/_popularity
88
_pub_shared:
9-
path: ../pkg/_pub_shared
109
appengine: ^0.13.8
1110
args: '^2.0.0'
1211
basics: ^0.10.0
@@ -25,7 +24,6 @@ dependencies:
2524
http: ^1.0.0
2625
http_parser: ^4.0.0
2726
indexed_blob:
28-
path: ../pkg/indexed_blob
2927
intl: '^0.19.0'
3028
json_annotation: '^4.3.0'
3129
lints: ^5.0.0
@@ -39,7 +37,6 @@ dependencies:
3937
pem: ^2.0.1
4038
pool: '^1.5.0'
4139
pub_package_reader:
42-
path: ../pkg/pub_package_reader
4340
pub_semver: '^2.0.0'
4441
pubspec_parse: ^1.2.1
4542
retry: ^3.1.0
@@ -57,7 +54,6 @@ dependencies:
5754
ulid: '2.0.1'
5855
tar: '2.0.0'
5956
api_builder:
60-
path: ../pkg/api_builder
6157

6258
dev_dependencies:
6359
build_runner: '^2.0.0'

Diff for: app/test/shared/versions_test.dart

+6-1
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,11 @@
33
// BSD-style license that can be found in the LICENSE file.
44

55
import 'dart:io';
6+
import 'dart:isolate';
67

78
import 'package:_pub_shared/utils/flutter_archive.dart';
89
import 'package:collection/collection.dart' show IterableExtension;
10+
import 'package:path/path.dart' as p;
911
import 'package:pub_dev/shared/versions.dart';
1012
import 'package:test/test.dart';
1113
import 'package:yaml/yaml.dart';
@@ -97,7 +99,10 @@ void main() {
9799
});
98100

99101
test('analyzer version should match resolved pana version', () async {
100-
final String lockContent = await File('pubspec.lock').readAsString();
102+
final String lockContent = await File(p.join(
103+
p.dirname(p.dirname(Isolate.packageConfigSync!.toFilePath())),
104+
'pubspec.lock'))
105+
.readAsString();
101106
final lock = loadYaml(lockContent) as Map;
102107
expect(lock['packages']['pana']['version'], panaVersion);
103108
});

0 commit comments

Comments
 (0)