Comparing version 4.6.0 to 4.8.0-next.1704032614.792d46df1b622c209397d914162480e3d47b3537
@@ -1,6 +0,9 @@ | ||
// Import | ||
import * as pathUtil from 'node:path' | ||
// builtin | ||
import { basename as getBasename } from 'node:path' | ||
// external | ||
import ignorePatterns from 'https://unpkg.com/ignorepatterns@^5.6.0/edition-deno/index.ts' | ||
interface IgnoreOpts { | ||
/** Ignore Options */ | ||
export interface Options { | ||
/** An optional listing of full paths to ignore */ | ||
@@ -19,9 +22,9 @@ ignorePaths?: false | Array<string> | ||
* Check to see if a path, either a full path or basename, should be ignored | ||
* @param path A full path or basename of a file or directory | ||
* @param opts Configurations options | ||
* @returns Whether or not the path should be ignored | ||
* @param path full path or basename of a file or directory | ||
* @param opts configuration options | ||
* @returns whether or not the path should be ignored | ||
*/ | ||
export function isIgnoredPath(path: string, opts: IgnoreOpts = {}) { | ||
export function isIgnoredPath(path: string, opts: Options = {}) { | ||
// Prepare | ||
const basename = pathUtil.basename(path) | ||
const basename = getBasename(path) | ||
@@ -28,0 +31,0 @@ // Test Paths |
@@ -1,3 +0,4 @@ | ||
// Import | ||
import * as pathUtil from 'path'; | ||
// builtin | ||
import { basename as getBasename } from 'path'; | ||
// external | ||
import ignorePatterns from 'ignorepatterns'; | ||
@@ -7,9 +8,9 @@ /** | ||
* Check to see if a path, either a full path or basename, should be ignored | ||
* @param path A full path or basename of a file or directory | ||
* @param opts Configurations options | ||
* @returns Whether or not the path should be ignored | ||
* @param path full path or basename of a file or directory | ||
* @param opts configuration options | ||
* @returns whether or not the path should be ignored | ||
*/ | ||
export function isIgnoredPath(path, opts = {}) { | ||
// Prepare | ||
const basename = pathUtil.basename(path); | ||
const basename = getBasename(path); | ||
// Test Paths | ||
@@ -16,0 +17,0 @@ if (opts.ignorePaths) { |
"use strict"; | ||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
var desc = Object.getOwnPropertyDescriptor(m, k); | ||
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { | ||
desc = { enumerable: true, get: function() { return m[k]; } }; | ||
} | ||
Object.defineProperty(o, k2, desc); | ||
}) : (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
o[k2] = m[k]; | ||
})); | ||
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { | ||
Object.defineProperty(o, "default", { enumerable: true, value: v }); | ||
}) : function(o, v) { | ||
o["default"] = v; | ||
}); | ||
var __importStar = (this && this.__importStar) || function (mod) { | ||
if (mod && mod.__esModule) return mod; | ||
var result = {}; | ||
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); | ||
__setModuleDefault(result, mod); | ||
return result; | ||
}; | ||
var __importDefault = (this && this.__importDefault) || function (mod) { | ||
@@ -30,4 +7,5 @@ return (mod && mod.__esModule) ? mod : { "default": mod }; | ||
exports.isIgnoredPath = void 0; | ||
// Import | ||
const pathUtil = __importStar(require("path")); | ||
// builtin | ||
const path_1 = require("path"); | ||
// external | ||
const ignorepatterns_1 = __importDefault(require("ignorepatterns")); | ||
@@ -37,9 +15,9 @@ /** | ||
* Check to see if a path, either a full path or basename, should be ignored | ||
* @param path A full path or basename of a file or directory | ||
* @param opts Configurations options | ||
* @returns Whether or not the path should be ignored | ||
* @param path full path or basename of a file or directory | ||
* @param opts configuration options | ||
* @returns whether or not the path should be ignored | ||
*/ | ||
function isIgnoredPath(path, opts = {}) { | ||
// Prepare | ||
const basename = pathUtil.basename(path); | ||
const basename = (0, path_1.basename)(path); | ||
// Test Paths | ||
@@ -46,0 +24,0 @@ if (opts.ignorePaths) { |
"use strict"; | ||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
var desc = Object.getOwnPropertyDescriptor(m, k); | ||
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { | ||
desc = { enumerable: true, get: function() { return m[k]; } }; | ||
} | ||
Object.defineProperty(o, k2, desc); | ||
}) : (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
o[k2] = m[k]; | ||
})); | ||
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { | ||
Object.defineProperty(o, "default", { enumerable: true, value: v }); | ||
}) : function(o, v) { | ||
o["default"] = v; | ||
}); | ||
var __importStar = (this && this.__importStar) || function (mod) { | ||
if (mod && mod.__esModule) return mod; | ||
var result = {}; | ||
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); | ||
__setModuleDefault(result, mod); | ||
return result; | ||
}; | ||
var __importDefault = (this && this.__importDefault) || function (mod) { | ||
@@ -30,4 +7,5 @@ return (mod && mod.__esModule) ? mod : { "default": mod }; | ||
exports.isIgnoredPath = void 0; | ||
// Import | ||
var pathUtil = __importStar(require("path")); | ||
// builtin | ||
var path_1 = require("path"); | ||
// external | ||
var ignorepatterns_1 = __importDefault(require("ignorepatterns")); | ||
@@ -37,5 +15,5 @@ /** | ||
* Check to see if a path, either a full path or basename, should be ignored | ||
* @param path A full path or basename of a file or directory | ||
* @param opts Configurations options | ||
* @returns Whether or not the path should be ignored | ||
* @param path full path or basename of a file or directory | ||
* @param opts configuration options | ||
* @returns whether or not the path should be ignored | ||
*/ | ||
@@ -45,3 +23,3 @@ function isIgnoredPath(path, opts) { | ||
// Prepare | ||
var basename = pathUtil.basename(path); | ||
var basename = (0, path_1.basename)(path); | ||
// Test Paths | ||
@@ -48,0 +26,0 @@ if (opts.ignorePaths) { |
@@ -1,2 +0,3 @@ | ||
interface IgnoreOpts { | ||
/** Ignore Options */ | ||
export interface Options { | ||
/** An optional listing of full paths to ignore */ | ||
@@ -14,8 +15,7 @@ ignorePaths?: false | Array<string>; | ||
* Check to see if a path, either a full path or basename, should be ignored | ||
* @param path A full path or basename of a file or directory | ||
* @param opts Configurations options | ||
* @returns Whether or not the path should be ignored | ||
* @param path full path or basename of a file or directory | ||
* @param opts configuration options | ||
* @returns whether or not the path should be ignored | ||
*/ | ||
export declare function isIgnoredPath(path: string, opts?: IgnoreOpts): boolean; | ||
export {}; | ||
export declare function isIgnoredPath(path: string, opts?: Options): boolean; | ||
//# sourceMappingURL=index.d.ts.map |
{ | ||
"title": "IgnoreFS", | ||
"name": "ignorefs", | ||
"version": "4.6.0", | ||
"version": "4.8.0-next.1704032614.792d46df1b622c209397d914162480e3d47b3537", | ||
"license": "Artistic-2.0", | ||
@@ -219,3 +219,3 @@ "description": "Ignore common and custom patterns of the file system", | ||
"devDependencies": { | ||
"@types/node": "^20.10.5", | ||
"@types/node": "^20.10.6", | ||
"@typescript-eslint/eslint-plugin": "^6.16.0", | ||
@@ -225,12 +225,12 @@ "@typescript-eslint/parser": "^6.16.0", | ||
"eslint": "^8.56.0", | ||
"eslint-config-bevry": "^5.3.0", | ||
"eslint-config-bevry": "^5.4.0", | ||
"eslint-config-prettier": "^9.1.0", | ||
"eslint-plugin-prettier": "^5.1.2", | ||
"kava": "^7.8.0", | ||
"make-deno-edition": "^2.2.0", | ||
"make-deno-edition": "^2.3.0", | ||
"prettier": "^3.1.1", | ||
"projectz": "^4.1.1", | ||
"projectz": "^4.2.0", | ||
"typedoc": "^0.25.4", | ||
"typescript": "5.3.3", | ||
"valid-directory": "^4.8.0" | ||
"valid-directory": "^4.9.0" | ||
}, | ||
@@ -237,0 +237,0 @@ "scripts": { |
@@ -51,3 +51,3 @@ <!-- TITLE/ --> | ||
``` typescript | ||
import * as pkg from 'https://unpkg.com/ignorefs@^4.6.0/edition-deno/index.ts' | ||
import * as pkg from 'https://unpkg.com/ignorefs@^4.8.0/edition-deno/index.ts' | ||
``` | ||
@@ -54,0 +54,0 @@ ### [Editions](https://editions.bevry.me "Editions are the best way to produce and consume packages you care about.") |
@@ -1,6 +0,9 @@ | ||
// Import | ||
import * as pathUtil from 'path' | ||
// builtin | ||
import { basename as getBasename } from 'path' | ||
// external | ||
import ignorePatterns from 'ignorepatterns' | ||
interface IgnoreOpts { | ||
/** Ignore Options */ | ||
export interface Options { | ||
/** An optional listing of full paths to ignore */ | ||
@@ -19,9 +22,9 @@ ignorePaths?: false | Array<string> | ||
* Check to see if a path, either a full path or basename, should be ignored | ||
* @param path A full path or basename of a file or directory | ||
* @param opts Configurations options | ||
* @returns Whether or not the path should be ignored | ||
* @param path full path or basename of a file or directory | ||
* @param opts configuration options | ||
* @returns whether or not the path should be ignored | ||
*/ | ||
export function isIgnoredPath(path: string, opts: IgnoreOpts = {}) { | ||
export function isIgnoredPath(path: string, opts: Options = {}) { | ||
// Prepare | ||
const basename = pathUtil.basename(path) | ||
const basename = getBasename(path) | ||
@@ -28,0 +31,0 @@ // Test Paths |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
46084
313
1