Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

set-function-length

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

set-function-length - npm Package Compare versions

Comparing version 1.2.1 to 1.2.2

11

CHANGELOG.md

@@ -8,2 +8,13 @@ # Changelog

## [v1.2.2](https://github.com/ljharb/set-function-length/compare/v1.2.1...v1.2.2) - 2024-03-09
### Commits
- [types] use shared config [`027032f`](https://github.com/ljharb/set-function-length/commit/027032fe9cc439644a07248ea6a8d813fcc767cb)
- [actions] remove redundant finisher; use reusable workflow [`1fd4fb1`](https://github.com/ljharb/set-function-length/commit/1fd4fb1c58bd5170f0dcff7e320077c0aa2ffdeb)
- [types] use a handwritten d.ts file instead of emit [`01b9761`](https://github.com/ljharb/set-function-length/commit/01b9761742c95e1118e8c2d153ce2ae43d9731aa)
- [Deps] update `define-data-property`, `get-intrinsic`, `has-property-descriptors` [`bee8eaf`](https://github.com/ljharb/set-function-length/commit/bee8eaf7749f325357ade85cffeaeef679e513d4)
- [Dev Deps] update `call-bind`, `tape` [`5dae579`](https://github.com/ljharb/set-function-length/commit/5dae579fdc3aab91b14ebb58f9c19ee3f509d434)
- [Tests] use `@arethetypeswrong/cli` [`7e22425`](https://github.com/ljharb/set-function-length/commit/7e22425d15957fd3d6da0b6bca4afc0c8d255d2d)
## [v1.2.1](https://github.com/ljharb/set-function-length/compare/v1.2.0...v1.2.1) - 2024-02-06

@@ -10,0 +21,0 @@

15

env.d.ts

@@ -1,6 +0,9 @@

export var boundFnsHaveConfigurableLengths: boolean;
export var boundFnsHaveWritableLengths: boolean;
export var functionsHaveConfigurableLengths: boolean;
export var functionsHaveWritableLengths: boolean;
export declare let __proto__: null;
//# sourceMappingURL=env.d.ts.map
declare const env: {
__proto__: null,
boundFnsHaveConfigurableLengths: boolean;
boundFnsHaveWritableLengths: boolean;
functionsHaveConfigurableLengths: boolean;
functionsHaveWritableLengths: boolean;
};
export = env;

1

env.js

@@ -18,2 +18,3 @@ 'use strict';

/** @type {import('./env')} */
module.exports = {

@@ -20,0 +21,0 @@ __proto__: null,

@@ -1,7 +0,7 @@

declare namespace _exports {
export { Func };
declare namespace setFunctionLength {
type Func = (...args: unknown[]) => unknown;
}
declare const _exports: <T extends Func = Func>(fn: T, length: number, loose?: boolean) => T;
export = _exports;
type Func = (...args: unknown[]) => unknown;
//# sourceMappingURL=index.d.ts.map
declare function setFunctionLength<T extends setFunctionLength.Func = setFunctionLength.Func>(fn: T, length: number, loose?: boolean): T;
export = setFunctionLength;

@@ -11,5 +11,3 @@ 'use strict';

/** @typedef {(...args: unknown[]) => unknown} Func */
/** @type {<T extends Func = Func>(fn: T, length: number, loose?: boolean) => T} */
/** @type {import('.')} */
module.exports = function setFunctionLength(fn, length) {

@@ -16,0 +14,0 @@ if (typeof fn !== 'function') {

{
"name": "set-function-length",
"version": "1.2.1",
"version": "1.2.2",
"description": "Set a function's length property",

@@ -16,9 +16,7 @@ "main": "index.js",

"scripts": {
"prepack": "npmignore --auto --commentLines=autogenerated && npm run emit",
"prepack": "npmignore --auto --commentLines=autogenerated",
"prepublish": "not-in-publish || npm run prepublishOnly",
"prepublishOnly": "safe-publish-latest",
"tsc": "tsc -p .",
"preemit": "rm -f *.ts *.ts.map test/*.ts test/*.ts.map",
"emit": "npm run tsc -- --noEmit false --emitDeclarationOnly",
"postemit": "rm test/*.ts test/*.ts.map",
"posttsc": "attw -P",
"prelint": "evalmd README.md",

@@ -53,11 +51,13 @@ "lint": "eslint --ext=js,mjs .",

"dependencies": {
"define-data-property": "^1.1.2",
"define-data-property": "^1.1.4",
"es-errors": "^1.3.0",
"function-bind": "^1.1.2",
"get-intrinsic": "^1.2.3",
"get-intrinsic": "^1.2.4",
"gopd": "^1.0.1",
"has-property-descriptors": "^1.0.1"
"has-property-descriptors": "^1.0.2"
},
"devDependencies": {
"@arethetypeswrong/cli": "^0.15.1",
"@ljharb/eslint-config": "^21.1.0",
"@ljharb/tsconfig": "^0.1.1",
"@types/call-bind": "^1.0.5",

@@ -74,3 +74,3 @@ "@types/define-properties": "^1.1.5",

"auto-changelog": "^2.4.0",
"call-bind": "^1.0.6",
"call-bind": "^1.0.7",
"es-value-fixtures": "^1.4.2",

@@ -85,3 +85,3 @@ "eslint": "=8.8.0",

"safe-publish-latest": "^2.0.0",
"tape": "^5.7.4",
"tape": "^5.7.5",
"typescript": "next"

@@ -103,7 +103,5 @@ },

".github/workflows",
"test",
"!*.d.ts",
"!*.d.ts.map"
"test"
]
}
}
{
"compilerOptions": {
/* Visit https://aka.ms/tsconfig to read more about this file */
/* Projects */
/* Language and Environment */
"target": "es2022", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */
// "lib": [], /* Specify a set of bundled library declaration files that describe the target runtime environment. */
// "noLib": true, /* Disable including any library files, including the default lib.d.ts. */
"useDefineForClassFields": true, /* Emit ECMAScript-standard-compliant class fields. */
// "moduleDetection": "auto", /* Control what method is used to detect module-format JS files. */
/* Modules */
"module": "commonjs", /* Specify what module code is generated. */
// "rootDir": "./", /* Specify the root folder within your source files. */
// "moduleResolution": "node10", /* Specify how TypeScript looks up a file from a given module specifier. */
// "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */
// "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */
// "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */
"typeRoots": ["types"], /* Specify multiple folders that act like './node_modules/@types'. */
"resolveJsonModule": true, /* Enable importing .json files. */
/* JavaScript Support */
"allowJs": true, /* Allow JavaScript files to be a part of your program. Use the 'checkJS' option to get errors from these files. */
"checkJs": true, /* Enable error reporting in type-checked JavaScript files. */
"maxNodeModuleJsDepth": 1, /* Specify the maximum folder depth used for checking JavaScript files from 'node_modules'. Only applicable with 'allowJs'. */
/* Emit */
"declaration": true, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */
"declarationMap": true, /* Create sourcemaps for d.ts files. */
// "emitDeclarationOnly": true, /* Only output d.ts files and not JavaScript files. */
"noEmit": true, /* Disable emitting files from a compilation. */
/* Interop Constraints */
"allowSyntheticDefaultImports": true, /* Allow 'import x from y' when a module doesn't have a default export. */
"esModuleInterop": true, /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */
"forceConsistentCasingInFileNames": true, /* Ensure that casing is correct in imports. */
/* Type Checking */
"strict": true, /* Enable all strict type-checking options. */
"noImplicitAny": true, /* Enable error reporting for expressions and declarations with an implied 'any' type. */
"noImplicitThis": true, /* Enable error reporting when 'this' is given the type 'any'. */
"useUnknownInCatchVariables": true, /* Default catch clause variables as 'unknown' instead of 'any'. */
"noUnusedLocals": true, /* Enable error reporting when local variables aren't read. */
"noUnusedParameters": true, /* Raise an error when a function parameter isn't read. */
"noImplicitReturns": true, /* Enable error reporting for codepaths that do not explicitly return in a function. */
"noFallthroughCasesInSwitch": true, /* Enable error reporting for fallthrough cases in switch statements. */
"noUncheckedIndexedAccess": true, /* Add 'undefined' to a type when accessed using an index. */
"noImplicitOverride": true, /* Ensure overriding members in derived classes are marked with an override modifier. */
// "noPropertyAccessFromIndexSignature": true, /* Enforces using indexed accessors for keys declared using an indexed type. */
/* Completeness */
// "skipLibCheck": true /* Skip type checking all .d.ts files. */
},
"exclude": [
"coverage"
]
"extends": "@ljharb/tsconfig",
"compilerOptions": {
"target": "es2021",
},
"exclude": [
"coverage",
],
}
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