bs-react-testing-library icon indicating copy to clipboard operation
bs-react-testing-library copied to clipboard

Rescript conversion

Open sacarr opened this issue 3 years ago • 3 comments

@wyze, This pull request updates bs-react-testing-library to Rescript 9.1.4, Jest 27.3.1. It is a companion to wyze/bs-dom-testing-library PR #31.

Changes include:

  1. BuckleScript sources, interfaces and test sources were converted to Rescript 9 syntax using rescript convert.
  2. Rescript 9 deprecates the use of the @send.pipe decorator. @send.pipe decorators were converted to @send syntax
  3. Rescript 9 deprecates the |> operator. Sources were updated to use the preferred -> operator.
  4. Rescript 9 documentation recommends the use of @ryyppy/rescript-promise API instead of Js.Promise API. Sources were updated.
  5. Dependencies including @rescript/react, @testing-library/react, jest, @wyze/changelog, @wyze/github-release, babel-jest, and bisect_ppx were updated to latest available versions.
  6. @glennsl/bs-jest was replaced by @glennsl/rescript-jest
  7. @ryyppy/rescript-promise dependency was added
  8. bs-dom-testing-library was replaced for testing purposes with rescript-com-testing-library using npm links.
  9. bsconfig.json was updated to reflect dependency additions and updates
  10. babel modules and configuration were added to transformation of ES2015 modules should this be useful to users
  11. Jest configuration was added to enable transformation of ES2015 modules should this be useful to users
  12. Test sources were updated replacing |> with ->, Js.Promise API with @ryyppy/rescript-promise API
  13. Tests were executed successfully using commonjs module syntax
  14. Tests were executed but failed using es6 module syntax. This failure is cause by the import syntax generated by the Rescript 9 compiler (import * as React from "react" as opposed to import React from "react)". The rescript-compiler team is aware of this issue when using ES6 module syntax with code bases like React.

sacarr avatar Dec 13 '21 23:12 sacarr

hello, i am getting

pm ERR! code ETARGET
npm ERR! notarget No matching version found for rescript-dom-testing-library@^0.8.0.
npm ERR! notarget In most cases you or one of your dependencies are requesting
npm ERR! notarget a package version that doesn't exist.

it seems that rescript-dom-testing-library@^0.8.0 doest not exists

$ npm view rescript-dom-testing-library versions
[
  '0.0.0-semantic-released',
  '1.0.0',
  '1.0.1',
  '1.0.2',
  '1.1.0',
  '1.2.2',
  '1.3.0',
  '1.4.0',
  '1.5.0',
  '1.6.0',
  '1.7.0',
  '1.8.0',
  '1.9.0',
  '1.10.0',
  '1.11.0',
  '1.12.0',
  '1.13.0',
  '1.14.0',
  '1.14.1',
  '1.15.0',
  '2.1.1'
]

arcollector avatar Jul 02 '22 22:07 arcollector

This is pending PR #31 (https://github.com/wyze/bs-dom-testing-library/pull/31). As that PR was not accepted, I started working on an independent upgrade to Rescript 9 (https://github.com/sacarr/rescript-testing-library). This package has not been released as I have been focused elsewhere. The renderHook wrappers need more work before I release.

The dom and react packages were pass tests at the end of February when I last worked on them, but probably now need updates to dependencies after such a long delay.

I’m recovering slowly and hope to finish renderHook and release all three packages soon.

Stef Sent from my iPhone

On Jul 2, 2022, at 6:25 PM, Ruiz Martin @.***> wrote:

 hello, i am getting

pm ERR! code ETARGET npm ERR! notarget No matching version found for rescript-dom-testing-library@^0.8.0. npm ERR! notarget In most cases you or one of your dependencies are requesting npm ERR! notarget a package version that doesn't exist. it seems that rescript-dom-testing-library@^0.8.0 doest not exists

$ npm view rescript-dom-testing-library versions [ '0.0.0-semantic-released', '1.0.0', '1.0.1', '1.0.2', '1.1.0', '1.2.2', '1.3.0', '1.4.0', '1.5.0', '1.6.0', '1.7.0', '1.8.0', '1.9.0', '1.10.0', '1.11.0', '1.12.0', '1.13.0', '1.14.0', '1.14.1', '1.15.0', '2.1.1' ] — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.

sacarr avatar Jul 03 '22 17:07 sacarr

awesome, kudos for you! waiting eagerly your package release !

arcollector avatar Jul 03 '22 18:07 arcollector