Skip to content

fix: Add support for Dart 3.6, 3.7; remove support for Dart 3.2, 3.3, 3.4, 3.5, 3.3 #1040

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 20 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
af97557
fix: Add support for Dart 3.6, 3.7; remove support for Dart 3.2, 3.3,…
mbfakourii Apr 19, 2025
fea6653
fix: Downgrade sembast_web to 2.4.0+4
mbfakourii Apr 19, 2025
2531017
fix: Downgrade sembast to 3.8.3
mbfakourii Apr 19, 2025
a4a79da
feat: Add analyzer 7.3.0 as a dev dependency
mbfakourii Apr 19, 2025
7dc1b6f
feat: Migrate mockito to 5.4.5 (#1152)
mbfakourii Apr 19, 2025
340dc1c
feat: Fix mocks generation in dart package
mbfakourii Apr 19, 2025
196566d
feat: Use `package:web` instead of `dart:html` for web support (#1036)
mbfakourii Apr 19, 2025
0586005
feat: Use `package:web` instead of `dart:html` for web support (#1036)
mbfakourii Apr 19, 2025
a129f0b
ci: Add formatting check and exclude mocks from analysis
mbfakourii Apr 19, 2025
9427310
ci: Update formatting command to show output during analysis
mbfakourii Apr 19, 2025
602275f
ci: Enhance formatting command to display changed files during analysis
mbfakourii Apr 19, 2025
7bd6dec
ci: Enhance formatting command to display changed files during analysis
mbfakourii Apr 19, 2025
643474b
ci: Fix linting in CI workflow for dart package
mbfakourii Apr 19, 2025
0eea0c8
ci: Add linting step for Bug mocks in CI workflow
mbfakourii Apr 19, 2025
e1a7169
ci: Add linting step for Bug mocks in CI workflow
mbfakourii Apr 19, 2025
963e3d5
ci: Fix rollback logic for uncommitted changes in CI workflow
mbfakourii Apr 19, 2025
58acb4d
ci: Simplify rollback logic for uncommitted changes in CI workflow
mbfakourii Apr 19, 2025
3e8c8bf
ci: Simplify rollback logic for uncommitted changes in CI workflow
mbfakourii Apr 19, 2025
0ceed6c
ci: Simplify rollback logic for uncommitted changes in CI workflow
mbfakourii Apr 19, 2025
36eadaf
ci: Revert uncommitted changes in dart package tests
mbfakourii Apr 19, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 13 additions & 14 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,25 +16,19 @@ jobs:
include:
# Dart framework may contain breaking changes in minor version releases, not following semver.
# The latest Dart framework (below) is tested on all architectures (Ubuntu, macOS, Windows).
- name: Dart 3.5, Ubuntu
- name: Dart 3.7, Ubuntu
os: ubuntu-latest
sdk: 3.5.3
- name: Dart 3.5, macOS
sdk: 3.7.3
- name: Dart 3.7, macOS
os: macos-latest
sdk: 3.5.3
- name: Dart 3.5, Windows
sdk: 3.7.3
- name: Dart 3.7, Windows
os: windows-latest
sdk: 3.5.3
sdk: 3.7.3
# Older Dart framework versions (below) are only tested with Ubuntu to reduce CI resource usage.
- name: Dart 3.4
- name: Dart 3.6
os: ubuntu-latest
sdk: 3.4.4
- name: Dart 3.3
os: ubuntu-latest
sdk: 3.3.4
- name: Dart 3.2
os: ubuntu-latest
sdk: 3.2.6
sdk: 3.6.2
- name: Dart beta
os: ubuntu-latest
sdk: beta
Expand All @@ -53,8 +47,13 @@ jobs:
run: (cd packages/dart && dart run build_runner build --delete-conflicting-outputs)
- name: Analyze code
run: dart analyze packages/dart --fatal-infos
- name: Lint For Fix Bug mocks
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's this?

run: dart format packages/dart/test/src
- name: Lint
run: dart format --output=none --set-exit-if-changed packages/dart
- name: Rollback uncommitted changes for Fix Bug mocks
run: |
git checkout HEAD .
- name: Publish dry run
run: cd packages/dart && dart pub publish --dry-run
- name: Run tests
Expand Down
14 changes: 6 additions & 8 deletions packages/dart/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,12 @@ This library gives you access to the powerful Parse Server backend from your Dar

## Compatibility

The Parse Dart SDK is continuously tested with the most recent release of the Dart framework to ensure compatibility. To give developers time to upgrade their app to a newer Dart framework, previous Dart framework releases are supported for at least 1 year after the [release date](https://dart.dev/get-dart/archive) of the next higher significant version.

| Version | Latest Version | End of Support | Compatible |
|-----------|----------------|----------------|------------|
| Dart 3.2 | 3.2.6 | Jan 2025 | ✅ Yes |
| Dart 3.3 | 3.3.4 | Apr 2025 | ✅ Yes |
| Dart 3.4 | 3.4.4 | Jun 2025 | ✅ Yes |
| Dart 3.5 | 3.5.3 | Sep 2025 | ✅ Yes |
The Parse Dart SDK is continuously tested with the most recent release of the Dart framework to ensure compatibility. To give developers time to upgrade their app to a newer Dart framework, previous Dart framework releases are supported for at least 6 month after the [release date](https://dart.dev/get-dart/archive) of the next higher significant version.

| Version | Latest Version | Release Date | End of Support | Compatible |
|----------|----------------|--------------|----------------|------------|
| Dart 3.6 | 3.6.2 | Jan 2025 | Jun 2025 | ✅ Yes |
| Dart 3.7 | 3.7.3 | Apr 2025 | Sep 2025 | ✅ Yes |

## Getting Started

Expand Down
4 changes: 0 additions & 4 deletions packages/dart/lib/parse_server_sdk.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
// ignore_for_file: unnecessary_import
library flutter_parse_sdk;

import 'dart:async';
import 'dart:convert';
import 'dart:math';
Expand All @@ -12,7 +9,6 @@ import 'package:dio/dio.dart';
import 'package:meta/meta.dart';
import 'package:mime/mime.dart';
import 'package:path/path.dart' as path;
import 'package:sembast/sembast.dart';
import 'package:sembast/sembast_io.dart';
import 'package:sembast_web/sembast_web.dart';
import 'package:timezone/data/latest.dart' as tz;
Expand Down
6 changes: 3 additions & 3 deletions packages/dart/lib/src/network/parse_websocket_html.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/// If you change this file, you should apply the same changes to the 'parse_websocket_io.dart' file
library;

import 'dart:html' as html;
import 'package:web/web.dart' as web;

import 'package:web_socket_channel/html.dart';
import 'package:web_socket_channel/web_socket_channel.dart';
Expand All @@ -14,10 +14,10 @@ class WebSocket {
static const int closing = 2;
static const int closed = 3;

final html.WebSocket _webSocket;
final web.WebSocket _webSocket;

static Future<WebSocket> connect(String liveQueryURL) async {
final html.WebSocket webSocket = html.WebSocket(liveQueryURL);
final web.WebSocket webSocket = web.WebSocket(liveQueryURL);
await webSocket.onOpen.first;
return WebSocket._(webSocket);
}
Expand Down
2 changes: 1 addition & 1 deletion packages/dart/lib/src/objects/parse_installation.dart
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ class ParseInstallation extends ParseObject {
await save();
}

///Returns an <List<String>> containing all the channel names this device is subscribed to.
///Returns an List containing all the channel names this device is subscribed to.
Future<List<dynamic>> getSubscribedChannels() async {
print('getSubscribedChannels');
final ParseResponse apiResponse =
Expand Down
34 changes: 19 additions & 15 deletions packages/dart/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,36 +18,40 @@ topics:
- backend

environment:
sdk: ">=3.2.6 <4.0.0"
sdk: ^3.6.2
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm unsure whether removing the upper bound is a good idea, but since even minor versions changes can be breaking, let's try.


dependencies:
# Networking
dio: ^5.7.0
http: ^1.2.0
web_socket_channel: ^2.4.3
dio: ^5.8.0+1
http: ^1.3.0
web_socket_channel: ^3.0.3

#Database
sembast: ^3.6.0
sembast_web: ^2.2.0
sembast: ^3.8.3
sembast_web: ^2.4.0+4

# Utils
uuid: ^4.5.1
meta: ^1.16.0
path: ^1.9.0
mime: ^1.0.0
timezone: ^0.9.4
path: ^1.9.1
mime: ^2.0.0
timezone: ^0.10.0
universal_io: ^2.2.2
xxtea: ^2.1.0
collection: ^1.18.0
cross_file: ^0.3.3+8
collection: ^1.19.1
cross_file: ^0.3.4+2
web: ^1.1.1

dev_dependencies:
lints: ^4.0.0
lints: ^5.1.1

# Testing
build_runner: ^2.4.9
mockito: ^5.4.4
test: ^1.25.7
build_runner: ^2.4.15
mockito: ^5.4.5
test: ^1.25.15

# For bug https://github.com/dart-lang/mockito/issues/810
analyzer: 7.3.0

screenshots:
- description: Parse Platform logo.
Expand Down
103 changes: 0 additions & 103 deletions packages/dart/test/parse_query_test.mocks.dart

This file was deleted.

2 changes: 1 addition & 1 deletion packages/dart/test/src/network/parse_query_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import 'package:mockito/mockito.dart';
import 'package:parse_server_sdk/parse_server_sdk.dart';
import 'package:test/test.dart';

import '../../parse_query_test.mocks.dart';
import '../../test_utils.dart';
import '../objects/parse_object/parse_object_test.mocks.dart';

@GenerateMocks([ParseClient])
void main() {
Expand Down
Loading