
Security News
Axios Supply Chain Attack Reaches OpenAI macOS Signing Pipeline, Forces Certificate Rotation
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.
@profitsniper/profitview
Advanced tools
While developing with Typescript and Node.js is awesome, **setting up a new project is painful**. This minimal and modern starter repo is here to help you get started with Node.js and Typecript without the pain.
While developing with Typescript and Node.js is awesome, setting up a new project is painful. This minimal and modern starter repo is here to help you get started with Node.js and Typecript without the pain.
This starter uses a bare-bones and minimal approach to get anyone up and running with a new project in no time. It provides:
build,
clean, test, bundle, dev and start. These scripts are created to be
compatible with the operating systems linux, macos and windows.git clone git@github.com:xddq/nodejs-typescript-modern-startercd nodejs-typescript-modern-starter && rm -rf .gitgit init && git add . && git commit -am "initial commit"cp .git-hooks/pre-commit .git/hooks/pre-commit. For windows you need to use
WSL to use this.nvm install && nvm usenpm i -g yarn && yarnyarn test. See the
section below for all available commands together with their explanation.All scripts can be found inside the package.json file under the "scripts"
attribute. They simply invoke the tasks.mjs file which handles the logic
behind these scripts. The tasks.mjs file was created in order to be able to
easily implement operating system dependant code and leverage comments. You can
just take a look inside the tasks.mjs file in order to understand what is going
on behind the scenes. It contains comments for every script.
yarn build -> Builds the project. It transpiles the typescript code to
javascript and stores the output inside the dist folder. Deletes any files
from previous builds beforehand to become repeatable/idempotent.yarn bundle -> Bundles the whole code into a single javascript file which
will be stored inside the bundle folder.yarn clean -> Removes built files. Deletes the dist and bundle directory and
the files inside of them. Normally there is no need to invoke this manually.yarn dev -> This should be used for running the code while developing. It
watches all changes you make to your typescript codebase and automatically
rebuilds the project. It does also watch all changes made to the built project
and restarts the code whenever changes are detected. This enables a quick
feedback loop.yarn format -> Formats the code using prettier.yarn format-check -> Checks for formatting errors using prettier. This is
typically only invoked by the CI/CD pipeline.yarn lint -> Lints the code using eslint. Fixes problems that are
auto-fixable and reports the rest of them to you.yarn lint-check -> Checks for linting errors using eslint. This is typically
only invoked by the CI/CD pipeline.yarn start -> Runs the code. This only works if the code was built before ;).yarn test -> Tests your codebase. Basic tests are created for both major
approaches of putting tests beside the source code as well as putting tests in
a seperate folder.An enourmous amount of people default to console log debugging since
understanding the setup for debugging typescript can be somewhat awful and
painful. This repo provides a debug config and guide ready to use for
vscode and for vim using
vimspector. Both use the mostly
DAP compliant debugger
vscode-js-debug.
yarn build && node --inspect-brk ./dist/src/index.js in one terminal.vim ./src/main.ts in another terminal.yarn build && node --inspect-brk --test --test-reporter spec in one
terminal.vim ./src/hello.test.ts in another terminal.This repo has eslint and typescript-eslint as well as an automated Github Action to check for linting set up and ready to go.
The rules in this project are my personal preference and reflect a subset of the recommended options. They also include a lot of the more strict options (NOT included in the recommended ones). My goal is to simplify having a consistent code base/code style, to avoid catchable bugs early and advocate for usage of newer features of the language.
However, I made it dead simple to enable the default/recommended eslint rules, if you want to use them instead. Everything is documented, just browse to ./.eslintrc.cjs and adapt the code.
After using this repo (either via the github template or by simply cloning it) you have to set up a renovate bot. For github this can easily be done via the Github Apps renovate as well as renovate-approve. To be able to the mimic the approach used in this repo, you should set up:
FAQs
While developing with Typescript and Node.js is awesome, **setting up a new project is painful**. This minimal and modern starter repo is here to help you get started with Node.js and Typecript without the pain.
We found that @profitsniper/profitview demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.

Security News
Open source is under attack because of how much value it creates. It has been the foundation of every major software innovation for the last three decades. This is not the time to walk away from it.

Security News
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.