13 Commits

Author SHA1 Message Date
Charles Hu
7272a47c0b
Refactoring some import conditions (#298) 2023-10-25 15:11:37 -07:00
Tony Parker
85ddb1373c
Add SortDescriptor and SortComparator (#288)
* Port SortDescriptor and SortComparator to FoundationEssentials

rdar://116408260

* Update availability
2023-10-25 10:34:17 -07:00
Charles Hu
30bc5b99f2
Introduce Availability Macros for FoundationPreview (#279) 2023-10-04 14:44:37 -07:00
Tony Parker
b14c22bc84
Update availability to released OS versions (#271) 2023-09-26 12:52:12 -07:00
Tina Liu
3aa00e5c3e
Revert "Create FoundationInternals, an internal module to host shared files used by FoundationInternationalization and FoundationEssentials (#101)" (#115)
* Revert "Create FoundationInternals, an internal module to host shared files used by FoundationInternationalization and FoundationEssentials (#101)"

This reverts commit 8f08a649db1f3eb31593cdae7a30c5e95cb614a7.

* Reapply fb718cd3fb9f058a5fd6d736cec9c2b99d6f7dc6 fix to the other restored LockedState
2023-05-11 15:19:01 -07:00
Tina Liu
8f08a649db
Create FoundationInternals, an internal module to host shared files used by FoundationInternationalization and FoundationEssentials (#101)
* Create FoundationInternals, an internal module to host shared files used by FoundationInternationalization and FoundationEssentials

- Modules will access FoundationInternals types with `package import FoundationInternals`. This is currently an experimental feature of `AccessLevelOnImport`.
- Move `LockedState` to FoundationInternals and publicize functions needed by other modules.
2023-05-10 12:16:20 -07:00
Jeremy Schonfeld
1f99f94861
Top Level Coder Support for CodableWithConfiguration (#95)
* (107489425) JSON coder support for CodableWithConfiguration

* (107489425) Add availability

* (107489425) Move type constraints to where clause
2023-05-09 15:13:48 -07:00
Tony Parker
701c89647a
Fix fast-path for [Int] inserting a trailing comma (rdar://108386573) (#51)
* Add some links to known issues to TODOs

* Fix fast-path for [Int] inserting a trailing comma (rdar://108386573)
2023-04-23 11:32:07 -07:00
Tony Parker
d1cc2ea0a2
Add some links to known issues to TODOs (#47) 2023-04-18 14:53:06 -07:00
Charles Hu
9e0cf5c070
JSON Performance Improvements (#35)
* (rdar://106881898) JSONEncoder should only use references for JSON encoding tree

* (rdar://107967520) Initial opportunities for JSONEncoder performance optimization

---------

Co-authored-by: Kevin Perry <kperry@apple.com>
2023-04-18 11:03:30 -07:00
Charles Hu
c01e9dadee
rdar://107955097 (FoundationPreview: Batch move string API (continued)) (#34)
* rdar://107955097 (FoundationPreview: Batch move string API (continued))

- Move localized uppercase and lowercase to FoundationLocalization
- if-def out of CharacterSet from FoundationPreview. It's not implemented at all there, and having a no-op stub is misleading

* rdar://107955097 (FoundationPreview: Batch move string API (continued))

- Move components separated by string and range of string functions

* rdar://107955097 (FoundationPreview: Batch move string API (continued))

Enable snake case options for JSON encoder and decoder. We haven't been able to enable this option because it needed `CharacterSet`, which hasn't been properly implemented for FoundationPreview. Now that we have `BuiltInUnicodeScalarSet`, which mirrors `CharacterSet`, we can switch to that and enable the options.

* rdar://107955097 (FoundationPreview: Batch move string API (continued))

- Move `StringProtocol.lineRange(for:)` and `paragraphRange(for:)` to FoundationEssentials
- Rename String+Regex.swift to RegexPatternCache.swift
- Consolidate extensions on various String family members and remove one redundant swift file

---------

Co-authored-by: I-Ting Tina Liu <iting_liu@apple.com>
2023-04-17 18:23:51 -07:00
Charles Hu
e2c177e867 Rebased on top of the new String APIs 2023-03-29 09:56:22 -07:00
Charles Hu
34c45c169c rdar://107156343 (Move JSONEncoder to FoundationPreview) 2023-03-29 09:56:00 -07:00