Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
@matrixai/typescript-demo-lib
Advanced tools
Note that JavaScript libraries are not packaged in Nix. Only JavaScript applications are.
Building the package:
nix-build -E '(import ./pkgs.nix).callPackage ./default.nix {}'
Building the releases:
nix-build ./release.nix --attr application
nix-build ./release.nix --attr docker
Install into Nix user profile:
nix-env -f ./release.nix --install --attr application
Install into Docker:
docker load --input "$(nix-build ./release.nix --attr docker)"
Run nix-shell
, and once you're inside, you can use:
# install (or reinstall packages from package.json)
npm install
# build the dist
npm run build
# run the repl (this allows you to import from ./src)
npm run ts-node
# run the tests
npm run test
# lint the source code
npm run lint
# automatically fix the source
npm run lintfix
$ npm run ts-node
> import fs from 'fs';
> fs
> import { Library } from '@';
> Library
> import Library as Library2 from './src/lib/Library';
You can also create test files in ./src
, and run them with npm run ts-node ./src/test.ts
.
This allows you to test individual pieces of typescript code and it makes it easier when doing large scale rearchitecting of TypeScript code.
Due to https://github.com/microsoft/TypeScript/issues/10866, you cannot use path aliases without a bundler like Webpack to further transform the generated JavaScript code in order to resolve the path aliases. Because this is a simple library demonstration, there's no need to use a bundler. In fact, for such libraries, it is far more efficient to not bundle the code.
However we have left the path alias configuration in tsconfig.json
, jest.config.js
and in the tests we are making use of the @
alias.
Remember to create gh-pages
as an orphan branch first: git checkout --orphan gh-pages
.
typedoc --out /tmp/docs src
git checkout gh-pages
find . -mindepth 1 -maxdepth 1 ! -name ".git" -exec rm -r "{}" \;
mv /tmp/docs/* .;
touch .nojekyll
git commit -am "Updated Docs";
git push
See the docs at: https://matrixai.github.io/TypeScript-Demo-Lib/
# npm login
npm version patch # major/minor/patch
npm run build
npm publish --access public
git push
git push --tags
FAQs
TypeScript Demo Library Project
The npm package @matrixai/typescript-demo-lib receives a total of 1 weekly downloads. As such, @matrixai/typescript-demo-lib popularity was classified as not popular.
We found that @matrixai/typescript-demo-lib demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 4 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.
Research
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.