Skip to content

Commit e154603

Browse files
committed
Merge remote-tracking branch 'upstream/master' into pc_server
2 parents 73aef09 + 5ab3974 commit e154603

File tree

16 files changed

+146
-42
lines changed

16 files changed

+146
-42
lines changed

.github/workflows/ci.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ jobs:
6767
dart pub global activate coverage
6868
dart pub global run coverage:format_coverage -i coverage/test -o coverage/lcov.info --lcov --packages=.dart_tool/package_config.json --report-on=lib
6969
- name: Upload code coverage
70-
uses: codecov/codecov-action@v4
70+
uses: codecov/codecov-action@v5
7171
# Needs to be adapted to collect the coverage at all platforms if platform specific code is added.
7272
if: ${{ always() && matrix.os == 'ubuntu-latest' }}
7373
with:
@@ -134,7 +134,7 @@ jobs:
134134
escapedPath="$(echo `pwd` | sed 's/\//\\\//g')"
135135
sed "s/^SF:lib/SF:$escapedPath\/lib/g" coverage/lcov.info > coverage/lcov-full.info
136136
- name: Upload code coverage
137-
uses: codecov/codecov-action@v4
137+
uses: codecov/codecov-action@v5
138138
# Needs to be adapted to collect the coverage at all platforms if platform specific code is added.
139139
if: ${{ always() && matrix.os == 'ubuntu-latest' }}
140140
with:
@@ -151,7 +151,7 @@ jobs:
151151
with:
152152
fetch-depth: 0 # Required for semantic-release to analyze commit history
153153
- name: Setup Node.js
154-
uses: actions/setup-node@v4
154+
uses: actions/setup-node@v6
155155
with:
156156
node-version: 24
157157
- name: Install dependencies

.github/workflows/dependency-audit.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ jobs:
8282
if: failure()
8383
steps:
8484
- name: Create issue for security vulnerabilities
85-
uses: actions/github-script@v7
85+
uses: actions/github-script@v8
8686
with:
8787
script: |
8888
const title = '[Security] Dependency vulnerabilities detected';

.github/workflows/release-automated.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,6 @@ on:
1010
branches:
1111
- master
1212
- next-major
13-
tags:
14-
- "dart-[0-9]+.[0-9]+.[0-9]+*"
15-
- "flutter-[0-9]+.[0-9]+.[0-9]+*"
1613
env:
1714
package: ${{ startsWith(github.ref_name, 'dart-') && 'dart' || startsWith(github.ref_name, 'flutter-') && 'flutter' || '' }}
1815
jobs:
@@ -31,7 +28,7 @@ jobs:
3128
fetch-depth: 0
3229
token: ${{ secrets.RELEASE_GITHUB_TOKEN }}
3330
- name: Setup Node.js
34-
uses: actions/setup-node@v4
31+
uses: actions/setup-node@v6
3532
with:
3633
node-version: 24
3734
cache: 'npm'
@@ -41,6 +38,8 @@ jobs:
4138
run: |
4239
git config --global user.name "github-actions[bot]"
4340
git config --global user.email "github-actions[bot]@users.noreply.github.com"
41+
git config --global credential.helper store
42+
echo "https://x-access-token:${{ secrets.RELEASE_GITHUB_TOKEN }}@github.com" > ~/.git-credentials
4443
- name: Run semantic-release for dart package
4544
run: npx semantic-release
4645
working-directory: packages/dart

.github/workflows/release-manual-docs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ jobs:
3737
- name: Generate Docs
3838
run: dart doc ./packages/${{ env.package }}/ -o ./.api_docs/${{ env.package }}/
3939
- name: Deploy
40-
uses: peaceiris/actions-gh-pages@v3.7.3
40+
uses: peaceiris/actions-gh-pages@v4.0.0
4141
with:
4242
github_token: ${{ secrets.GITHUB_TOKEN }}
4343
publish_dir: ./.api_docs/${{ env.package }}/

.github/workflows/release-publish.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ name: release-publish
22
on:
33
push:
44
tags:
5-
- "dart-[0-9]+.[0-9]+.[0-9]+*"
6-
- "flutter-[0-9]+.[0-9]+.[0-9]+*"
5+
- "dart-*"
6+
- "flutter-*"
77
env:
88
package: ${{ startsWith(github.ref_name, 'dart-') && 'dart' || startsWith(github.ref_name, 'flutter-') && 'flutter' || '' }}
99
jobs:
@@ -88,7 +88,7 @@ jobs:
8888
- name: Generate Docs
8989
run: dart doc ./packages/dart/ -o ./.api_docs/dart/
9090
- name: Deploy
91-
uses: peaceiris/actions-gh-pages@v3.7.3
91+
uses: peaceiris/actions-gh-pages@v4.0.0
9292
with:
9393
github_token: ${{ secrets.GITHUB_TOKEN }}
9494
publish_dir: ./.api_docs/dart/
@@ -118,7 +118,7 @@ jobs:
118118
- name: Generate Docs
119119
run: dart doc ./packages/flutter/ -o ./.api_docs/flutter/
120120
- name: Deploy
121-
uses: peaceiris/actions-gh-pages@v3.7.3
121+
uses: peaceiris/actions-gh-pages@v4.0.0
122122
with:
123123
github_token: ${{ secrets.GITHUB_TOKEN }}
124124
publish_dir: ./.api_docs/flutter/

packages/dart/CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
# [dart-v9.4.1](https://github.com/parse-community/Parse-SDK-Flutter/compare/dart-9.4.0...dart-9.4.1) (2025-11-30)
2+
3+
4+
### Bug Fixes
5+
6+
* `ParseGeoPoint` longitude validation checks wrong variable ([#1089](https://github.com/parse-community/Parse-SDK-Flutter/issues/1089)) ([6b9ef6b](https://github.com/parse-community/Parse-SDK-Flutter/commit/6b9ef6b034741f6f829af3b7edf990f9915fb7fb))
7+
18
# [9.4.0](https://github.com/parse-community/Parse-SDK-Flutter/compare/dart-9.3.0...dart-9.4.0) (2025-11-29)
29

310

packages/dart/README.md

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ This library gives you access to the powerful Parse Server backend from your Dar
2020
---
2121

2222
- [Compatibility](#compatibility)
23-
- [Currently Supported Versions](#currently-supported-versions)
2423
- [Handling Version Conflicts](#handling-version-conflicts)
2524
- [Getting Started](#getting-started)
2625
- [Documentation](#documentation)
@@ -35,15 +34,6 @@ The Parse Dart SDK is continuously tested with the most recent release of the Da
3534
> [!Note]
3635
> Support windows are calculated from official Dart release dates. When a version's support period expires, it will be dropped in the next Parse SDK major release without advance notice. For full details, see [VERSIONING_POLICY.md](../../VERSIONING_POLICY.md).
3736
38-
### Currently Supported Versions
39-
40-
| Version | Latest Version | End of Support | Compatible |
41-
|-----------|----------------|----------------|------------|
42-
| Dart 3.2 | 3.2.6 | Jan 2025 | ✅ Yes |
43-
| Dart 3.3 | 3.3.4 | Apr 2025 | ✅ Yes |
44-
| Dart 3.4 | 3.4.4 | Jun 2025 | ✅ Yes |
45-
| Dart 3.5 | 3.5.3 | Sep 2025 | ✅ Yes |
46-
4737
### Handling Version Conflicts
4838

4939
If you encounter version conflicts with the Parse SDK:

packages/dart/lib/src/objects/parse_geo_point.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@ class ParseGeoPoint {
1212
'Latitude must be within the range (-90.0, 90.0).',
1313
),
1414
assert(
15-
latitude < 180,
15+
longitude < 180,
1616
'Longitude must be within the range (-180.0, 180.0).',
1717
),
1818
assert(
19-
latitude > -180,
19+
longitude > -180,
2020
'Longitude must be within the range (-180.0, 180.0).',
2121
);
2222

packages/dart/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: parse_server_sdk
22
description: The Dart SDK to connect to Parse Server. Build your apps faster with Parse Platform, the complete application stack.
3-
version: 9.4.0
3+
version: 9.4.1
44
homepage: https://parseplatform.org
55
repository: https://github.com/parse-community/Parse-SDK-Flutter
66
issue_tracker: https://github.com/parse-community/Parse-SDK-Flutter/issues
Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
import 'package:parse_server_sdk/parse_server_sdk.dart';
2+
import 'package:test/test.dart';
3+
4+
import '../../test_utils.dart';
5+
6+
void main() {
7+
setUpAll(() async {
8+
await initializeParse();
9+
});
10+
11+
group('ParseGeoPoint', () {
12+
group('constructor validation', () {
13+
test('should create a valid GeoPoint with default values', () {
14+
final geoPoint = ParseGeoPoint();
15+
expect(geoPoint.latitude, equals(0.0));
16+
expect(geoPoint.longitude, equals(0.0));
17+
});
18+
19+
test('should create a valid GeoPoint with valid coordinates', () {
20+
final geoPoint = ParseGeoPoint(latitude: 40.0, longitude: -74.0);
21+
expect(geoPoint.latitude, equals(40.0));
22+
expect(geoPoint.longitude, equals(-74.0));
23+
});
24+
25+
test('should create a valid GeoPoint with edge case values', () {
26+
// Test boundary values that should be valid (exclusive bounds)
27+
final geoPoint1 = ParseGeoPoint(latitude: 89.999, longitude: 179.999);
28+
expect(geoPoint1.latitude, equals(89.999));
29+
expect(geoPoint1.longitude, equals(179.999));
30+
31+
final geoPoint2 = ParseGeoPoint(latitude: -89.999, longitude: -179.999);
32+
expect(geoPoint2.latitude, equals(-89.999));
33+
expect(geoPoint2.longitude, equals(-179.999));
34+
});
35+
36+
test('should throw assertion error for latitude >= 90', () {
37+
expect(
38+
() => ParseGeoPoint(latitude: 90.0, longitude: 0.0),
39+
throwsA(isA<AssertionError>()),
40+
);
41+
42+
expect(
43+
() => ParseGeoPoint(latitude: 100.0, longitude: 0.0),
44+
throwsA(isA<AssertionError>()),
45+
);
46+
});
47+
48+
test('should throw assertion error for latitude <= -90', () {
49+
expect(
50+
() => ParseGeoPoint(latitude: -90.0, longitude: 0.0),
51+
throwsA(isA<AssertionError>()),
52+
);
53+
54+
expect(
55+
() => ParseGeoPoint(latitude: -100.0, longitude: 0.0),
56+
throwsA(isA<AssertionError>()),
57+
);
58+
});
59+
60+
test('should throw assertion error for longitude >= 180', () {
61+
expect(
62+
() => ParseGeoPoint(latitude: 0.0, longitude: 180.0),
63+
throwsA(isA<AssertionError>()),
64+
);
65+
66+
expect(
67+
() => ParseGeoPoint(latitude: 0.0, longitude: 200.0),
68+
throwsA(isA<AssertionError>()),
69+
);
70+
});
71+
72+
test('should throw assertion error for longitude <= -180', () {
73+
expect(
74+
() => ParseGeoPoint(latitude: 0.0, longitude: -180.0),
75+
throwsA(isA<AssertionError>()),
76+
);
77+
78+
expect(
79+
() => ParseGeoPoint(latitude: 0.0, longitude: -200.0),
80+
throwsA(isA<AssertionError>()),
81+
);
82+
});
83+
});
84+
85+
group('toJson', () {
86+
test('should return correct JSON representation', () {
87+
final geoPoint = ParseGeoPoint(latitude: 40.0, longitude: -74.0);
88+
final json = geoPoint.toJson();
89+
90+
expect(json['__type'], equals('GeoPoint'));
91+
expect(json['latitude'], equals(40.0));
92+
expect(json['longitude'], equals(-74.0));
93+
});
94+
});
95+
96+
group('toString', () {
97+
test('should return correct string representation', () {
98+
final geoPoint = ParseGeoPoint(latitude: 40.0, longitude: -74.0);
99+
expect(geoPoint.toString(), equals('latitude: 40.0, longitude: -74.0'));
100+
});
101+
});
102+
});
103+
}

0 commit comments

Comments
 (0)