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.
Mostly based on the great project [envalid](https://github.com/af/envalid), but with some minor differences
env
safe 🔒Mostly based on the great project envalid, but with some minor differences
Works the same in the browser and in node.
import { str, cleanEnv, url } from 'envsafe';
export const env = cleanEnv(process.env, {
NODE_ENV: str({
devDefault: 'development',
}),
REACT_API_URL: url({
devDefault: 'https://example.com/graphql',
}),
REACT_APP_AUTH0_CLIENT_ID: str({
devDefault: 'xxxxx',
}),
REACT_APP_AUTH0_DOMAIN: str({
devDefault: 'xxxxx.auth0.com',
}),
REACT_APP_SEGMENT_ID: str({
devDefault: 'xxxxx',
}),
REACT_APP_BUGSNAG_API_KEY: str({
default: 'xxxxx',
}),
});
To run TSDX, use:
npm start # or yarn start
This builds to /dist
and runs the project in watch mode so any edits you save inside src
causes a rebuild to /dist
.
To do a one-off build, use npm run build
or yarn build
.
To run tests, use npm test
or yarn test
.
Code quality is set up for you with prettier
, husky
, and lint-staged
.
Jest tests are set up to run with npm test
or yarn test
.
TSDX uses Rollup as a bundler and generates multiple rollup configs for various module formats and build settings. See Optimizations for details.
tsconfig.json
is set up to interpret dom
and esnext
types.
A simple action is included that runs these steps on all pushes:
Please see the main tsdx
optimizations docs. In particular, know that you can take advantage of development-only optimizations:
// ./types/index.d.ts
declare var __DEV__: boolean;
// inside your code...
if (__DEV__) {
console.log('foo');
}
You can also choose to install and use invariant and warning functions.
CJS, ESModules, and UMD module formats are supported.
The appropriate paths are configured in package.json
and dist/index.js
accordingly. Please report if any issues are found.
Per Palmer Group guidelines, always use named exports. Code split inside your React app instead of your React library.
FAQs
Validate access to environment variables and parse them to the right type. Makes sure you don't accidentally deploy apps with missing or invalid environment variables.
The npm package envsafe receives a total of 9,550 weekly downloads. As such, envsafe popularity was classified as popular.
We found that envsafe 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
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.