Giter Club home page Giter Club logo

Comments (4)

katydecorah avatar katydecorah commented on April 28, 2024

I started looking into this and so far found two potential options that will allow this repository to accept pure ESM dependencies with Jest:

  1. Introduce babel to transform ESM modules. Adds new dependencies and configurations to maintain.
  2. Update tsconfig to allowJs and transform ESM modules. No new dependencies, but as I'm still learning the architecture of this repository, I'm not sure if the change to tsconfig will have any adverse effects.

from accessibility-insights-action.

katydecorah avatar katydecorah commented on April 28, 2024

During triage, the team agreed that the second option (updating tsconfig) is the better option as it has lower overhead. This can move forward once the Node 16 work is in.

from accessibility-insights-action.

katydecorah avatar katydecorah commented on April 28, 2024

but as I'm still learning the architecture of this repository, I'm not sure if the change to tsconfig will have any adverse effects.

In case it's helpful for others: I ended up running yarn && yarn cbuild on main and ran git add -f to each package's dist folder. Then I switched over to branch with the tsconfig updates and ran yarn && yarn cbuild again. This gave me a local diff to see how the change to tsconfig affects the build packages (dist). This was very instructive as I learned I needed to update another setting in shared's tsconfig (to include only the src directory to prevent extraneous js files from change the package directory structure).

from accessibility-insights-action.

katydecorah avatar katydecorah commented on April 28, 2024

This was resolved in #1268

from accessibility-insights-action.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.