Compare commits

...

6 Commits

Author SHA1 Message Date
3affd81165 5.0.6 2023-06-03 16:28:41 +02:00
7a8f959cf4 fix(core): update 2023-06-03 16:28:41 +02:00
4df1d41cc7 5.0.5 2022-11-08 11:19:20 +01:00
fb83e41eb3 fix(core): update 2022-11-08 11:19:20 +01:00
27b67b63cc 5.0.4 2022-10-26 10:56:02 +02:00
697afbaf98 fix(core): update 2022-10-26 10:56:01 +02:00
8 changed files with 777 additions and 755 deletions

View File

@ -13,31 +13,24 @@ stages:
- metadata - metadata
before_script: before_script:
- npm install -g @shipzone/npmci - pnpm install -g pnpm
- pnpm install -g @shipzone/npmci
- npmci npm prepare
# ==================== # ====================
# security stage # security stage
# ==================== # ====================
mirror: # ====================
stage: security # security stage
script: # ====================
- npmci git mirror
only:
- tags
tags:
- lossless
- docker
- notpriv
auditProductionDependencies: auditProductionDependencies:
image: registry.gitlab.com/hosttoday/ht-docker-node:npmci image: registry.gitlab.com/hosttoday/ht-docker-node:npmci
stage: security stage: security
script: script:
- npmci npm prepare - npmci command npm config set registry https://registry.npmjs.org
- npmci command npm install --production --ignore-scripts - npmci command pnpm audit --audit-level=high --prod
- npmci command npm config set registry https://registry.npmjs.org
- npmci command npm audit --audit-level=high --only=prod --production
tags: tags:
- lossless
- docker - docker
allow_failure: true allow_failure: true
@ -45,11 +38,10 @@ auditDevDependencies:
image: registry.gitlab.com/hosttoday/ht-docker-node:npmci image: registry.gitlab.com/hosttoday/ht-docker-node:npmci
stage: security stage: security
script: script:
- npmci npm prepare
- npmci command npm install --ignore-scripts
- npmci command npm config set registry https://registry.npmjs.org - 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: tags:
- lossless
- docker - docker
allow_failure: true allow_failure: true
@ -60,7 +52,6 @@ auditDevDependencies:
testStable: testStable:
stage: test stage: test
script: script:
- npmci npm prepare
- npmci node install stable - npmci node install stable
- npmci npm install - npmci npm install
- npmci npm test - npmci npm test
@ -71,10 +62,9 @@ testStable:
testBuild: testBuild:
stage: test stage: test
script: script:
- npmci npm prepare
- npmci node install stable - npmci node install stable
- npmci npm install - npmci npm install
- npmci command npm run build - npmci npm build
coverage: /\d+.?\d+?\%\s*coverage/ coverage: /\d+.?\d+?\%\s*coverage/
tags: tags:
- docker - docker
@ -122,8 +112,7 @@ trigger:
pages: pages:
stage: metadata stage: metadata
script: script:
- npmci node install stable - npmci node install stable
- npmci npm prepare
- npmci npm install - npmci npm install
- npmci command npm run buildDocs - npmci command npm run buildDocs
tags: tags:

View File

@ -1,6 +1,6 @@
{ {
"name": "@pushrocks/smartjson", "name": "@pushrocks/smartjson",
"version": "5.0.3", "version": "5.0.6",
"private": false, "private": false,
"description": "typed json handlers", "description": "typed json handlers",
"main": "dist_ts/index.js", "main": "dist_ts/index.js",
@ -23,15 +23,13 @@
"devDependencies": { "devDependencies": {
"@gitzone/tsbuild": "^2.1.65", "@gitzone/tsbuild": "^2.1.65",
"@gitzone/tsrun": "^1.2.37", "@gitzone/tsrun": "^1.2.37",
"@gitzone/tstest": "^1.0.73", "@gitzone/tstest": "^1.0.74",
"@pushrocks/tapbundle": "^5.0.4", "@pushrocks/tapbundle": "^5.0.4",
"@types/node": "^18.7.17" "@types/node": "^18.11.9"
}, },
"dependencies": { "dependencies": {
"@pushrocks/smartstring": "^4.0.5", "@pushrocks/smartstring": "^4.0.5",
"@types/buffer-json": "^2.0.1", "@types/buffer-json": "^2.0.1",
"@types/fast-json-stable-stringify": "^2.1.0",
"@types/lodash.clonedeep": "^4.5.7",
"buffer-json": "^2.0.0", "buffer-json": "^2.0.0",
"fast-json-stable-stringify": "^2.1.0", "fast-json-stable-stringify": "^2.1.0",
"lodash.clonedeep": "^4.5.0" "lodash.clonedeep": "^4.5.0"

1463
pnpm-lock.yaml generated

File diff suppressed because it is too large Load Diff

View File

@ -21,7 +21,6 @@ Code Style | [![Code Style](https://badgen.net/badge/style/prettier/purple)](htt
PackagePhobia (total standalone install weight) | [![PackagePhobia](https://badgen.net/packagephobia/install/@pushrocks/smartjson)](https://lossless.cloud) PackagePhobia (total standalone install weight) | [![PackagePhobia](https://badgen.net/packagephobia/install/@pushrocks/smartjson)](https://lossless.cloud)
PackagePhobia (package size on registry) | [![PackagePhobia](https://badgen.net/packagephobia/publish/@pushrocks/smartjson)](https://lossless.cloud) PackagePhobia (package size on registry) | [![PackagePhobia](https://badgen.net/packagephobia/publish/@pushrocks/smartjson)](https://lossless.cloud)
BundlePhobia (total size when bundled) | [![BundlePhobia](https://badgen.net/bundlephobia/minzip/@pushrocks/smartjson)](https://lossless.cloud) BundlePhobia (total size when bundled) | [![BundlePhobia](https://badgen.net/bundlephobia/minzip/@pushrocks/smartjson)](https://lossless.cloud)
Platform support | [![Supports Windows 10](https://badgen.net/badge/supports%20Windows%2010/yes/green?icon=windows)](https://lossless.cloud) [![Supports Mac OS X](https://badgen.net/badge/supports%20Mac%20OS%20X/yes/green?icon=apple)](https://lossless.cloud)
## Usage ## Usage
@ -60,7 +59,6 @@ We are always happy for code contributions. If you are not the code contributing
For further information read the linked docs at the top of this readme. For further information read the linked docs at the top of this readme.
> MIT licensed | **©** [Lossless GmbH](https://lossless.gmbh) ## Legal
> MIT licensed | **©** [Task Venture Capital GmbH](https://task.vc)
| By using this npm module you agree to our [privacy policy](https://lossless.gmbH/privacy) | By using this npm module you agree to our [privacy policy](https://lossless.gmbH/privacy)
[![repo-footer](https://lossless.gitlab.io/publicrelations/repofooter.svg)](https://maintainedby.lossless.com)

View File

@ -40,7 +40,7 @@ tap.test('should products stable jsons', async () => {
console.log(jsonString); console.log(jsonString);
}); });
tap.test('should work with base64', async() => { tap.test('should work with base64', async () => {
const someObject = { const someObject = {
hi: 'there', hi: 'there',
thisIs: 'awesome', thisIs: 'awesome',
@ -55,8 +55,8 @@ tap.test('should work with base64', async() => {
tap.test('stringify should handle plain string', async () => { tap.test('stringify should handle plain string', async () => {
const stringifiedString = smartjson.stringify('hello'); const stringifiedString = smartjson.stringify('hello');
console.log(stringifiedString); console.log(stringifiedString);
expect(stringifiedString).toEqual('"hello"') expect(stringifiedString).toEqual('"hello"');
expect(smartjson.parse(stringifiedString)).toEqual('hello'); expect(smartjson.parse(stringifiedString)).toEqual('hello');
}) });
tap.start(); tap.start();

View File

@ -3,6 +3,6 @@
*/ */
export const commitinfo = { export const commitinfo = {
name: '@pushrocks/smartjson', name: '@pushrocks/smartjson',
version: '5.0.3', version: '5.0.6',
description: 'typed json handlers' description: 'typed json handlers'
} }

View File

@ -24,14 +24,14 @@ export const stringify = (
export const stringifyBase64 = (...args: Parameters<typeof stringify>): string => { export const stringifyBase64 = (...args: Parameters<typeof stringify>): string => {
const stringifiedResult = stringify(...args); const stringifiedResult = stringify(...args);
return plugins.smartstring.base64.encodeUri(stringifiedResult); return plugins.smartstring.base64.encodeUri(stringifiedResult);
} };
export const parseBase64 = (base64JsonStringArg: string) => { export const parseBase64 = (base64JsonStringArg: string) => {
const simpleStringified = plugins.smartstring.base64.decode(base64JsonStringArg); const simpleStringified = plugins.smartstring.base64.decode(base64JsonStringArg);
return parse(simpleStringified); return parse(simpleStringified);
} };
parse parse;
export class Smartjson { export class Smartjson {
/** /**

View File

@ -1,9 +1,7 @@
// @pushrocks scope // @pushrocks scope
import * as smartstring from '@pushrocks/smartstring'; import * as smartstring from '@pushrocks/smartstring';
export { export { smartstring };
smartstring
}
// third party scope // third party scope
import lodashCloneDeep from 'lodash.clonedeep'; import lodashCloneDeep from 'lodash.clonedeep';