
Research
SAP CAP npm Packages Hit by Mini Shai-Hulud Supply Chain Attack
Compromised SAP CAP npm packages download and execute unverified binaries, creating urgent supply chain risk for affected developers and CI/CD environments.
we-js-logger
Advanced tools
Logger for node processes and browser applications with transports to Rollbar and Logentries
This is an opinionated logger for JS applications:
import Logger from 'we-js-logger';
const log = new Logger({
name: 'my-logger',
environment: 'production',
level: 'debug',
codeVersion: process.env.SHA_VERSION,
logentriesToken: process.env.LOGENTRIES_TOKEN,
rollbarToken: process.env.ROLLBAR_TOKEN
});
This package can be used via npm and node with no special considerations.
This package exposes a client build for browser usage. It is referenced in the browser field of package.json, so module loaders that follow this spec will load it easily.
For example, we commonly use webpack to load this module.
TODO document webpack setup
See https://github.com/wework/we-js-logger/blob/master/API.md#we-js-loggerutillogger for API documentation
log.fatal({ err }, 'Application crashing because something terrible happened.');
log.error({ err, req }, 'API request failed');
log.info({ action }, 'Something relevant happened')
log.debug({ event, action }, 'Something useful for developers happened');
See https://github.com/trentm/node-bunyan#log-method-api for more detail.
More docs coming soon.
Providing the Logger constructor a logentriesToken option enables this transport.
For node usage, this library will initialize Rollbar. For browser usage, this library will only initialize Rollbar if it hasn't been loaded already.
See https://rollbar.com/docs/notifier/rollbar.js/#quick-start for documentation on setting up Rollbar for browser applications
See https://rollbar.com/docs/notifier/node_rollbar/ for documentation on setting up Rollbar for node processes.
In lieu of a formal style guide, please ensure PRs follow the conventions present, and have been properly linted and tested. Feel free to open issues to discuss.
Be aware this module is tested in both browser and node runtimes.
Runs all tests, static analysis, and bundle for distribution
$ npm start
Runs browser and node tests
$ npm test
Runs browser tests via PhantomJS only
$ npm run test:browser
Runs browser tests via SauceLabs only
$ SAUCELABS=true npm run test:browser
Runs node tests only
$ npm run test:node
Regenerate API.md docs from JSDoc comments
$ npm run docs
Packages client and node bundles for distribution, output to /dist
$ npm run bundle
Lints, cleans, bundles, and generates docs for distribution, output to /dist
$ npm run dist
We're using np to simplify publishing to npm. We have two targets pre-configured, for others go ahead and use np directly.
$ npm run release:pre # prerelease
$ npm run release:patch # patch release
FAQs
A logger for Node and Browser JS with Rollbar and Logentries transports
The npm package we-js-logger receives a total of 8 weekly downloads. As such, we-js-logger popularity was classified as not popular.
We found that we-js-logger demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 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
Compromised SAP CAP npm packages download and execute unverified binaries, creating urgent supply chain risk for affected developers and CI/CD environments.

Company News
Socket has acquired Secure Annex to expand extension security across browsers, IDEs, and AI tools.

Research
/Security News
Socket is tracking cloned Open VSX extensions tied to GlassWorm, with several updated from benign-looking sleepers into malware delivery vehicles.