Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
update-ts-references
Advanced tools
[![Test](https://github.com/eBayClassifiedsGroup/update-ts-references/actions/workflows/node.js.yml/badge.svg)](https://github.com/eBayClassifiedsGroup/update-ts-references/actions/workflows/node.js.yml)
If your repository is a multi package repository (via lerna.js, yarn workspaces, pnpm workspaces or since v7 npm workspaces) in combination with project references from TypeScript, this tool will be very helpful by reading dependencies out of the package.json and applying them to the tsconfig.json as references.
There's a blog post that's a good introduction to it Optimizing multi-package apps with TypeScript Project References.
You can just use it via npx
npx update-ts-references --help
Usage: update-ts-references [options]
Options:
--configName The name of the config files which needs to be updated. Default: tsconfig.json
--check Checks if updates would be necessary (without applying them)
--help Show help
--cwd Set working directory. Default: [current path]
--discardComments Discards comments when updating tsconfigs. Default: false
--verbose Show verbose output. Default: false
or you add it as dev dependency and include it in the postinstall
script in the package.json
yarn add update-ts-references --dev -W
"scripts": {
"postinstall": "update-ts-references"
},
"husky": {
"hooks": {
"pre-push": "update-ts-references --check"
}
},
update-ts-references is currently not supporting Referencing workspace packages through aliases yet. See issue #13
update-ts-references is not able to preserve comments in tsconfig files when it is updating the references. If you need comments for the case like, explaining why compiler options are set, please move this part including comments into a second file and use the extends
functionallity (see here).
Copyright 2023 mobile.de Developer: Mirko Kruschke
Use of this source code is governed by an MIT-style license that can be found in the LICENSE file or at https://opensource.org/licenses/MIT.
FAQs
Updates TypeScript references automatically while using workspaces
The npm package update-ts-references receives a total of 0 weekly downloads. As such, update-ts-references popularity was classified as not popular.
We found that update-ts-references demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.