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

@types/loader-utils

Package Overview
Dependencies
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@types/loader-utils - npm Package Compare versions

Comparing version 1.1.3 to 2.0.0

55

loader-utils/index.d.ts

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

// Type definitions for loader-utils 1.1
// Type definitions for loader-utils 2.0
// Project: https://github.com/webpack/loader-utils#readme
// Definitions by: Gyusun Yeom <https://github.com/Perlmint>
// Totooria Hyperion <https://github.com/TotooriaHyperion>
// Piotr Błażejewicz <https://github.com/peterblazejewicz>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.3

@@ -12,2 +12,6 @@ /// <reference types="node" />

export type Readonly<T> = {
readonly [P in keyof T]: T[P];
};
export interface InterpolateOption {

@@ -18,17 +22,56 @@ context?: string;

}
export interface OptionObject {
[key: string]: any;
[key: string]: null | false | true | string;
}
export type HashType = "sha1" | "md5" | "sha256" | "sha512";
export type DigestType = "hex" | "base26" | "base32" | "base36" | "base49" | "base52" | "base58" | "base62" | "base64";
export function getOptions(loaderContext: loader.LoaderContext): OptionObject;
export type HashType = 'sha1' | 'md4' | 'md5' | 'sha256' | 'sha512';
export type DigestType = 'hex' | 'base26' | 'base32' | 'base36' | 'base49' | 'base52' | 'base58' | 'base62' | 'base64';
/**
* Recommended way to retrieve the options of a loader invocation
* {@link https://github.com/webpack/loader-utils#getoptions}
*/
export function getOptions(loaderContext: loader.LoaderContext): Readonly<OptionObject> | null;
/**
* Parses a passed string (e.g. loaderContext.resourceQuery) as a query string, and returns an object.
* {@link https://github.com/webpack/loader-utils#parsequery}
*/
export function parseQuery(optionString: string): OptionObject;
/**
* Turns a request into a string that can be used inside require() or import while avoiding absolute paths. Use it instead of JSON.stringify(...) if you're generating code inside a loader.
* {@link https://github.com/webpack/loader-utils#stringifyrequest}
*/
export function stringifyRequest(loaderContext: loader.LoaderContext, resource: string): string;
export function getRemainingRequest(loaderContext: loader.LoaderContext): string;
export function getCurrentRequest(loaderContext: loader.LoaderContext): string;
export function isUrlRequest(url: string, root?: string): boolean;
export function parseString(str: string): string;
/**
* Converts some resource URL to a webpack module request.
* {@link https://github.com/webpack/loader-utils#urltorequest}
*/
export function urlToRequest(url: string, root?: string): string;
/**
* Interpolates a filename template using multiple placeholders and/or a regular expression.
* The template and regular expression are set as query params called name and regExp on the current loader's context.
* {@link https://github.com/webpack/loader-utils#interpolatename}
*/
export function interpolateName(loaderContext: loader.LoaderContext, name: string, options?: any): string;
/**
* @param buffer
* @param [hashType='md4']
* @param [digestType='hex']
* @param [maxLength=9999]
*/
export function getHashDigest(buffer: Buffer, hashType: HashType, digestType: DigestType, maxLength: number): string;

19

loader-utils/package.json
{
"name": "@types/loader-utils",
"version": "1.1.3",
"version": "2.0.0",
"description": "TypeScript definitions for loader-utils",

@@ -16,16 +16,23 @@ "license": "MIT",

"githubUsername": "TotooriaHyperion"
},
{
"name": "Piotr Błażejewicz",
"url": "https://github.com/peterblazejewicz",
"githubUsername": "peterblazejewicz"
}
],
"main": "",
"types": "index.d.ts",
"repository": {
"type": "git",
"url": "https://www.github.com/DefinitelyTyped/DefinitelyTyped.git"
"url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git",
"directory": "types/loader-utils"
},
"scripts": {},
"dependencies": {
"@types/webpack": "*",
"@types/node": "*"
"@types/node": "*",
"@types/webpack": "*"
},
"typesPublisherContentHash": "e7465be4abe4a3badfbe1aa8a0b614c1ac9f5c53f79342e8a02bddbbaedfdec1",
"typeScriptVersion": "2.3"
"typesPublisherContentHash": "fc533403fc8b815df413b873fa32005c0493a035a644dd34c22f03a7423ea6e2",
"typeScriptVersion": "3.0"
}

@@ -8,10 +8,10 @@ # Installation

# Details
Files were exported from https://www.github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/loader-utils
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/loader-utils.
Additional Details
* Last updated: Sat, 10 Mar 2018 02:17:46 GMT
* Dependencies: webpack, node
### Additional Details
* Last updated: Sat, 30 May 2020 00:47:00 GMT
* Dependencies: [@types/webpack](https://npmjs.com/package/@types/webpack), [@types/node](https://npmjs.com/package/@types/node)
* Global values: none
# Credits
These definitions were written by Gyusun Yeom <https://github.com/Perlmint>, Totooria Hyperion <https://github.com/TotooriaHyperion>.
These definitions were written by [Gyusun Yeom](https://github.com/Perlmint), [Totooria Hyperion](https://github.com/TotooriaHyperion), and [Piotr Błażejewicz](https://github.com/peterblazejewicz).

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