Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
9 changes: 4 additions & 5 deletions .github/workflows/intl4x.yml
Original file line number Diff line number Diff line change
Expand Up @@ -146,10 +146,10 @@ jobs:
working-directory: pkgs/intl4x/example_native
if: matrix.os == 'macos-latest'
run: ./build/cli/macos_arm64/bundle/bin/example_native

- name: Print file size and check limit for example_native (Mac)
working-directory: pkgs/intl4x/example_native
# skip until https://github.com/dart-lang/i18n/issues/989 issue is resolved
if: matrix.os == 'macos-latest' && false
if: matrix.os == 'macos-latest'
run: |
FILE_PATH="build/cli/macos_arm64/bundle/lib/libintl4x.dylib"
FILE_SIZE=$(stat -f %z "$FILE_PATH")
Expand Down Expand Up @@ -236,10 +236,9 @@ jobs:

- name: Print file size and check limit for example_native (Mac)
working-directory: pkgs/intl4x/example_native
# skip until https://github.com/dart-lang/i18n/issues/989 issue is resolved
if: matrix.os == 'macos-latest' && false
if: matrix.os == 'macos-latest'
run: |
FILE_PATH="build/cli/macos_arm64/bundle/lib/example_native"
FILE_PATH="build/cli/macos_arm64/bundle/lib/libintl4x.dylib"
FILE_SIZE=$(stat -f %z "$FILE_PATH")
echo "macOS executable size: $FILE_SIZE bytes"
if [ "$FILE_SIZE" -gt 10485760 ]; then
Expand Down
1 change: 1 addition & 0 deletions pkgs/intl4x/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
- Removing `EcmaPolicy`, fixing Locale printing, and other small clean-ups.
- Update to `native_toolchain_c` v0.16.7.
- Make package compatible to run on Windows again.
- Update to `native_toolchain_c` v0.17.1.

## 0.12.2

Expand Down
2 changes: 1 addition & 1 deletion pkgs/intl4x/hook/link.dart
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ ${usedSymbols?.join('\n')}
input.config.code.targetOS == OS.windows
? const ['MSVCRT', 'ws2_32', 'userenv', 'ntdll']
: const [],
linkerOptions: LinkerOptions.treeshake(symbols: usedSymbols),
linkerOptions: LinkerOptions.treeshake(symbolsToKeep: usedSymbols),
).run(
input: input,
output: output,
Expand Down
2 changes: 1 addition & 1 deletion pkgs/intl4x/lib/case_mapping.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

import 'intl4x.dart';

export 'src/case_mapping/case_mapping.dart';
export 'src/case_mapping/case_mapping.dart' show CaseMapping;
export 'src/locale/locale.dart';

extension CaseMappingWithIntl4X on String {
Expand Down
3 changes: 2 additions & 1 deletion pkgs/intl4x/lib/intl4x.dart
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import 'case_mapping.dart';
import 'collation.dart';
import 'display_names.dart';
import 'number_format.dart';
import 'src/case_mapping/case_mapping.dart' show buildCaseMapping;
import 'src/case_mapping/case_mapping_impl.dart';
import 'src/collation/collation.dart';
import 'src/collation/collation_impl.dart';
Expand Down Expand Up @@ -50,7 +51,7 @@ class Intl {
: locale = locale ?? findSystemLocale();

CaseMapping get caseMapping =>
CaseMapping(CaseMappingImpl.build(locale, localeMatcher));
buildCaseMapping(CaseMappingImpl.build(locale, localeMatcher));

Collation collation([CollationOptions options = const CollationOptions()]) =>
buildCollation(CollationImpl.build(locale, options, localeMatcher));
Expand Down
5 changes: 4 additions & 1 deletion pkgs/intl4x/lib/src/case_mapping/case_mapping.dart
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import 'case_mapping_impl.dart';
class CaseMapping {
final CaseMappingImpl _caseMappingImpl;

const CaseMapping(this._caseMappingImpl);
const CaseMapping._(this._caseMappingImpl);

String toLowerCase(String input) {
if (isInTest) {
Expand All @@ -31,3 +31,6 @@ class CaseMapping {
}
}
}

CaseMapping buildCaseMapping(CaseMappingImpl collationImpl) =>
CaseMapping._(collationImpl);
4 changes: 2 additions & 2 deletions pkgs/intl4x/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ dependencies:
collection: ^1.19.1
crypto: ^3.0.6
ffi: ^2.1.4
hooks: ^0.19.5
hooks: ^0.20.0
logging: ^1.3.0
meta: ^1.17.0
native_toolchain_c: ^0.16.7
native_toolchain_c: ^0.17.1
path: ^1.9.1
record_use: ^0.4.1

Expand Down
Loading