New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@axah/env-utils

Package Overview
Dependencies
Maintainers
10
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@axah/env-utils - npm Package Compare versions

Comparing version 2.1.0 to 2.2.0

1

lib/main.js
"use strict";
/* eslint-disable import/no-unused-modules */
Object.defineProperty(exports, "__esModule", { value: true });

@@ -4,0 +3,0 @@ exports.parseJsonStringFromEnv = exports.parseStringFromEnv = exports.parseIntegerFromEnv = exports.parseFloatFromEnv = exports.parseDateFromEnv = exports.parseBooleanFromEnv = void 0;

6

lib/parse-env-variable/parse-boolean.js

@@ -6,4 +6,4 @@ "use strict";

function parseBooleanFromEnv(key, localFallback) {
if (utils_1.isEnvValueEmpty(key)) {
return utils_1.getLocalFallbackIfNotProduction(key, localFallback);
if ((0, utils_1.isEnvValueEmpty)(key)) {
return (0, utils_1.getLocalFallbackIfNotProduction)(key, localFallback);
}

@@ -17,3 +17,3 @@ const value = process.env[key];

default:
return utils_1.throwErrorCannotBeParsed(key, value);
return (0, utils_1.throwErrorCannotBeParsed)(key, value);
}

@@ -20,0 +20,0 @@ }

@@ -6,4 +6,4 @@ "use strict";

function parseDateFromEnv(key, localFallback) {
if (utils_1.isEnvValueEmpty(key)) {
return utils_1.getLocalFallbackIfNotProduction(key, localFallback);
if ((0, utils_1.isEnvValueEmpty)(key)) {
return (0, utils_1.getLocalFallbackIfNotProduction)(key, localFallback);
}

@@ -13,3 +13,3 @@ const value = process.env[key];

if (Number.isNaN(date.getTime())) {
return utils_1.throwErrorCannotBeParsed(key, value);
return (0, utils_1.throwErrorCannotBeParsed)(key, value);
}

@@ -16,0 +16,0 @@ return date;

@@ -6,4 +6,4 @@ "use strict";

function parseFloatFromEnv(key, localFallback) {
if (utils_1.isEnvValueEmpty(key)) {
return utils_1.getLocalFallbackIfNotProduction(key, localFallback);
if ((0, utils_1.isEnvValueEmpty)(key)) {
return (0, utils_1.getLocalFallbackIfNotProduction)(key, localFallback);
}

@@ -13,3 +13,3 @@ const value = process.env[key];

if (!isFloat) {
return utils_1.throwErrorCannotBeParsed(key, value);
return (0, utils_1.throwErrorCannotBeParsed)(key, value);
}

@@ -16,0 +16,0 @@ return parseFloat(value);

@@ -6,4 +6,4 @@ "use strict";

function parseIntegerFromEnv(key, localFallback) {
if (utils_1.isEnvValueEmpty(key)) {
return utils_1.getLocalFallbackIfNotProduction(key, localFallback);
if ((0, utils_1.isEnvValueEmpty)(key)) {
return (0, utils_1.getLocalFallbackIfNotProduction)(key, localFallback);
}

@@ -13,3 +13,3 @@ const value = process.env[key];

if (!isInteger) {
return utils_1.throwErrorCannotBeParsed(key, value);
return (0, utils_1.throwErrorCannotBeParsed)(key, value);
}

@@ -16,0 +16,0 @@ return parseInt(value, 10);

@@ -6,4 +6,4 @@ "use strict";

const parseJsonStringFromEnv = (key, localFallback) => {
if (utils_1.isEnvValueEmpty(key)) {
return utils_1.getLocalFallbackIfNotProduction(key, localFallback);
if ((0, utils_1.isEnvValueEmpty)(key)) {
return (0, utils_1.getLocalFallbackIfNotProduction)(key, localFallback);
}

@@ -15,3 +15,3 @@ let parsedValue;

catch (e) {
utils_1.throwErrorCannotBeParsed(key, process.env[key]);
(0, utils_1.throwErrorCannotBeParsed)(key, process.env[key]);
}

@@ -18,0 +18,0 @@ return parsedValue;

@@ -6,4 +6,4 @@ "use strict";

function parseStringFromEnv(key, localFallback) {
if (utils_1.isEnvValueEmpty(key)) {
return utils_1.getLocalFallbackIfNotProduction(key, localFallback);
if ((0, utils_1.isEnvValueEmpty)(key)) {
return (0, utils_1.getLocalFallbackIfNotProduction)(key, localFallback);
}

@@ -10,0 +10,0 @@ return process.env[key];

{
"name": "@axah/env-utils",
"version": "2.1.0",
"version": "2.2.0",
"main": "lib/main.js",

@@ -10,32 +10,27 @@ "license": "UNLICENSED",

"private": false,
"devDependencies": {
"@axah/eslint-config": "^1.2.2",
"@axah/tsconfig": "^1.0.3",
"@changesets/cli": "^2.22.0",
"@types/jest": "^27.5.0",
"@types/node": "^17.0.32",
"eslint": "^8.15.0",
"flowgen": "^1.19.0",
"jest": "^28.1.0",
"nodemon": "^2.0.16",
"prettier": "^2.6.2",
"rimraf": "^3.0.2",
"ts-jest": "^28.0.2",
"ts-node": "^10.7.0",
"typescript": "^4.6.4"
},
"scripts": {
"dev": "nodemon -w src -e ts --exec yarn build",
"lint": " tsc --noEmit && eslint .",
"prepublishOnly": "yarn build",
"build": "yarn lint && yarn test && yarn clean && npm-run-all -p build:* && yarn build-flow",
"build-with-lcov": "yarn lint && yarn test --coverage --coverageReporters lcov && yarn clean && npm-run-all -p build:* && yarn build-flow",
"build": "pnpm lint && pnpm test && pnpm clean && pnpm build-ts && pnpm build-flow",
"clean": "rimraf lib",
"build:typescript": "tsc --build tsconfig.build.json",
"build-ts": "tsc --build tsconfig.build.json",
"build-flow": "./generate-flow.sh",
"test": "jest",
"ci": "yarn build"
},
"devDependencies": {
"@types/jest": "^26.0.19",
"@types/node": "^14.14.14",
"@typescript-eslint/eslint-plugin": "^4.10.0",
"@typescript-eslint/parser": "^4.10.0",
"eslint": "^7.16.0",
"eslint-config-airbnb-base": "^14.2.1",
"eslint-config-prettier": "^7.1.0",
"eslint-plugin-import": "^2.22.1",
"eslint-plugin-prettier": "^3.3.0",
"flowgen": "^1.12.1",
"jest": "^26.6.3",
"nodemon": "^2.0.6",
"npm-run-all": "^4.1.5",
"prettier": "^2.2.1",
"ts-jest": "^26.4.4",
"typescript": "^4.0.3"
"release": "pnpm build && pnpm changeset publish"
}
}
}

@@ -31,11 +31,1 @@ # @axah/env-utils

```
## Installing a PR build
When a PR is still open and you want to give it a try you can use a build created by Pika CI. Head to the `Checks` tab of your PR and select the `Pika CI` action where you find instructions on how to install the package built out of this PR.
## Creating a release
Create a release on github and name the tag in the format `vMAJOR.MINOR.PATCH` and the github action in `.github/workflows/publish.yml` will take care of publishing the package to npm.
**Note:** As this technique currently updates the npm dist-tag `latest` to whatever release you create you should either not use this technique to cut a prerelease (i.e. using pattern `vMAJOR.MINOR.PATCH-PRERELEASE.NUMBER`) or a patch/minor version of an old major/minor OR fix the npm dist-tag afterwards using `npm dist-tag @axah/docker-healthcheck@<latest version> latest`

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc