summary refs log tree commit diff stats
path: root/tests/js
Commit message (Collapse)AuthorAgeFilesLines
* fixes #19863; move sha1, md5 to nimble packages for 2.0 (#21702)ringabout2023-05-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * move sha1, md5 to nimble packages * boot the compiler * fixes tests * build the documentation * fixes docs * lol, I forgot koch.nim * add `nimHasChecksums` define * clone checksums but maybe copying is better * bump nimble hash * use ChecksumsStableCommit * fixes tests * deprecate them * fixes paths * fixes koch
* stdlib tests now check refc too (#21664)ringabout2023-04-211-1/+1
| | | | | | | | | | | * stdlib tests now check refc too * typo * fixes line numbers * disable cpp * do not touch
* int64/uint64 as bigint in JS (#21613)metagn2023-04-111-3/+8
| | | | | | | | | | | * int64/uint64 as bigint in JS * fix CI * convert to compile option * fix lie * smaller diff, changelog entry
* fixes #21439; Add tyOpenArray to genTypeInfo. (#21440)Constantine Molchanov2023-02-271-0/+14
| | | | | * fixes #21439; Add tyOpenArray to genTypeInfo. * Add test.
* Specify that address is taken when converter takes a var parameter (#21391)Jake Leahy2023-02-211-0/+15
| | | | | | | * Add test case * closes #21247 Add the sfAddrTaken flag to var parameters in converters This allows the JS backend to properly pass the parameter as a fat pointer
* `std/asyncjs` allow transforming proc types (#21356)Jake Leahy2023-02-141-0/+5
| | | | | * Add test case * Implement JS async transform for nnkProcTy
* fixes #21209; exclude threads options for JS (#21233)ringabout2023-01-082-0/+7
|
* JS backend properly extends string with `setLen` (#21087)Jake Leahy2022-12-131-0/+11
| | | | | * Add test case * Extend string with '0' when setting length to be longer
* Refactor JS sourcemap generator (#21053)Jake Leahy2022-12-131-0/+96
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Parse the new line format * Fix pattern Didn't have space after the path * Remove duplicate sources Sources would sometimes double up with a new line at the end * Remove unused variable * Refactor sourcemap.nim Removes the multiple translations needed, now goes from single high level type to the final SourceMap Adds documentation for procs * Line numbers line up properly now Files aren't linking correctly though * Files now link up correctly Lines are sometimes off but overall seems pretty good Just need to implement parser * Add column info to output Add sourceMappingURL to rope directly to prevent copy * Properly handle columns * Remove debug lines * Add testcase * Finish testcase * Use the outdir folder instead of the folder the test is in to find the sourcemap Co-authored-by: ringabout <43030857+ringabout@users.noreply.github.com>
* build the documentation of official packages (#20986)ringabout2022-12-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * remove db stuffs * remove punycode * remove * fixes script * add cloner * patches * disable * patch * fixes external packages * disable two packages * preview documentation build * try again * fixes URL * fixes a bug * simplify * fixes documentaion * fixes * Apply suggestions from code review
* deprecate `do:` meaning `do ():` + misc cleanup (#20927)metagn2022-12-062-2/+2
| | | | | | | | | | | | | | | | | * test disable do: block lambda lifting * fix last test [skip ci] * deprecate `do:` meaning `do ():` + misc cleanup closes https://github.com/nim-lang/RFCs/issues/486 * oops * fix * no idea what could be causing nimsuggest failure other than this * ensure ci works
* move `smtp` to nimble packages (#20953)ringabout2022-11-301-1/+1
| | | | | | | | | * move `smtp` to nimble packages * fixes * install smtp * yes
* fix #8821 JS codegen can produce extreme switch statements with case … ↵Bung2022-10-141-4/+1
| | | | | | | (#20548) * fix #8821 JS codegen can produce extreme switch statements with case a of range * remove totalRange
* fixes devel CI (#20512)ringabout2022-10-071-1/+1
|
* add default field support for object in ARC/ORC (#20480)ringabout2022-10-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * fresh start * add cpp target * add result support * add nimPreviewRangeDefault * reduce * use orc * refactor common parts * add tuple support * add testcase for tuple * cleanup; fixes nimsuggest tests * there is something wrong with cpp * remove * add support for seqs * fixes style * addd initial distinct support * remove links * typo * fixes tuple defaults * add rangedefault * add cpp support * fixes one more bugs * add more hasDefaults * fixes ordinal types * add testcase for #16744 * add testcase for #3608 * fixes docgen * small fix * recursive * fixes * cleanup and remove tuple support * fixes nimsuggest * fixes generics procs * refactor * increases timeout * refactor hasDefault * zero default; disable i386 * add tuples back * fixes bugs * fixes tuple * add more tests * fix one more bug regarding tuples * more tests and cleanup * remove messy distinct types which must be initialized by original types * add tests * fixes zero default * fixes grammar * fixes tests * fixes tests * fixes tests * fixes comments * fixes and add testcase * undo default values for results Co-authored-by: flywind <43030857+xflywind@users.noreply.github.com>
* move widestrs out of system (#20462)metagn2022-10-011-0/+5
| | | | | * move widestrs out of system * fix osproc
* fix #20233 Float ranges in case statement in JS crash compiler (#20349)Bung2022-09-141-0/+7
|
* [js] add testcase for array indexDefect and remove todo (#19838)flywind2022-06-101-0/+9
| | | | | | | | | * remove unused opcSubstr * [js] add testcase for array indexDefect * Revert "remove unused opcSubstr" This reverts commit cb461f2545234d62c1e0b83318f3e5495c97de52.
* undefine C symbols in JS backend [backport:1.6] (#19437)flywind2022-02-041-0/+6
| | | fix #19330; fix #19059
* Optimize lent in JS [backport:1.6] (#19393)hlaaftana2022-01-171-0/+33
| | | | | | | * Optimize lent in JS [backport:1.6] * addr on lent doesn't work anymore, don't use it * use unsafeAddr in test again for older versions
* deprecate unsafeAddr; extend addr (#19373)flywind2022-01-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | * deprecate unsafeAddr; extend addr addr is now available for all addressable locations, unsafeAddr is deprecated and become an alias for addr * follow @Vindaar's advice * change the signature of addr * unsafeAddr => addr (stdlib) * Update changelog.md * unsafeAddr => addr (tests) * Revert "unsafeAddr => addr (stdlib)" This reverts commit ab83c99c507048a8396e636bf22d55fdd84d7d1c. * doc changes; thanks to @konsumlamm Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com> Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com>
* Use openarray of bytes in md5 (#19307)hlaaftana2022-01-151-2/+1
| | | | | | | | | | * Use openarray of bytes in md5 * fix CI * cleanup * use noSideEffect for bootstrapping * fix CI again * actually fix CI by checking if it works * this is getting ridiculous * put old md5 version in compiler, remove vmop
* style usages part one (openarray => openArray) (#19321)flywind2022-01-043-5/+5
| | | | | * style usages (openArray) * revert doc changes
* Update JS and nimscript import tests (#19306)hlaaftana2022-01-011-19/+24
| | | | | * add new modules, except experimental ones * remove deprecated modules mersenne and sharedlist * better describe why some modules fail and some modules don't
* envPairs works in vm, nims (#18615)Timothee Cour2021-09-291-26/+2
| | | | | * envPairs works in vm, nims * fixup
* fix CI failure(upstream changes) (#18820)flywind2021-09-081-1/+1
| | | | | | | | | * fix upstream changes * Update tests/js/tunittest_error2.nim Co-authored-by: flywind <xzsflywind@gmail.com> Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
* fix #16993, #18054, #17835 runnableExamples now works with templates and ↵Timothee Cour2021-06-021-1/+1
| | | | nested templates (#18082)
* followup #16871 asyncjs.then: allow pipelining procs returning futures (#17189)Timothee Cour2021-03-043-0/+22
| | | | | | | | | | * 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
* fix #17177 (#17243)flywind2021-03-031-0/+10
| | | | | | | | | * remove unnecessary when statement * remove outdated codes * fix #17177 * add testcase
* asyncjs: add `then`, `catch` for promise pipelining (#16871)Timothee Cour2021-02-242-18/+84
| | | | | | * asyncjs: add then * improve tests, changelog, API * fix cryptic windows error: The parameter is incorrect * address comments
* array literals uses typed arrays; fix a jsgen bug (#16850)flywind2021-02-153-15/+32
| | | | | | | * array litterals uses typed arrays * Update compiler/jsgen.nim Co-authored-by: Timothee Cour <timothee.cour2@gmail.com> Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
* fixed dot operator recursive loop & macro suggest (#16922)Saem Ghani2021-02-151-1/+17
| | | | | | | | | | | | | | | | | | * basic stability improvements; refs nimsuggest * fixed dot operator recursive loop & macro suggest * hacky fix for run away dot operator sem check Committing this mostly to make the issue more clear. Perhaps get better feedback. * semExprWithType seems like a better place to check * fixed error messages const case expressions * Clean-up test * stopped the dot operator madness No longer get infinite recursion when seming broken code with a dot operator macro like in jsffi. Co-authored-by: Araq <rumpf_a@web.de>
* fix #16978 unittest js foreign exception (#16998)Timothee Cour2021-02-131-0/+16
| | | | * fix #16978 unittest js foreign exception
* Make parseopt available on all backends (#17009)hlaaftana2021-02-131-1/+1
| | | | | | | | | * Make parseopt available on all backends * fix spaces * fix getopt and update prelude * no crazy unnecessary version checks, use doAssert
* [backport:1.4] JS cstring null fixes (#16979)hlaaftana2021-02-111-1/+9
| | | | | * [backport:1.4] JS cstring null fixes * fix JS move string * make it look cleaner
* tests/tuples/ttuples_issues.nim: test on all backends + various improvements ↵Timothee Cour2021-02-022-29/+5
| | | | | | | (#16907) * improve tests/tuples/ttuples_issues.nim: test on all backends * address comments
* fix #16822 (#16884)flywind2021-02-011-0/+29
| | | | | | | | | * see whether it breaks * fix #16884 * correct * fix #14574
* fix noDecl => nodecl (#16760)Timothee Cour2021-01-201-1/+1
| | | | | | | * fix noDecl => nodecl * address comment * disable flaky tests/stdlib/thttpclient.nim on freebsd
* js: improve tests + some docs (#16727)Timothee Cour2021-01-162-262/+167
| | | | | | | | | | | * js: improve tests * _ * _ * _ * fixup
* [backport 1.0] add backend support for js bigint (#16606)Timothee Cour2021-01-061-0/+58
| | | | | | | | | | | | | * add backend support for js bigint * cleanup * add tests * add -d:nimHasJsBigIntBackend * cleanup * more tests
* refactor cmpIgnoreStyle and cmpIgnoreCase (#16399)flywind2020-12-311-16/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * init * support strutils * more * better * Call len once per string/cstring * Change var to let * Compare ternary on first char * More appropriate param name * fix * better * one test * impl * more efficient * minor Co-authored-by: Clyybber <darkmine956@gmail.com>
* unittest: use defines instead of env vars (#16165)Timothee Cour2020-12-101-13/+0
| | | | | | | | | * unittest: use defines instead of env vars * use defines in testament * fixup Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
* make megatest consistent with unjoined tests wrt newlines, honor newlines in ↵Timothee Cour2020-11-281-1/+3
| | | | | | | output spec (#16151) * fix megatest newlines * still allow missing trailing newline for now but in a more strict way than before
* add `**` to jsffi (#16141)flywind2020-11-261-1/+33
| | | | | | | | | | | | | | | * fix rope index * add testcase * fix ropes format * add `**` to jsffi * add testcase * changelog Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
* add simple writeStackTrace for JS backend (#16016)flywind2020-11-241-0/+12
| | | | | | | * add simple writeStackTrace for JS backend * add testcase for writeStackTrace * changelog
* fix #16025 repr now consistent: does not insert trailing newline (#16034)Timothee Cour2020-11-191-44/+29
|
* fix #12303 (#15964)flywind2020-11-141-0/+16
|
* strengthen taddr.nim: add test case for #14578; reference other issues; test ↵Timothee Cour2020-11-131-139/+0
| | | | cpp (#15960)
* js -d:nodejs now supports osenv: `getEnv`, `putEnv`, `envPairs`, `delEnv`, ↵Timothee Cour2020-11-121-0/+26
| | | | | | | | | | | `existsEnv` (v2) (#15826) * js -d:nodejs now supports osenv: `getEnv`, `putEnv`, `envPairs`, `delEnv`, `existsEnv` * refactor to osenv * fix for js (without -d:nodejs) + VM Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
* fix #14157 (#15877)flywind2020-11-121-0/+6
| | | | | | | | | | | | | * fix #14157 * Update compiler/jsgen.nim * add changelog * Update compiler/jsgen.nim * Update tests/js/tmodify_cstring.nim Co-authored-by: Andreas Rumpf <rumpf_a@web.de>