flywind
171b03c386
fix #17264 [backport:1.4] ( #17266 )
...
* fix #17264
* fix vm
* fix js and add tests
2021-03-05 14:39:46 +01:00
konsumlamm
2e8325a19c
Remove support for named procs with sugar.=> ( #17220 )
...
* Add docs & tests for named procs with sugar.=>
* Remove support for named procs in sugar.=>
* Resolve conflict
* Fix test
2021-03-05 12:08:03 +01:00
Andreas Rumpf
8f1fa3e5b0
IC: further progress ( #17150 )
...
* IC: respect the -f switch
* IC: better rod file inspection
* progress
2021-03-05 09:58:55 +01:00
flywind
cda443ee68
follow up #17165 ( #17262 )
2021-03-04 22:41:20 -08:00
Jason Beetham
f28dc2c61e
Added assertion to clamp ( #17248 )
...
Co-authored-by: flywind <xzsflywind@gmail.com >
2021-03-04 17:27:02 -08:00
flywind
81889fb84c
reuse jsffi in json module ( #17165 )
...
* remove unnecessary when statement
* remove outdated codes
* reuse jsffi
* move js json coverage
2021-03-04 19:37:12 +01:00
Juan Carlos
2e3d324cc6
Improve Bigint ( #17252 )
...
* https://github.com/timotheecour/Nim/issues/566#issue-799927295
* Update lib/std/jsbigints.nim
Co-authored-by: flywind <xzsflywind@gmail.com >
* Update lib/std/jsbigints.nim
Co-authored-by: flywind <xzsflywind@gmail.com >
Co-authored-by: flywind <xzsflywind@gmail.com >
2021-03-04 14:02:36 +01:00
Timothee Cour
a66637bda4
followup #16871 asyncjs.then: allow pipelining procs returning futures ( #17189 )
...
* followup #16871 asyncjs.then: allow pipelining procs returning futures
* rename test files where they belong
* fix tests
* tests for then with `onReject` callback
* rename test file containing fail to avoid messing with grep
* address comments
* cleanup
* un-disable 1 test
2021-03-04 14:00:04 +01:00
flywind
5670b848cb
use .. warning:: ( #17226 )
...
* remove unnecessary when statement
* remove outdated codes
* use warnings
2021-03-04 11:34:55 +01:00
Jason Beetham
c180de60a8
Added math.clamp for slice clamping ( #17246 )
...
* Added math.clamp for slice clamping
* Added inline to math.clamp
* Cleaned up math.clamp + test
2021-03-03 23:54:23 +00:00
Timothee Cour
f561afae41
followup #17225 : simplify code after removing gc2, generational ( #17242 )
2021-03-03 13:37:42 +01:00
Juan Carlos
4982d1c662
https://github.com/nim-lang/Nim/pull/15826/files#r585368355 ( #17233 )
2021-03-03 11:58:05 +01:00
flywind
ec068a2687
fix #17177 ( #17243 )
...
* remove unnecessary when statement
* remove outdated codes
* fix #17177
* add testcase
2021-03-03 11:57:34 +01:00
Timothee Cour
e417bd62f7
\r now renders as \r, not \c which was not standard ( #17244 )
2021-03-03 11:57:00 +01:00
Clyybber
507873be25
Use readable escape sequences ( #17241 )
2021-03-03 07:15:07 +01:00
flywind
a04c9d1f62
rename prepareStrMutation to prepareMutation ( #17235 )
...
* remove unnecessary when statement
* remove outdated codes
* rename prepareStrMutation to prepareMutation
2021-03-03 08:08:52 +08:00
Andrey Makarov
02f4464058
RST heading improvements ( fix #17091 ) ( #17195 )
2021-03-02 16:41:10 +01:00
PMunch
349bdafc1b
Simple fix to make the linenoise wrapper do the right thing ( #17234 )
2021-03-02 12:52:35 +01:00
flywind
dfa0a6b4a6
add runnableExamples for prepareStrMutation ( #17227 )
...
* Update lib/system.nim
Co-authored-by: Timothee Cour <timothee.cour2@gmail.com >
2021-03-02 12:52:07 +01:00
Danil Yarantsev
f5a63ade7a
Replace double backticks with single backticks - Part 5 out of ~8 ( #17217 )
...
Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com >
2021-03-01 18:11:25 -08:00
Danil Yarantsev
285539c87a
Replace double backticks with single backticks - Part 4 out of ~7 ( #17216 )
2021-03-01 18:00:58 -08:00
Timothee Cour
6c5872c169
--nilseqs is now a deprecated noop (#17211 )
...
* --nilseqs is now a deprecated noop
* fix tests; fix: future => sugar
2021-03-01 20:59:43 +01:00
Andreas Rumpf
bb0c19f42c
fixes #17173 ( #17213 )
...
* fixes #17173
* add testcase (#17214 )
* Apply suggestions from code review
* fix for newruntime
* Apply suggestions from code review
* Update lib/system.nim
* Update lib/system.nim
* Update lib/system.nim
Co-authored-by: Danil Yarantsev <tiberiumk12@gmail.com >
Co-authored-by: flywind <xzsflywind@gmail.com >
Co-authored-by: Danil Yarantsev <tiberiumk12@gmail.com >
2021-03-01 20:58:12 +01:00
Timothee Cour
0cb02fbbee
add overload add(a: var string, b: openArray[char]) ( #15951 )
...
Co-authored-by: Andreas Rumpf <rumpf_a@web.de >
2021-03-01 07:51:12 -08:00
Timothee Cour
dd6b0f81ef
use -r:off for runnableExamples that should compile but not run ( #17203 )
...
* use -r:off for runnableExamples that should compile but not run
* use -r:off in other RT disabled tests
2021-03-01 14:26:39 +01:00
Danil Yarantsev
aef55a7a88
Replace double backticks with single backticks - Part 3 out of ~7 ( #17207 )
2021-02-28 23:22:05 -08:00
Danil Yarantsev
82d8e9bff3
Replace double backticks with single backticks - Part 2 out of ~6 ( #17206 )
2021-02-28 23:15:26 -08:00
Danil Yarantsev
ac8166ab3d
Replace double backticks with single backticks - Part 1 out of ~6 ( #17205 )
2021-02-28 23:08:12 -08:00
Danil Yarantsev
56461c280f
Change stdlib imports to use std prefix in most examples ( #17202 )
2021-02-28 13:17:19 -08:00
flywind
60ec3e2417
add warnings to std/sysrand ( #17191 )
...
* remove unnecessary when statement
* remove outdated codes
* add warnings to std/sysrand
* Update lib/std/sysrand.nim
Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com >
Co-authored-by: Timothee Cour <timothee.cour2@gmail.com >
Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com >
2021-02-26 20:06:20 +01:00
Timothee Cour
ff3ace2232
fix code-block test bugs: fix #17183 , fix https://github.com/timotheecour/Nim/issues/620 ( #17184 )
...
* fix code-block test bugs: fix #17183 , fix https://github.com/timotheecour/Nim/issues/620
* cleanup
2021-02-26 16:05:20 +01:00
zetashift
c7d6e4c6a6
Fix unicode.split with seperators examples ( #17176 )
...
* Fix unicode.split with seperators examples
https://nim-lang.org/docs/unicode.html#split.i%2Cstring%2CRune%2Cint didn't work with the set constructor `{}` so replaced it with a string that's converted to an openArray compatible type containing `Rune`s.
* Add runnableExamples to unicode.split
* Add runnableExamples to split with single separator too
* Simplify runnableExamples unicode.split
* Improve the rest of the runnableExamples with the simplified code
* Simplify runnableExamples of unicode.split even more
* Formatted unicode.split example
* Update lib/pure/unicode.nim
Co-authored-by: zetashift <rishi2@laptop.localdomain >
Co-authored-by: Timothee Cour <timothee.cour2@gmail.com >
2021-02-26 15:08:48 +01:00
Timothee Cour
63f1c38f4e
hashes: support object default hash ( #17175 )
2021-02-26 08:45:37 +01:00
Timothee Cour
4a31088ac2
improve docs for sugar.collect ( #17188 )
2021-02-26 08:43:32 +01:00
Timothee Cour
b725e0ed4d
make jsconsole.assertion errors less confusing in logs ( #17179 )
...
* make jsconsole.assertion errors less confusing in logs
* address comments
* fixup
2021-02-25 14:02:00 +01:00
flywind
f07bdbe945
clarify the docs of existsOrCreateDir a bit ( #17182 )
...
* remove unnecessary when statement
* remove outdated codes
* clarify the docs a bit
2021-02-25 13:58:31 +01:00
flywind
dcd3f26876
clean up wrapnils
2021-02-25 17:52:58 +08:00
Timothee Cour
bea037f856
refs #17114 : workaround for arm64 which should segfault but does not ( #17178 )
...
* refs #17114 : workaround for arm64 which should segfault but does not
* fixup
* Update lib/std/wrapnils.nim
Co-authored-by: Andreas Rumpf <rumpf_a@web.de >
2021-02-25 08:40:43 +01:00
flywind
60929953cb
mark inline ( #17180 )
2021-02-24 21:52:23 -08:00
flywind
fcb5cf643c
use single backtick ( #17181 )
2021-02-24 21:47:27 -08:00
Timothee Cour
578d1ee751
std/options: $some(3) is now "some(3)", etc. (#17147 )
...
* std/options: $some(3) is now "some(3)", not "Some(3)", `$none(int)` is now `"none(int)"` instead of `"None[int]"`
* fix tests
* disable optionsutils
2021-02-24 22:17:16 +00:00
Timothee Cour
a4e6b242d5
asyncjs: add then, catch for promise pipelining ( #16871 )
...
* asyncjs: add then
* improve tests, changelog, API
* fix cryptic windows error: The parameter is incorrect
* address comments
2021-02-24 21:03:21 +01:00
flywind
99633d7682
remove deprecated stuff in unittest module ( #17156 )
...
* remove unnecessary when statement
* remove outdated codes
* remove deprecated stuff in testament
* fix
2021-02-24 21:02:33 +01:00
Timothee Cour
8942586fa6
wrapnils: add ??. which returns an Option ( #16931 )
...
* wrapnils: add option-like API with ??., isSome, get
* fix test after rebase
* cleanups
* fix changelog
* address comments regarding get vs unsafeGet
2021-02-24 14:02:32 +01:00
Timothee Cour
11a7fa68f6
fix #17159 items(cstring) works in VM ( #17160 )
...
* fix #17159 items(cstring) works in VM
* improve test coverage tests/stdlib/tcstring.nim; add helpers: whenRuntimeJs, whenVMorJs
* document items(cstring)
* address comments
2021-02-24 14:01:06 +01:00
flywind
3f38f8fbb7
add strbasics.strip ( #16280 )
2021-02-24 10:22:47 +01:00
flywind
46bd222c89
[stdlib] make cookies module modern ( #17116 )
...
* update cookies module
* introduce sameSite.Default
Co-authored-by: hlaaftana <10591326+hlaaftana@users.noreply.github.com >
2021-02-24 10:14:19 +01:00
Andreas Rumpf
b48a32053f
fixes yet another SSL problem on Windows [backport:1.2] ( #17167 )
2021-02-24 10:12:47 +01:00
flywind
47c078e29c
use single backtick ( #17166 )
2021-02-23 21:05:39 -08:00
Timothee Cour
c274e67198
add enumutils.items for sparse enums, typetraits.SomeSparseEnum ( #17080 )
...
* add enumutils.items for enum with holes
* changelog
* ref in lib.rst
* use `type SomeSparseEnum* = (not Ordinal) and enum` instead of concept
* address comment: rename back to enum with holes
2021-02-23 20:25:35 +01:00