Skip to content

Commit e8b5f26

Browse files
authored
Updating synthetic package_config.json generation directory (#4387)
This was causing files in `web/` and other non-package roots from following versions in the generated `package_config.json`. Fixes #4302
1 parent a568488 commit e8b5f26

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

build_modules/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 5.1.8
2+
3+
- Generate synthetic `package_config.json` in the root of its synthetic test directory. Fixes sources in `web/` and related directories not obeying version constraints.
4+
15
## 5.1.7
26

37
- Add entrypoint file deserialization logic to FrontendServerState.

build_modules/lib/src/scratch_space.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,8 +117,8 @@ String _scratchSpacePackageConfig(String rootConfig, Uri packageConfigUri) {
117117
if (rootUri == _currentDirUri) {
118118
assert(!foundRoot);
119119
foundRoot = true;
120-
package['packageUri'] = '';
121-
package['rootUri'] = '../packages/${package['name']}/';
120+
package['rootUri'] = '../';
121+
package['packageUri'] = 'packages/${package['name']}/';
122122
} else {
123123
package['rootUri'] = '../packages/${package['name']}/';
124124
package.remove('packageUri');

build_modules/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: build_modules
2-
version: 5.1.7
2+
version: 5.1.8
33
description: >-
44
Builders to analyze and split Dart code into individually compilable modules
55
based on imports.

0 commit comments

Comments
 (0)