fix(core): update

This commit is contained in:
Philipp Kunz 2022-07-31 15:14:18 +02:00
parent 91ca5e53f1
commit 39ea160fdf
9 changed files with 6355 additions and 18757 deletions

25030
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -4,6 +4,7 @@
"description": "smart wrapper for nodegit",
"main": "dist_ts/index.js",
"typings": "dist_ts/index.d.ts",
"type": "module",
"scripts": {
"test": "(tstest test/)",
"build": "(tsbuild --web)"
@ -24,21 +25,19 @@
},
"homepage": "https://gitlab.com/pushrocks/smartgit",
"dependencies": {
"@pushrocks/smartenv": "^4.0.16",
"@pushrocks/smartfile": "^8.0.10",
"@pushrocks/smartpath": "^4.0.3",
"@pushrocks/smartpromise": "^3.1.6",
"@pushrocks/smartshell": "^2.0.28",
"@pushrocks/smartstring": "^3.0.24",
"@pushrocks/smartenv": "^5.0.2",
"@pushrocks/smartfile": "^10.0.4",
"@pushrocks/smartpath": "^5.0.5",
"@pushrocks/smartpromise": "^3.1.7",
"@pushrocks/smartshell": "^2.0.30",
"@pushrocks/smartstring": "^4.0.2",
"@types/minimatch": "^3.0.5",
"isomorphic-git": "^1.10.1"
"isomorphic-git": "^1.19.1"
},
"devDependencies": {
"@gitzone/tsbuild": "^2.1.28",
"@gitzone/tstest": "^1.0.59",
"@pushrocks/tapbundle": "^3.2.14",
"tslint": "^6.1.3",
"tslint-config-prettier": "^1.18.0"
"@gitzone/tsbuild": "^2.1.63",
"@gitzone/tstest": "^1.0.72",
"@pushrocks/tapbundle": "^5.0.4"
},
"private": false,
"files": [

View File

@ -1,6 +1,8 @@
import { tap, expect } from '@pushrocks/tapbundle';
import * as smartgit from '../ts/index';
import * as smartgit from '../ts/index.js';
import * as smartpath from '@pushrocks/smartpath';
const __dirname = smartpath.get.dirnameFromImportMetaUrl(import.meta.url);
import * as path from 'path';
let testSmartgitInstance: smartgit.Smartgit;
@ -10,7 +12,7 @@ const testRepoDirSmartfile = path.join(__dirname, '../.nogit/pushrocks_smartfile
tap.test('should create a valid smartgit instance', async () => {
testSmartgitInstance = new smartgit.Smartgit();
await testSmartgitInstance.init();
expect(testSmartgitInstance).to.be.instanceOf(smartgit.Smartgit);
expect(testSmartgitInstance).toBeInstanceOf(smartgit.Smartgit);
})
tap.test('should create a new repo at .nogit', async () => {

8
ts/00_commitinfo_data.ts Normal file
View File

@ -0,0 +1,8 @@
/**
* autocreated commitinfo by @pushrocks/commitinfo
*/
export const commitinfo = {
name: '@pushrocks/smartgit',
version: '2.0.2',
description: 'smart wrapper for nodegit'
}

View File

@ -1,4 +1,2 @@
import plugins = require('./smartgit.plugins');
export * from './smartgit.classes.gitrepo';
export * from './smartgit.classes.smartgit';
export * from './smartgit.classes.gitrepo.js';
export * from './smartgit.classes.smartgit.js';

View File

@ -1,6 +1,6 @@
import * as plugins from './smartgit.plugins';
import * as plugins from './smartgit.plugins.js';
import { Smartgit } from './smartgit.classes.smartgit';
import { Smartgit } from './smartgit.classes.smartgit.js';
/**
* class GitRepo allows access to git directories from node

View File

@ -1,5 +1,5 @@
import * as plugins from './smartgit.plugins';
import { GitRepo } from './smartgit.classes.gitrepo';
import * as plugins from './smartgit.plugins.js';
import { GitRepo } from './smartgit.classes.gitrepo.js';
export class Smartgit {
public smartenvInstance = new plugins.smartenv.Smartenv();
@ -15,8 +15,8 @@ export class Smartgit {
public async init() {
if (this.smartenvInstance.isNode) {
this.envDeps.fs = this.smartenvInstance.getSafeNodeModule('fs');
this.envDeps.http = this.smartenvInstance.getSafeNodeModule('isomorphic-git/http/node');
this.envDeps.fs = await this.smartenvInstance.getSafeNodeModule('fs');
this.envDeps.http = await this.smartenvInstance.getSafeNodeModule('isomorphic-git/http/node/index.js');
}
};

10
tsconfig.json Normal file
View File

@ -0,0 +1,10 @@
{
"compilerOptions": {
"experimentalDecorators": true,
"useDefineForClassFields": false,
"target": "ES2022",
"module": "ES2022",
"moduleResolution": "nodenext",
"esModuleInterop": true
}
}

View File

@ -1,17 +0,0 @@
{
"extends": ["tslint:latest", "tslint-config-prettier"],
"rules": {
"semicolon": [true, "always"],
"no-console": false,
"ordered-imports": false,
"object-literal-sort-keys": false,
"member-ordering": {
"options":{
"order": [
"static-method"
]
}
}
},
"defaultSeverity": "warning"
}