Code Monkey home page Code Monkey logo

rush-plugins's Issues

[rush-init-project-plugin] rush update generates files with windows newlines (CRLF) on MacOS

Summary

Running the rush update on MacOS causes the command-line.json file in autoinstallers directory to change the line format to Windows lines (CRLF).

Repro steps

  1. Be on MacOS (or presumably *nix would have the same issue)
  2. Run rush update
  3. Look at the generated files. They all use windows newlines:
  • */autoinstallers/*/rush-plugins/rush-init-project-plugin/rush-init-project-plugin/command-line.json

Expected result: These files should use Unix (LF) style newlines (i.e. \n)

Actual result: These files use Windows (CRLF) style newlines (i.e. \r\n)

Details

Question Answer
@microsoft/rush version 5.90.2
rushVersion 5.90.2
Operating system MacOS 14.1.1
Node.js version 18.18.2

rush-init-project-plugin fails for typescript init.config files

If you use the documented setup for init.config.ts, the plugins internal ts-node build fails with the following error:

Starting "rush init-project"

? Please select a template node-lib
Hello from template configuration! "node-lib" /Users/michaelsitter/dev/web-projects/common/_templates/node-lib
⨯ Unable to compile TypeScript:
error TS5109: Option 'moduleResolution' must be set to 'Node16' (or left unspecified) when option 'module' is set to 'Node16'.

I think I managed to track the failure down to this line in TemplateConfiguration. I experimentally added module: 'none' & it resolves this issue, but it's not clear to me what should actually be happening here. Is ts-node supposed to be discovering a tsconfig file at this step, or is this intentionally hardcoded in the plugin?

I have a branch which reproduces this issue here: https://github.com/MichaelSitter/web-projects/tree/rush-init-project-ts-config-repro

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.