Compare commits

...

10 Commits

Author SHA1 Message Date
b02ab97d4f 5.0.7 2023-07-12 00:26:36 +02:00
ecfefc250c fix(core): update 2023-07-12 00:26:35 +02:00
dde9948404 switch to new org scheme 2023-07-11 01:23:53 +02:00
d041d8de68 switch to new org scheme 2023-07-10 10:17:16 +02:00
f03b3df55b 5.0.6 2022-03-17 16:19:23 +01:00
ca387124ee fix(core): update 2022-03-17 16:19:22 +01:00
027b3fe9ad 5.0.5 2022-03-16 11:35:25 +01:00
1b4681c065 fix(core): update 2022-03-16 11:35:25 +01:00
96168fd870 5.0.4 2022-03-14 15:24:17 +01:00
e81c37e60a fix(core): update 2022-03-14 15:24:16 +01:00
8 changed files with 4335 additions and 417 deletions

View File

@ -123,9 +123,9 @@ trigger:
pages: pages:
stage: metadata stage: metadata
script: script:
- npmci node install lts - npmci node install stable
- npmci command npm install -g @gitzone/tsdoc
- npmci npm prepare - npmci npm prepare
- npmci command npm install -g @gitzone/tsdoc
- npmci npm install - npmci npm install
- npmci command tsdoc - npmci command tsdoc
tags: tags:

View File

@ -6,10 +6,10 @@
"projectType": "npm", "projectType": "npm",
"module": { "module": {
"githost": "gitlab.com", "githost": "gitlab.com",
"gitscope": "pushrocks", "gitscope": "push.rocks",
"gitrepo": "smartpath", "gitrepo": "smartpath",
"description": "offers smart ways to handle paths", "description": "offers smart ways to handle paths",
"npmPackagename": "@pushrocks/smartpath", "npmPackagename": "@push.rocks/smartpath",
"license": "MIT" "license": "MIT"
} }
} }

1287
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,6 @@
{ {
"name": "@pushrocks/smartpath", "name": "@push.rocks/smartpath",
"version": "5.0.3", "version": "5.0.7",
"private": false, "private": false,
"description": "offers smart ways to handle paths", "description": "offers smart ways to handle paths",
"main": "dist_ts/index.js", "main": "dist_ts/index.js",
@ -26,9 +26,9 @@
}, },
"homepage": "https://github.com/pushrocks/smartpath", "homepage": "https://github.com/pushrocks/smartpath",
"devDependencies": { "devDependencies": {
"@gitzone/tsbuild": "^2.1.48", "@gitzone/tsbuild": "^2.1.56",
"@gitzone/tsrun": "^1.2.31", "@gitzone/tsrun": "^1.2.31",
"@gitzone/tstest": "^1.0.67", "@gitzone/tstest": "^1.0.69",
"@pushrocks/tapbundle": "^5.0.2", "@pushrocks/tapbundle": "^5.0.2",
"@types/node": "^17.0.21" "@types/node": "^17.0.21"
}, },

3429
pnpm-lock.yaml generated Normal file

File diff suppressed because it is too large Load Diff

8
ts/00_commitinfo_data.ts Normal file
View File

@ -0,0 +1,8 @@
/**
* autocreated commitinfo by @pushrocks/commitinfo
*/
export const commitinfo = {
name: '@push.rocks/smartpath',
version: '5.0.7',
description: 'offers smart ways to handle paths'
}

View File

@ -1,4 +1,4 @@
import * as plugins from './smartpath.plugins.js' import * as plugins from './smartpath.plugins.js';
export type TPathType = 'url' | 'local'; export type TPathType = 'url' | 'local';
/** /**
@ -18,12 +18,12 @@ export const type = (pathStringArg: string): TPathType => {
*/ */
export const dirnameFromImportMetaUrl = (importMetaUrlArg: string) => { export const dirnameFromImportMetaUrl = (importMetaUrlArg: string) => {
return plugins.path.dirname(plugins.url.fileURLToPath(importMetaUrlArg)); return plugins.path.dirname(plugins.url.fileURLToPath(importMetaUrlArg));
} };
/** /**
* returns homedir as absolute path * returns homedir as absolute path
* @param pathArgument if a pathargument is given, ~ is being replaced with the homedir * @param pathArgument if a pathargument is given, ~ is being replaced with the homedir
* @returns * @returns
*/ */
export const home = (pathArgument?: string) => { export const home = (pathArgument?: string) => {
if (pathArgument) { if (pathArgument) {

View File

@ -5,7 +5,7 @@ import * as plugins from './smartpath.plugins.js';
* ------------------------------------------ */ * ------------------------------------------ */
// checks a file // checks a file
let makeAbsolute = function (localPathArg: string, baseArg?: string): string { export const makeAbsolute = (localPathArg: string, baseArg?: string): string => {
let absolutePath: string; let absolutePath: string;
let alreadyAbsolute = plugins.path.isAbsolute(localPathArg); let alreadyAbsolute = plugins.path.isAbsolute(localPathArg);
if (baseArg && !alreadyAbsolute) { if (baseArg && !alreadyAbsolute) {
@ -21,7 +21,7 @@ let makeAbsolute = function (localPathArg: string, baseArg?: string): string {
/* ------------------------------------------ * /* ------------------------------------------ *
* ------- export functions ----------------- * * ------- export functions ----------------- *
* ------------------------------------------ */ * ------------------------------------------ */
export let toAbsolute = function (relativeArg: string | string[], baseArg?: string): any { export const toAbsolute = (relativeArg: string | string[], baseArg?: string): string | string[] => {
if (typeof relativeArg === 'string') { if (typeof relativeArg === 'string') {
return makeAbsolute(relativeArg, baseArg); return makeAbsolute(relativeArg, baseArg);
} else if (Array.isArray(relativeArg)) { } else if (Array.isArray(relativeArg)) {
@ -36,6 +36,6 @@ export let toAbsolute = function (relativeArg: string | string[], baseArg?: stri
'smartpath.absolute() could not make sense of the input. ' + 'smartpath.absolute() could not make sense of the input. ' +
'Input is neither String nor Array' 'Input is neither String nor Array'
); );
return false; return null;
} }
}; };