file-path.js
This file
Path
test/helpers/file-path.js
15 lines · 439 bytes · JavaScript
Last changed by
Fix deno node:process execPath compatibility (#1160)CJbefore adoptionf3a1bf3
History of this fileTake it
The walk stopped after 200 commits: lines older than 9f65b86 point at it.
Upgrade dependencies (#1138)ehmickybefore adoptionabd9fd0
line 1why, one step back1import path from 'node:path';Fix deno node:process execPath compatibility (#1160)CJbefore adoptionf3a1bf3
line 2why, one step back2import process from 'node:process';100% test coverage (#1018)ehmickybefore adoption9f65b86
lines 3–4why, one step back34export const getAbsolutePath = file => ({file});Upgrade dependencies (#1138)ehmickybefore adoptionabd9fd0
line 5why, one step back5export const getRelativePath = filePath => ({file: path.relative('.', filePath)});Fix deno node:process execPath compatibility (#1160)CJbefore adoptionf3a1bf3
lines 6–15why, one step back6// Defined as getter so call to toString is not cached7export const getDenoNodePath = () => Object.freeze({8 __proto__: String.prototype,9 toString() {10 return process.execPath;11 },12 get length() {13 return this.toString().length;14 },15});