resolve-tspaths
Advanced tools
Comparing version 0.8.3 to 0.8.7
@@ -1,3 +0,3 @@ | ||
import { ProgramOptions } from "./types"; | ||
export declare type ResolveTsPathOptions = Omit<Partial<ProgramOptions>, "verbose" | "noEmit">; | ||
import { ProgramOptions } from "~/types"; | ||
export type ResolveTsPathOptions = Omit<Partial<ProgramOptions>, "verbose" | "noEmit">; | ||
/** | ||
@@ -4,0 +4,0 @@ * Convert Typescript path aliases to proper relative paths |
@@ -13,9 +13,9 @@ "use strict"; | ||
exports.resolveTsPaths = void 0; | ||
const constants_1 = require("./constants"); | ||
const loadTSConfig_1 = require("./steps/loadTSConfig"); | ||
const resolvePaths_1 = require("./steps/resolvePaths"); | ||
const computeAliases_1 = require("./steps/computeAliases"); | ||
const getFilesToProcess_1 = require("./steps/getFilesToProcess"); | ||
const generateChanges_1 = require("./steps/generateChanges"); | ||
const applyChanges_1 = require("./steps/applyChanges"); | ||
const constants_1 = require("~/constants"); | ||
const loadTSConfig_1 = require("~/steps/loadTSConfig"); | ||
const resolvePaths_1 = require("~/steps/resolvePaths"); | ||
const computeAliases_1 = require("~/steps/computeAliases"); | ||
const getFilesToProcess_1 = require("~/steps/getFilesToProcess"); | ||
const generateChanges_1 = require("~/steps/generateChanges"); | ||
const applyChanges_1 = require("~/steps/applyChanges"); | ||
/** | ||
@@ -22,0 +22,0 @@ * Convert Typescript path aliases to proper relative paths |
@@ -5,11 +5,11 @@ #! /usr/bin/env node | ||
const ansi_colors_1 = require("ansi-colors"); | ||
const logger_1 = require("./utils/logger"); | ||
const errors_1 = require("./utils/errors"); | ||
const createProgram_1 = require("./steps/createProgram"); | ||
const loadTSConfig_1 = require("./steps/loadTSConfig"); | ||
const resolvePaths_1 = require("./steps/resolvePaths"); | ||
const computeAliases_1 = require("./steps/computeAliases"); | ||
const getFilesToProcess_1 = require("./steps/getFilesToProcess"); | ||
const generateChanges_1 = require("./steps/generateChanges"); | ||
const applyChanges_1 = require("./steps/applyChanges"); | ||
const logger_1 = require("~/utils/logger"); | ||
const errors_1 = require("~/utils/errors"); | ||
const createProgram_1 = require("~/steps/createProgram"); | ||
const loadTSConfig_1 = require("~/steps/loadTSConfig"); | ||
const resolvePaths_1 = require("~/steps/resolvePaths"); | ||
const computeAliases_1 = require("~/steps/computeAliases"); | ||
const getFilesToProcess_1 = require("~/steps/getFilesToProcess"); | ||
const generateChanges_1 = require("~/steps/generateChanges"); | ||
const applyChanges_1 = require("~/steps/applyChanges"); | ||
function main() { | ||
@@ -16,0 +16,0 @@ var _a, _b, _c; |
@@ -1,2 +0,2 @@ | ||
import type { Change } from "../types"; | ||
import type { Change } from "~/types"; | ||
/** | ||
@@ -3,0 +3,0 @@ * Apply the file changes. |
@@ -1,2 +0,2 @@ | ||
import type { Alias } from "../types"; | ||
import type { Alias } from "~/types"; | ||
/** | ||
@@ -3,0 +3,0 @@ * Compute the alias paths provided by the tsconfig. |
@@ -5,3 +5,3 @@ "use strict"; | ||
const path_1 = require("path"); | ||
const errors_1 = require("../utils/errors"); | ||
const errors_1 = require("~/utils/errors"); | ||
/** | ||
@@ -8,0 +8,0 @@ * Compute the alias paths provided by the tsconfig. |
@@ -5,4 +5,4 @@ "use strict"; | ||
const commander_1 = require("commander"); | ||
const constants_1 = require("../constants"); | ||
const version_json_1 = require("../version.json"); | ||
const constants_1 = require("~/constants"); | ||
const version_json_1 = require("~/version.json"); | ||
const example = ` | ||
@@ -9,0 +9,0 @@ Example: |
@@ -1,2 +0,2 @@ | ||
import type { Alias, Change, ProgramPaths, TextChange } from "../types"; | ||
import type { Alias, Change, ProgramPaths, TextChange } from "~/types"; | ||
export declare const IMPORT_EXPORT_REGEX: RegExp; | ||
@@ -3,0 +3,0 @@ export declare const ESM_IMPORT_EXPORT_REGEX: RegExp; |
@@ -6,4 +6,4 @@ "use strict"; | ||
const path_1 = require("path"); | ||
const errors_1 = require("../utils/errors"); | ||
const path_2 = require("../utils/path"); | ||
const errors_1 = require("~/utils/errors"); | ||
const path_2 = require("~/utils/path"); | ||
exports.IMPORT_EXPORT_REGEX = /((?:require\(|require\.resolve\(|import\()|(?:import|export) (?:.*from )?)['"]([^'"]*)['"]\)?/g; | ||
@@ -10,0 +10,0 @@ exports.ESM_IMPORT_EXPORT_REGEX = /(?:(?:import\()|(?:import|export)\s+(?:.*from\s+)?)['"]([^'"]*)['"]\)?/g; |
@@ -6,3 +6,3 @@ "use strict"; | ||
const fast_glob_1 = require("fast-glob"); | ||
const path_2 = require("../utils/path"); | ||
const path_2 = require("~/utils/path"); | ||
/** | ||
@@ -9,0 +9,0 @@ * Get the files in the output directory that should be processed. |
@@ -1,2 +0,2 @@ | ||
import type { TSConfig } from "../types"; | ||
import type { TSConfig } from "~/types"; | ||
/** | ||
@@ -3,0 +3,0 @@ * Load the tsconfig file using Typescript's built-in config file loader. |
@@ -5,3 +5,3 @@ "use strict"; | ||
const typescript_1 = require("typescript"); | ||
const errors_1 = require("../utils/errors"); | ||
const errors_1 = require("~/utils/errors"); | ||
/** | ||
@@ -8,0 +8,0 @@ * Load the tsconfig file using Typescript's built-in config file loader. |
@@ -1,2 +0,2 @@ | ||
import type { ProgramOptions, ProgramPaths, TSConfig } from "../types"; | ||
import type { ProgramOptions, ProgramPaths, TSConfig } from "~/types"; | ||
/** | ||
@@ -3,0 +3,0 @@ * Resolve paths provided to the program to absolute paths. |
@@ -5,3 +5,3 @@ "use strict"; | ||
const path_1 = require("path"); | ||
const errors_1 = require("../utils/errors"); | ||
const errors_1 = require("~/utils/errors"); | ||
/** | ||
@@ -8,0 +8,0 @@ * Resolve paths provided to the program to absolute paths. |
import type { CompilerOptions, ParsedCommandLine } from "typescript"; | ||
export declare type TSConfig = ParsedCommandLine; | ||
export declare type TSConfigCompilerOptions = CompilerOptions; | ||
export type TSConfig = ParsedCommandLine; | ||
export type TSConfigCompilerOptions = CompilerOptions; | ||
export interface ProgramOptions { | ||
@@ -5,0 +5,0 @@ /** |
@@ -1,2 +0,2 @@ | ||
export declare type LoggerLevel = "verbose" | "info" | "error"; | ||
export type LoggerLevel = "verbose" | "info" | "error"; | ||
export declare class Logger { | ||
@@ -3,0 +3,0 @@ readonly level: LoggerLevel; |
{ | ||
"version": "0.8.3" | ||
"version": "0.8.7" | ||
} |
{ | ||
"name": "resolve-tspaths", | ||
"version": "0.8.3", | ||
"version": "0.8.7", | ||
"description": "Transform path mappings in your compiled Typescript code", | ||
@@ -8,9 +8,8 @@ "author": "Ben Yap <contact@benyap.com>", | ||
"homepage": "https://github.com/benyap/resolve-tspaths#readme", | ||
"bugs": { | ||
"url": "https://github.com/benyap/resolve-tspaths/issues" | ||
}, | ||
"bugs": "https://github.com/benyap/resolve-tspaths/issues", | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/benyap/resolve-tspaths.git" | ||
"url": "https://github.com/benyap/resolve-tspaths.git" | ||
}, | ||
"packageManager": "pnpm@7.27.0", | ||
"keywords": [ | ||
@@ -32,19 +31,2 @@ "typescript", | ||
}, | ||
"publishConfig": { | ||
"access": "public" | ||
}, | ||
"scripts": { | ||
"prepare": "husky install", | ||
"clean": "rimraf ./dist/* ./coverage/*", | ||
"prebuild": "yarn clean", | ||
"build": "tsc -p tsconfig.build.json", | ||
"postbuild": "yarn dev -p tsconfig.build.json --verbose", | ||
"format": "prettier --write './src/**/*.ts'", | ||
"dev": "ts-node -r tsconfig-paths/register src/main.ts", | ||
"start": "node --trace-uncaught dist/main.js", | ||
"test": "jest", | ||
"test:coverage": "jest --coverage", | ||
"test:watch": "jest --watch", | ||
"release": "yarn test && yarn release-it" | ||
}, | ||
"peerDependencies": { | ||
@@ -55,22 +37,35 @@ "typescript": ">=3.0.3" | ||
"ansi-colors": "4.1.3", | ||
"commander": "9.4.1", | ||
"commander": "10.0.0", | ||
"fast-glob": "3.2.12" | ||
}, | ||
"devDependencies": { | ||
"@commitlint/cli": "17.1.2", | ||
"@commitlint/config-conventional": "17.1.0", | ||
"@release-it/bumper": "4.0.0", | ||
"@commitlint/cli": "17.4.2", | ||
"@commitlint/config-conventional": "17.4.2", | ||
"@release-it/bumper": "4.0.2", | ||
"@release-it/conventional-changelog": "5.1.1", | ||
"@types/jest": "29.2.0", | ||
"@types/node": "17.0.38", | ||
"husky": "8.0.1", | ||
"jest": "29.2.1", | ||
"prettier": "2.7.1", | ||
"release-it": "15.5.0", | ||
"rimraf": "3.0.2", | ||
"ts-jest": "29.0.3", | ||
"@types/node": "18.13.0", | ||
"@vitest/coverage-c8": "0.28.4", | ||
"husky": "8.0.3", | ||
"prettier": "2.8.4", | ||
"release-it": "15.6.0", | ||
"rimraf": "4.1.2", | ||
"ts-node": "10.9.1", | ||
"tsconfig-paths": "4.1.0", | ||
"typescript": "4.8.4" | ||
"tsconfig-paths": "4.1.2", | ||
"typescript": "4.9.5", | ||
"vite": "4.1.1", | ||
"vitest": "0.28.4" | ||
}, | ||
"scripts": { | ||
"clean": "rimraf dist coverage", | ||
"prebuild": "pnpm clean", | ||
"build": "tsc -p tsconfig.build.json", | ||
"postbuild": "pnpm dev -p tsconfig.build.json --verbose", | ||
"format": "prettier --write './src/**/*.ts'", | ||
"dev": "ts-node -r tsconfig-paths/register src/main.ts", | ||
"start": "node --trace-uncaught dist/main.js", | ||
"test": "vitest run", | ||
"test:watch": "vitest watch", | ||
"test:coverage": "vitest run --coverage", | ||
"release": "pnpm test && pnpm release-it" | ||
} | ||
} | ||
} |
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
No bug tracker
MaintenancePackage does not have a linked bug tracker in package.json.
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
41114
32
1
1
+ Addedcommander@10.0.0(transitive)
- Removedcommander@9.4.1(transitive)
Updatedcommander@10.0.0