Skip to content

Commit dd34beb

Browse files
chore(deps): bump build_runner from 2.5.4 to 2.6.0 (#31)
* chore(deps): bump build_runner from 2.5.4 to 2.6.0 Bumps [build_runner](https://github.com/dart-lang/build) from 2.5.4 to 2.6.0. - [Release notes](https://github.com/dart-lang/build/releases) - [Commits](dart-lang/build@build_runner-v2.5.4...build_runner-v2.6.0) --- updated-dependencies: - dependency-name: build_runner dependency-version: 2.6.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> * fixing tests * revert use of dart test command --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Miguel Beltran <m@beltran.work>
1 parent 0b00ec1 commit dd34beb

File tree

4 files changed

+49
-43
lines changed

4 files changed

+49
-43
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,5 @@
22
# Created by `dart pub`
33
.dart_tool/
44
.idea/
5+
6+
build/

pubspec.lock

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ packages:
1313
dependency: transitive
1414
description:
1515
name: analyzer
16-
sha256: f6154230675c44a191f2e20d16eeceb4aa18b30ca732db4efaf94c6a7d43cfa6
16+
sha256: "974859dc0ff5f37bc4313244b3218c791810d03ab3470a579580279ba971a48d"
1717
url: "https://pub.dev"
1818
source: hosted
19-
version: "7.5.2"
19+
version: "7.7.1"
2020
args:
2121
dependency: "direct main"
2222
description:
@@ -45,10 +45,10 @@ packages:
4545
dependency: transitive
4646
description:
4747
name: build
48-
sha256: "51dc711996cbf609b90cbe5b335bbce83143875a9d58e4b5c6d3c4f684d3dda7"
48+
sha256: "7d95cbbb1526ab5ae977df9b4cc660963b9b27f6d1075c0b34653868911385e4"
4949
url: "https://pub.dev"
5050
source: hosted
51-
version: "2.5.4"
51+
version: "3.0.0"
5252
build_config:
5353
dependency: transitive
5454
description:
@@ -69,26 +69,26 @@ packages:
6969
dependency: transitive
7070
description:
7171
name: build_resolvers
72-
sha256: ee4257b3f20c0c90e72ed2b57ad637f694ccba48839a821e87db762548c22a62
72+
sha256: "38c9c339333a09b090a638849a4c56e70a404c6bdd3b511493addfbc113b60c2"
7373
url: "https://pub.dev"
7474
source: hosted
75-
version: "2.5.4"
75+
version: "3.0.0"
7676
build_runner:
7777
dependency: "direct dev"
7878
description:
7979
name: build_runner
80-
sha256: "382a4d649addbfb7ba71a3631df0ec6a45d5ab9b098638144faf27f02778eb53"
80+
sha256: b971d4a1c789eba7be3e6fe6ce5e5b50fd3719e3cb485b3fad6d04358304351d
8181
url: "https://pub.dev"
8282
source: hosted
83-
version: "2.5.4"
83+
version: "2.6.0"
8484
build_runner_core:
8585
dependency: transitive
8686
description:
8787
name: build_runner_core
88-
sha256: "85fbbb1036d576d966332a3f5ce83f2ce66a40bea1a94ad2d5fc29a19a0d3792"
88+
sha256: c04e612ca801cd0928ccdb891c263a2b1391cb27940a5ea5afcf9ba894de5d62
8989
url: "https://pub.dev"
9090
source: hosted
91-
version: "9.1.2"
91+
version: "9.2.0"
9292
built_collection:
9393
dependency: transitive
9494
description:
@@ -293,10 +293,10 @@ packages:
293293
dependency: "direct dev"
294294
description:
295295
name: mockito
296-
sha256: "4546eac99e8967ea91bae633d2ca7698181d008e95fa4627330cf903d573277a"
296+
sha256: "2314cbe9165bcd16106513df9cf3c3224713087f09723b128928dc11a4379f99"
297297
url: "https://pub.dev"
298298
source: hosted
299-
version: "5.4.6"
299+
version: "5.5.0"
300300
node_preamble:
301301
dependency: transitive
302302
description:
@@ -381,10 +381,10 @@ packages:
381381
dependency: transitive
382382
description:
383383
name: source_gen
384-
sha256: "35c8150ece9e8c8d263337a265153c3329667640850b9304861faea59fc98f6b"
384+
sha256: fc787b1f89ceac9580c3616f899c9a447413cbdac1df071302127764c023a134
385385
url: "https://pub.dev"
386386
source: hosted
387-
version: "2.0.0"
387+
version: "3.0.0"
388388
source_map_stack_trace:
389389
dependency: transitive
390390
description:

test/sourcemaps/sourcemap_api_test.dart

Lines changed: 16 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -13,32 +13,28 @@ void main() {
1313
group('SourcemapApi', () {
1414
late MockClient mockClient;
1515
late SourcemapApi sourcemapApi;
16+
late File testFile;
1617

1718
setUp(() {
1819
mockClient = MockClient();
1920
sourcemapApi = SourcemapApi(httpClient: mockClient);
21+
// Create a temporary test file
22+
testFile = File('test_sourcemap.js.map');
23+
testFile.writeAsStringSync('{"version": 3, "sources": ["test.js"]}');
2024
});
2125

22-
group('uploadSourcemap', () {
23-
late File testFile;
24-
25-
setUpAll(() {
26-
// Create a temporary test file
27-
testFile = File('test_sourcemap.js.map');
28-
testFile.writeAsStringSync('{"version": 3, "sources": ["test.js"]}');
29-
});
30-
31-
tearDownAll(() {
32-
// Clean up the test file after all tests
33-
try {
34-
if (testFile.existsSync()) {
35-
testFile.deleteSync();
36-
}
37-
} catch (e) {
38-
// Ignore if the file cannot be deleted
26+
tearDown(() {
27+
// Clean up the test file after all tests
28+
try {
29+
if (testFile.existsSync()) {
30+
testFile.deleteSync();
3931
}
40-
});
32+
} catch (e) {
33+
// Ignore if the file cannot be deleted
34+
}
35+
});
4136

37+
group('uploadSourcemap', () {
4238
test('returns true when upload is successful (200)', () async {
4339
final response = http.StreamedResponse(
4440
Stream.value([]),
@@ -50,7 +46,7 @@ void main() {
5046
final result = await sourcemapApi.uploadSourcemap(
5147
appId: 'test-app-id',
5248
token: 'test-token',
53-
path: 'test_sourcemap.js.map',
49+
path: testFile.path,
5450
uri: 'https://example.com/app.js',
5551
);
5652

@@ -69,7 +65,7 @@ void main() {
6965
final result = await sourcemapApi.uploadSourcemap(
7066
appId: 'test-app-id',
7167
token: 'test-token',
72-
path: 'test_sourcemap.js.map',
68+
path: testFile.path,
7369
uri: 'https://example.com/app.js',
7470
);
7571

test/sourcemaps/sourcemap_command_test.dart

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,18 +12,29 @@ void main() {
1212
group('SourcemapCommand', () {
1313
late MockSourcemapApi mockApi;
1414
late SourcemapCommand command;
15+
late File testFile;
1516

1617
setUp(() {
1718
mockApi = MockSourcemapApi();
1819
command = SourcemapCommand(api: mockApi);
20+
// Create a temporary test file
21+
testFile = File('test_sourcemap.js.map');
22+
testFile.writeAsStringSync('{"version": 3, "sources": ["test.js"]}');
23+
});
24+
25+
tearDown(() {
26+
// Clean up the test file after all tests
27+
try {
28+
if (testFile.existsSync()) {
29+
testFile.deleteSync();
30+
}
31+
} catch (e) {
32+
// Ignore if the file cannot be deleted
33+
}
1934
});
2035

2136
group('run', () {
2237
test('handles single file upload (platform null)', () async {
23-
// Create a temporary test file
24-
final testFile = File('test_sourcemap.js.map');
25-
testFile.writeAsStringSync('{"version": 3, "sources": ["test.js"]}');
26-
2738
when(mockApi.uploadSourcemap(
2839
appId: anyNamed('appId'),
2940
token: anyNamed('token'),
@@ -39,7 +50,7 @@ void main() {
3950
'--app-id=test-app-id',
4051
'--token=test-token',
4152
'--uri=http://test.com/app.js',
42-
'--input-map=test_sourcemap.js.map'
53+
'--input-map=${testFile.path}',
4354
]);
4455

4556
final result = await command.run(
@@ -51,12 +62,9 @@ void main() {
5162
verify(mockApi.uploadSourcemap(
5263
appId: 'test-app-id',
5364
token: 'test-token',
54-
path: 'test_sourcemap.js.map',
65+
path: testFile.path,
5566
uri: 'http://test.com/app.js',
5667
)).called(1);
57-
58-
// Clean up
59-
testFile.deleteSync();
6068
});
6169

6270
test('handles flutter platform upload', () async {

0 commit comments

Comments
 (0)