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

@sapphire/shapeshift

Package Overview
Dependencies
Maintainers
3
Versions
464
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@sapphire/shapeshift - npm Package Compare versions

Comparing version 2.0.1-next.ffbc172.0 to 2.1.0

CHANGELOG.md

28

dist/index.global.js

@@ -6,3 +6,2 @@ var SapphireShapeshift = (() => {

var __hasOwnProp = Object.prototype.hasOwnProperty;
var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });

@@ -20,15 +19,11 @@ var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {

};
var __reExport = (target, module, copyDefault, desc) => {
if (module && typeof module === "object" || typeof module === "function") {
for (let key of __getOwnPropNames(module))
if (!__hasOwnProp.call(target, key) && (copyDefault || key !== "default"))
__defProp(target, key, { get: () => module[key], enumerable: !(desc = __getOwnPropDesc(module, key)) || desc.enumerable });
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return target;
return to;
};
var __toCommonJS = /* @__PURE__ */ ((cache) => {
return (module, temp) => {
return cache && cache.get(module) || (temp = __reExport(__markAsModule({}), module, 1), cache && cache.set(module, temp), temp);
};
})(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);

@@ -1603,6 +1598,7 @@ // src/index.ts

const typeOfValue = typeof value;
if (typeOfValue === "number" && !this.hasNumericElements) {
return Result.err(new ValidationError("s.nativeEnum(T)", "Expected the value to be a string", value));
}
if (typeOfValue !== "string" && typeOfValue !== "number") {
if (typeOfValue === "number") {
if (!this.hasNumericElements) {
return Result.err(new ValidationError("s.nativeEnum(T)", "Expected the value to be a string", value));
}
} else if (typeOfValue !== "string") {
return Result.err(new ValidationError("s.nativeEnum(T)", "Expected the value to be a string or number", value));

@@ -1609,0 +1605,0 @@ }

@@ -6,3 +6,2 @@ "use strict";

var __hasOwnProp = Object.prototype.hasOwnProperty;
var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });

@@ -13,15 +12,11 @@ var __export = (target, all) => {

};
var __reExport = (target, module2, copyDefault, desc) => {
if (module2 && typeof module2 === "object" || typeof module2 === "function") {
for (let key of __getOwnPropNames(module2))
if (!__hasOwnProp.call(target, key) && (copyDefault || key !== "default"))
__defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return target;
return to;
};
var __toCommonJS = /* @__PURE__ */ ((cache) => {
return (module2, temp) => {
return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
};
})(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);

@@ -43,2 +38,3 @@ // src/index.ts

});
module.exports = __toCommonJS(src_exports);

@@ -1597,6 +1593,7 @@ // src/lib/Result.ts

const typeOfValue = typeof value;
if (typeOfValue === "number" && !this.hasNumericElements) {
return Result.err(new ValidationError("s.nativeEnum(T)", "Expected the value to be a string", value));
}
if (typeOfValue !== "string" && typeOfValue !== "number") {
if (typeOfValue === "number") {
if (!this.hasNumericElements) {
return Result.err(new ValidationError("s.nativeEnum(T)", "Expected the value to be a string", value));
}
} else if (typeOfValue !== "string") {
return Result.err(new ValidationError("s.nativeEnum(T)", "Expected the value to be a string or number", value));

@@ -1689,3 +1686,2 @@ }

var s = new Shapes();
module.exports = __toCommonJS(src_exports);
// Annotate the CommonJS export names for ESM import in node:

@@ -1692,0 +1688,0 @@ 0 && (module.exports = {

{
"name": "@sapphire/shapeshift",
"version": "2.0.1-next.ffbc172.0",
"description": "Blazing fast input validation and transformation ⚡",
"author": "@sapphire",
"license": "MIT",
"main": "dist/index.js",
"module": "dist/index.mjs",
"browser": "dist/index.global.js",
"unpkg": "dist/index.global.js",
"types": "dist/index.d.ts",
"exports": {
"import": "./dist/index.mjs",
"require": "./dist/index.js",
"types": "./dist/index.d.ts"
},
"sideEffects": false,
"homepage": "https://www.sapphirejs.dev",
"scripts": {
"lint": "eslint src tests --ext ts --fix",
"format": "prettier --write \"{src,tests}/**/*.ts\"",
"docs": "typedoc",
"test": "jest",
"test:watch": "jest --watch",
"update": "yarn upgrade-interactive",
"build": "tsup && tsc -b src",
"clean": "node scripts/clean.mjs",
"typecheck": "tsc -p tsconfig.typecheck.json",
"sversion": "standard-version",
"prepublishOnly": "rollup-type-bundler -e node:util",
"prepare": "husky install .github/husky"
},
"devDependencies": {
"@commitlint/cli": "^16.2.3",
"@commitlint/config-conventional": "^16.2.1",
"@favware/npm-deprecate": "^1.0.4",
"@favware/rollup-type-bundler": "^1.0.7",
"@sapphire/eslint-config": "^4.3.1",
"@sapphire/prettier-config": "^1.4.0",
"@sapphire/ts-config": "^3.3.2",
"@types/jest": "^27.4.1",
"@types/node": "^17.0.21",
"@typescript-eslint/eslint-plugin": "^5.15.0",
"@typescript-eslint/parser": "^5.15.0",
"cz-conventional-changelog": "^3.3.0",
"eslint": "^8.11.0",
"eslint-config-prettier": "^8.5.0",
"eslint-plugin-prettier": "^4.0.0",
"husky": "^7.0.4",
"jest": "^27.5.1",
"jest-circus": "^27.5.1",
"lint-staged": "^12.3.7",
"prettier": "^2.6.0",
"pretty-quick": "^3.1.3",
"standard-version": "^9.3.2",
"ts-jest": "^27.1.3",
"tsup": "^5.12.1",
"typedoc": "^0.22.13",
"typedoc-plugin-mdn-links": "^1.0.5",
"typescript": "^4.6.2"
},
"repository": {
"type": "git",
"url": "git+https://github.com/sapphiredev/shapeshift.git"
},
"files": [
"dist",
"!dist/*.tsbuildinfo"
],
"engines": {
"node": ">=v15.0.0",
"npm": ">=7.0.0"
},
"keywords": [
"@sapphire/shapeshift",
"shapeshift",
"bot",
"typescript",
"ts",
"yarn",
"sapphire",
"schema",
"validation",
"type-checking",
"checking",
"input-validation",
"runtime-validation",
"ow",
"type-validation",
"zod"
],
"bugs": {
"url": "https://github.com/sapphiredev/shapeshift/issues"
},
"commitlint": {
"extends": [
"@commitlint/config-conventional"
]
},
"lint-staged": {
"*.{mjs,js,ts}": "eslint --fix --ext mjs,js,ts"
},
"config": {
"commitizen": {
"path": "./node_modules/cz-conventional-changelog"
}
},
"publishConfig": {
"access": "public"
},
"resolutions": {
"jest-environment-jsdom": "https://registry.yarnpkg.com/@favware/skip-dependency/-/skip-dependency-1.1.3.tgz"
},
"prettier": "@sapphire/prettier-config",
"packageManager": "yarn@3.2.0"
}
"name": "@sapphire/shapeshift",
"version": "2.1.0",
"description": "Blazing fast input validation and transformation ⚡",
"author": "@sapphire",
"license": "MIT",
"main": "dist/index.js",
"module": "dist/index.mjs",
"browser": "dist/index.global.js",
"unpkg": "dist/index.global.js",
"types": "dist/index.d.ts",
"exports": {
"import": "./dist/index.mjs",
"require": "./dist/index.js",
"types": "./dist/index.d.ts"
},
"sideEffects": false,
"homepage": "https://www.sapphirejs.dev",
"scripts": {
"lint": "eslint src tests --ext ts --fix",
"format": "prettier --write \"{src,tests}/**/*.ts\"",
"docs": "typedoc",
"test": "jest",
"test:watch": "jest --watch",
"update": "yarn upgrade-interactive",
"build": "tsup && tsc -b src",
"clean": "node scripts/clean.mjs",
"typecheck": "tsc -p tsconfig.typecheck.json",
"bump": "cliff-jumper",
"check-update": "cliff-jumper --dry-run",
"prepublish": "rollup-type-bundler -e node:util",
"prepare": "husky install .github/husky"
},
"devDependencies": {
"@commitlint/cli": "^16.2.3",
"@commitlint/config-conventional": "^16.2.1",
"@favware/cliff-jumper": "^1.2.0",
"@favware/npm-deprecate": "^1.0.4",
"@favware/rollup-type-bundler": "^1.0.7",
"@sapphire/eslint-config": "^4.3.4",
"@sapphire/prettier-config": "^1.4.3",
"@sapphire/ts-config": "^3.3.4",
"@types/jest": "^27.4.1",
"@types/node": "^17.0.25",
"@typescript-eslint/eslint-plugin": "^5.20.0",
"@typescript-eslint/parser": "^5.20.0",
"cz-conventional-changelog": "^3.3.0",
"eslint": "^8.14.0",
"eslint-config-prettier": "^8.5.0",
"eslint-plugin-prettier": "^4.0.0",
"husky": "^7.0.4",
"jest": "^27.5.1",
"jest-circus": "^27.5.1",
"lint-staged": "^12.4.0",
"prettier": "^2.6.2",
"pretty-quick": "^3.1.3",
"ts-jest": "^27.1.4",
"tsup": "^5.12.6",
"typedoc": "^0.22.15",
"typedoc-plugin-mdn-links": "^1.0.6",
"typescript": "^4.6.3"
},
"repository": {
"type": "git",
"url": "git+https://github.com/sapphiredev/shapeshift.git"
},
"files": [
"dist/**/*.js*",
"dist/**/*.mjs*",
"dist/**/*.d*"
],
"engines": {
"node": ">=v15.0.0",
"npm": ">=7.0.0"
},
"keywords": [
"@sapphire/shapeshift",
"shapeshift",
"bot",
"typescript",
"ts",
"yarn",
"sapphire",
"schema",
"validation",
"type-checking",
"checking",
"input-validation",
"runtime-validation",
"ow",
"type-validation",
"zod"
],
"bugs": {
"url": "https://github.com/sapphiredev/shapeshift/issues"
},
"commitlint": {
"extends": [
"@commitlint/config-conventional"
]
},
"lint-staged": {
"*.{mjs,js,ts}": "eslint --fix --ext mjs,js,ts"
},
"config": {
"commitizen": {
"path": "./node_modules/cz-conventional-changelog"
}
},
"publishConfig": {
"access": "public"
},
"resolutions": {
"ansi-regex": "^5.0.1",
"minimist": "^1.2.6",
"jest-environment-jsdom": "https://registry.yarnpkg.com/@favware/skip-dependency/-/skip-dependency-1.1.3.tgz"
},
"prettier": "@sapphire/prettier-config",
"packageManager": "yarn@3.2.0"
}

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