mirror of
https://github.com/nim-lang/Nim.git
synced 2026-06-05 03:14:08 +00:00
clean up and clarify changelog [skip ci] (#20093)
This commit is contained in:
53
changelog.md
53
changelog.md
@@ -3,6 +3,20 @@
|
||||
|
||||
## Changes affecting backward compatibility
|
||||
|
||||
- `addr` is now available for all addressable locations,
|
||||
`unsafeAddr` is now deprecated and an alias for `addr`.
|
||||
|
||||
- `io` and `assertions` are about to move out of the `system` module.
|
||||
You may instead import `std/syncio` and `std/assertions`.
|
||||
The `-d:nimPreviewSlimSystem` option makes these imports required.
|
||||
|
||||
- The `gc:v2` option is removed.
|
||||
|
||||
- The `threads:on` option is now the default.
|
||||
|
||||
- Optional parameters in combination with `: body` syntax (RFC #405) are now opt-in via
|
||||
`experimental:flexibleOptionalParams`.
|
||||
|
||||
- The `Math.trunc` polyfill for targeting Internet Explorer was
|
||||
previously emitted for every JavaScript output file except if
|
||||
the symbol `nodejs` was defined via `-d:nodejs`. Now, it is only
|
||||
@@ -11,51 +25,38 @@
|
||||
or define your own `Math.trunc` polyfill using the [`emit` pragma](https://nim-lang.org/docs/manual.html#implementation-specific-pragmas-emit-pragma). Nim uses
|
||||
`Math.trunc` for the division and modulo operators for integers.
|
||||
|
||||
- Deprecated `std/sums`.
|
||||
|
||||
- Optional parameters in combination with `: body` syntax (RFC #405) are now opt-in via
|
||||
`experimental:flexibleOptionalParams`.
|
||||
|
||||
- `std/sharedstrings` module is removed.
|
||||
- Constants `colors.colPaleVioletRed` and `colors.colMediumPurple` changed to match the CSS color standard.
|
||||
|
||||
- `addr` is now available for all addressable locations, `unsafeAddr` is deprecated and
|
||||
becomes an alias for `addr`.
|
||||
|
||||
- `io` and `assertions` are about to move out of system; use `-d:nimPreviewSlimSystem`, import `std/syncio` and import `std/assertions`.
|
||||
|
||||
- The `gc:v2` option is removed.
|
||||
|
||||
- The `threads:on` option becomes the default.
|
||||
|
||||
## Standard library additions and changes
|
||||
|
||||
[//]: # "Changes:"
|
||||
- `macros.parseExpr` and `macros.parseStmt` now accept an optional.
|
||||
- `macros.parseExpr` and `macros.parseStmt` now accept an optional
|
||||
filename argument for more informative errors.
|
||||
- Module `colors` expanded with missing colors from the CSS color standard.
|
||||
`colPaleVioletRed` and `colMediumPurple` have also been changed to match the CSS color standard.
|
||||
- Fixed `lists.SinglyLinkedList` being broken after removing the last node ([#19353](https://github.com/nim-lang/Nim/pull/19353)).
|
||||
- `md5` now works at compile time and in JavaScript.
|
||||
- `std/smtp` sends `ehlo` first. If the mail server does not understand, it sends `helo` as a fallback.
|
||||
- Changed mimedb to use an `OrderedTable` instead of `OrderedTableRef`, to use it in a const.
|
||||
- Changed `mimedb` to use an `OrderedTable` instead of `OrderedTableRef` to support `const` tables.
|
||||
- `strutils.find` now use and default to `last=-1` for whole string searches, making limiting it to just the first char (`last=0`) valid.
|
||||
- `random.rand` now works with `Ordinal`s.
|
||||
|
||||
[//]: # "Additions:"
|
||||
- Added `IsoWeekRange`, a range type to represent the number of weeks in an ISO week-based year.
|
||||
- Added `IsoYear`, a distinct int type to prevent bugs from confusing the week-based year and the regular year.
|
||||
- Added `initDateTime` in `times` to create a datetime from a weekday, and ISO 8601 week number and week-based year.
|
||||
- Added `getIsoWeekAndYear` in `times` to get an ISO week number along with the corresponding ISO week-based year from a datetime.
|
||||
- Added `getIsoWeeksInYear` in `times` to return the number of weeks in an ISO week-based year.
|
||||
- Added `times.IsoWeekRange`, a range type to represent the number of weeks in an ISO week-based year.
|
||||
- Added `times.IsoYear`, a distinct int type to prevent bugs from confusing the week-based year and the regular year.
|
||||
- Added `times.initDateTime` to create a datetime from a weekday, and ISO 8601 week number and week-based year.
|
||||
- Added `times.getIsoWeekAndYear` to get an ISO week number along with the corresponding ISO week-based year from a datetime.
|
||||
- Added `times.getIsoWeeksInYear` to return the number of weeks in an ISO week-based year.
|
||||
- Added `std/oserrors` for OS error reporting. Added `std/envvars` for environment variables handling.
|
||||
- Added `sep` parameter in `std/uri` to specify the query separator.
|
||||
- Added [`Array.shift`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/shift) for JavaScript targets.
|
||||
- Added [`queueMicrotask`](https://developer.mozilla.org/en-US/docs/Web/API/queueMicrotask) for JavaScript targets.
|
||||
- Added bindings to [`Array.shift`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/shift)
|
||||
and [`queueMicrotask`](https://developer.mozilla.org/en-US/docs/Web/API/queueMicrotask)
|
||||
in `jscore` for JavaScript targets.
|
||||
|
||||
[//]: # "Deprecations:"
|
||||
- Deprecated `selfExe` for Nimscript.
|
||||
- Deprecated `std/sums`.
|
||||
|
||||
[//]: # "Removals:"
|
||||
- Removed deprecated `std/sharedstrings`.
|
||||
- Removed deprecated `oids.oidToString`.
|
||||
- Removed define `nimExperimentalAsyncjsThen` for `std/asyncjs.then` and `std/jsfetch`.
|
||||
- Removed deprecated `jsre.test` and `jsre.toString`.
|
||||
|
||||
Reference in New Issue
Block a user