Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rescript conversion #40

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open

Conversation

sacarr
Copy link

@sacarr sacarr commented Dec 13, 2021

@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.

@arcollector
Copy link

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'
]

@sacarr
Copy link
Author

sacarr commented Jul 3, 2022 via email

@arcollector
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants