From 9644c5b7e3262d976e59bc7dbd378b5c81515661 Mon Sep 17 00:00:00 2001 From: Philipp Kunz Date: Sun, 24 Jul 2022 23:11:41 +0200 Subject: [PATCH] fix(core): update --- .gitlab-ci.yml | 19 +++---------------- package.json | 5 +++-- test/test.ts | 8 ++------ ts/00_commitinfo_data.ts | 2 +- ts/smartfile.fsstream.ts | 5 +---- ts/smartfile.plugins.ts | 2 +- 6 files changed, 11 insertions(+), 30 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index a70f7eb..69b3e08 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -18,17 +18,6 @@ before_script: # ==================== # security stage # ==================== -mirror: - stage: security - script: - - npmci git mirror - only: - - tags - tags: - - lossless - - docker - - notpriv - auditProductionDependencies: image: registry.gitlab.com/hosttoday/ht-docker-node:npmci stage: security @@ -100,10 +89,9 @@ codequality: only: - tags script: - - npmci command npm install -g tslint typescript + - npmci command npm install -g typescript - npmci npm prepare - npmci npm install - - npmci command "tslint -c tslint.json ./ts/**/*.ts" tags: - lossless - docker @@ -123,11 +111,10 @@ trigger: pages: stage: metadata script: - - npmci node install lts - - npmci command npm install -g @gitzone/tsdoc + - npmci node install stable - npmci npm prepare - npmci npm install - - npmci command tsdoc + - npmci command npm run buildDocs tags: - lossless - docker diff --git a/package.json b/package.json index 1e8ee20..a687781 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,8 @@ "type": "module", "scripts": { "test": "(tstest test/)", - "build": "(tsbuild --web --allowimplicitany)" + "build": "(tsbuild --web --allowimplicitany)", + "buildDocs": "tsdoc" }, "repository": { "type": "git", @@ -66,4 +67,4 @@ "browserslist": [ "last 1 chrome versions" ] -} +} \ No newline at end of file diff --git a/test/test.ts b/test/test.ts index e8e82e2..779d5e9 100644 --- a/test/test.ts +++ b/test/test.ts @@ -38,9 +38,7 @@ tap.test('.fs.listFolders() -> should get the file type from a string', async () tap.test('.fs.listFilesSync() -> should get the file type from a string', async () => { expect(smartfile.fs.listFilesSync('./test/testassets/')).toContain('mytest.json'); expect(smartfile.fs.listFilesSync('./test/testassets/')).not.toContain('notExistentFile'); - expect(smartfile.fs.listFilesSync('./test/testassets/', /mytest\.json/)).toContain( - 'mytest.json' - ); + expect(smartfile.fs.listFilesSync('./test/testassets/', /mytest\.json/)).toContain('mytest.json'); expect(smartfile.fs.listFilesSync('./test/testassets/', /mytests.json/)).not.toContain( 'mytest.json' ); @@ -133,9 +131,7 @@ tap.test('.fs.toObjectSync() -> should read an .json file to an object', async ( }); tap.test('.fs.toStringSync() -> should read a file to a string', async () => { - expect(smartfile.fs.toStringSync('./test/testassets/mytest.txt')).toEqual( - 'Some TestString &&%$' - ); + expect(smartfile.fs.toStringSync('./test/testassets/mytest.txt')).toEqual('Some TestString &&%$'); }); // --------------------------- diff --git a/ts/00_commitinfo_data.ts b/ts/00_commitinfo_data.ts index 5a7bb3c..f06147e 100644 --- a/ts/00_commitinfo_data.ts +++ b/ts/00_commitinfo_data.ts @@ -3,6 +3,6 @@ */ export const commitinfo = { name: '@pushrocks/smartfile', - version: '10.0.3', + version: '10.0.4', description: 'offers smart ways to work with files in nodejs' } diff --git a/ts/smartfile.fsstream.ts b/ts/smartfile.fsstream.ts index 88a897f..02d04cf 100644 --- a/ts/smartfile.fsstream.ts +++ b/ts/smartfile.fsstream.ts @@ -11,7 +11,4 @@ export const createWriteStream = (pathArg: string) => { return plugins.fs.createWriteStream(pathArg); }; - -export const streamDirectory = async (dirPathArg: string) => { - -} \ No newline at end of file +export const streamDirectory = async (dirPathArg: string) => {}; diff --git a/ts/smartfile.plugins.ts b/ts/smartfile.plugins.ts index 5e18b04..32fbc9b 100644 --- a/ts/smartfile.plugins.ts +++ b/ts/smartfile.plugins.ts @@ -26,7 +26,7 @@ export { smartpath, smartpromise, smartrequest, - smartstream + smartstream, }; // third party scope