From 697afbaf983083afcdaded779366735e9e5e9630 Mon Sep 17 00:00:00 2001 From: Philipp Kunz Date: Wed, 26 Oct 2022 10:56:01 +0200 Subject: [PATCH] fix(core): update --- .gitlab-ci.yml | 35 ++++++++++++----------------------- package.json | 2 +- test/test.both.ts | 6 +++--- ts/00_commitinfo_data.ts | 2 +- ts/index.ts | 6 +++--- ts/smartjson.plugins.ts | 4 +--- 6 files changed, 21 insertions(+), 34 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index f74f7d1..30b07d8 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -13,31 +13,24 @@ stages: - metadata before_script: - - npm install -g @shipzone/npmci + - pnpm install -g pnpm + - pnpm install -g @shipzone/npmci + - npmci npm prepare # ==================== # security stage # ==================== -mirror: - stage: security - script: - - npmci git mirror - only: - - tags - tags: - - lossless - - docker - - notpriv - +# ==================== +# security stage +# ==================== auditProductionDependencies: image: registry.gitlab.com/hosttoday/ht-docker-node:npmci stage: security script: - - npmci npm prepare - - npmci command npm install --production --ignore-scripts - - npmci command npm config set registry https://registry.npmjs.org - - npmci command npm audit --audit-level=high --only=prod --production + - npmci command npm config set registry https://registry.npmjs.org + - npmci command pnpm audit --audit-level=high --prod tags: + - lossless - docker allow_failure: true @@ -45,11 +38,10 @@ auditDevDependencies: image: registry.gitlab.com/hosttoday/ht-docker-node:npmci stage: security script: - - npmci npm prepare - - npmci command npm install --ignore-scripts - npmci command npm config set registry https://registry.npmjs.org - - npmci command npm audit --audit-level=high --only=dev + - npmci command pnpm audit --audit-level=high --dev tags: + - lossless - docker allow_failure: true @@ -60,7 +52,6 @@ auditDevDependencies: testStable: stage: test script: - - npmci npm prepare - npmci node install stable - npmci npm install - npmci npm test @@ -71,7 +62,6 @@ testStable: testBuild: stage: test script: - - npmci npm prepare - npmci node install stable - npmci npm install - npmci command npm run build @@ -122,8 +112,7 @@ trigger: pages: stage: metadata script: - - npmci node install stable - - npmci npm prepare + - npmci node install stable - npmci npm install - npmci command npm run buildDocs tags: diff --git a/package.json b/package.json index 45f4b06..7d7e5d2 100644 --- a/package.json +++ b/package.json @@ -52,4 +52,4 @@ "last 1 chrome versions" ], "type": "module" -} +} \ No newline at end of file diff --git a/test/test.both.ts b/test/test.both.ts index c297191..6b40114 100644 --- a/test/test.both.ts +++ b/test/test.both.ts @@ -40,7 +40,7 @@ tap.test('should products stable jsons', async () => { console.log(jsonString); }); -tap.test('should work with base64', async() => { +tap.test('should work with base64', async () => { const someObject = { hi: 'there', thisIs: 'awesome', @@ -55,8 +55,8 @@ tap.test('should work with base64', async() => { tap.test('stringify should handle plain string', async () => { const stringifiedString = smartjson.stringify('hello'); console.log(stringifiedString); - expect(stringifiedString).toEqual('"hello"') + expect(stringifiedString).toEqual('"hello"'); expect(smartjson.parse(stringifiedString)).toEqual('hello'); -}) +}); tap.start(); diff --git a/ts/00_commitinfo_data.ts b/ts/00_commitinfo_data.ts index b716667..fe4c412 100644 --- a/ts/00_commitinfo_data.ts +++ b/ts/00_commitinfo_data.ts @@ -3,6 +3,6 @@ */ export const commitinfo = { name: '@pushrocks/smartjson', - version: '5.0.3', + version: '5.0.4', description: 'typed json handlers' } diff --git a/ts/index.ts b/ts/index.ts index 3bfcda7..037d29e 100644 --- a/ts/index.ts +++ b/ts/index.ts @@ -24,14 +24,14 @@ export const stringify = ( export const stringifyBase64 = (...args: Parameters): string => { const stringifiedResult = stringify(...args); return plugins.smartstring.base64.encodeUri(stringifiedResult); -} +}; export const parseBase64 = (base64JsonStringArg: string) => { const simpleStringified = plugins.smartstring.base64.decode(base64JsonStringArg); return parse(simpleStringified); -} +}; -parse +parse; export class Smartjson { /** diff --git a/ts/smartjson.plugins.ts b/ts/smartjson.plugins.ts index c533b4e..0b9620c 100644 --- a/ts/smartjson.plugins.ts +++ b/ts/smartjson.plugins.ts @@ -1,9 +1,7 @@ // @pushrocks scope import * as smartstring from '@pushrocks/smartstring'; -export { - smartstring -} +export { smartstring }; // third party scope import lodashCloneDeep from 'lodash.clonedeep';