fix(core): update

This commit is contained in:
Philipp Kunz 2024-06-06 18:26:11 +02:00
parent 81c227fac1
commit 8fcee684fd
9 changed files with 5840 additions and 31947 deletions

View File

@ -0,0 +1,66 @@
name: Default (not tags)
on:
push:
tags-ignore:
- '**'
env:
IMAGE: registry.gitlab.com/hosttoday/ht-docker-node:npmci
NPMCI_COMPUTED_REPOURL: https://${{gitea.repository_owner}}:${{secrets.GITEA_TOKEN}}@gitea.lossless.digital/${{gitea.repository}}.git
NPMCI_TOKEN_NPM: ${{secrets.NPMCI_TOKEN_NPM}}
NPMCI_TOKEN_NPM2: ${{secrets.NPMCI_TOKEN_NPM2}}
NPMCI_GIT_GITHUBTOKEN: ${{secrets.NPMCI_GIT_GITHUBTOKEN}}
NPMCI_URL_CLOUDLY: ${{secrets.NPMCI_URL_CLOUDLY}}
jobs:
security:
runs-on: ubuntu-latest
continue-on-error: true
container:
image: ${{ env.IMAGE }}
steps:
- uses: actions/checkout@v3
- name: Install pnpm and npmci
run: |
pnpm install -g pnpm
pnpm install -g @shipzone/npmci
- name: Run npm prepare
run: npmci npm prepare
- name: Audit production dependencies
run: |
npmci command npm config set registry https://registry.npmjs.org
npmci command pnpm audit --audit-level=high --prod
continue-on-error: true
- name: Audit development dependencies
run: |
npmci command npm config set registry https://registry.npmjs.org
npmci command pnpm audit --audit-level=high --dev
continue-on-error: true
test:
if: ${{ always() }}
needs: security
runs-on: ubuntu-latest
container:
image: ${{ env.IMAGE }}
steps:
- uses: actions/checkout@v3
- name: Test stable
run: |
npmci node install stable
npmci npm install
npmci npm test
- name: Test build
run: |
npmci node install stable
npmci npm install
npmci npm build

View File

@ -0,0 +1,124 @@
name: Default (tags)
on:
push:
tags:
- '*'
env:
IMAGE: registry.gitlab.com/hosttoday/ht-docker-node:npmci
NPMCI_COMPUTED_REPOURL: https://${{gitea.repository_owner}}:${{secrets.GITEA_TOKEN}}@gitea.lossless.digital/${{gitea.repository}}.git
NPMCI_TOKEN_NPM: ${{secrets.NPMCI_TOKEN_NPM}}
NPMCI_TOKEN_NPM2: ${{secrets.NPMCI_TOKEN_NPM2}}
NPMCI_GIT_GITHUBTOKEN: ${{secrets.NPMCI_GIT_GITHUBTOKEN}}
NPMCI_URL_CLOUDLY: ${{secrets.NPMCI_URL_CLOUDLY}}
jobs:
security:
runs-on: ubuntu-latest
continue-on-error: true
container:
image: ${{ env.IMAGE }}
steps:
- uses: actions/checkout@v3
- name: Prepare
run: |
pnpm install -g pnpm
pnpm install -g @shipzone/npmci
npmci npm prepare
- name: Audit production dependencies
run: |
npmci command npm config set registry https://registry.npmjs.org
npmci command pnpm audit --audit-level=high --prod
continue-on-error: true
- name: Audit development dependencies
run: |
npmci command npm config set registry https://registry.npmjs.org
npmci command pnpm audit --audit-level=high --dev
continue-on-error: true
test:
if: ${{ always() }}
needs: security
runs-on: ubuntu-latest
container:
image: ${{ env.IMAGE }}
steps:
- uses: actions/checkout@v3
- name: Prepare
run: |
pnpm install -g pnpm
pnpm install -g @shipzone/npmci
npmci npm prepare
- name: Test stable
run: |
npmci node install stable
npmci npm install
npmci npm test
- name: Test build
run: |
npmci node install stable
npmci npm install
npmci npm build
release:
needs: test
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
runs-on: ubuntu-latest
container:
image: ${{ env.IMAGE }}
steps:
- uses: actions/checkout@v3
- name: Prepare
run: |
pnpm install -g pnpm
pnpm install -g @shipzone/npmci
npmci npm prepare
- name: Release
run: |
npmci node install stable
npmci npm publish
metadata:
needs: test
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
runs-on: ubuntu-latest
container:
image: ${{ env.IMAGE }}
continue-on-error: true
steps:
- uses: actions/checkout@v3
- name: Prepare
run: |
pnpm install -g pnpm
pnpm install -g @shipzone/npmci
npmci npm prepare
- name: Code quality
run: |
npmci command npm install -g typescript
npmci npm install
- name: Trigger
run: npmci trigger
- name: Build docs and upload artifacts
run: |
npmci node install stable
npmci npm install
pnpm install -g @git.zone/tsdoc
npmci command tsdoc
continue-on-error: true

View File

@ -121,7 +121,7 @@ pages:
stage: metadata
script:
- npmci node install lts
- npmci command npm install -g @gitzone/tsdoc
- npmci command npm install -g @git.zone/tsdoc
- npmci npm prepare
- npmci npm install
- npmci command tsdoc

26075
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -8,16 +8,16 @@
"license": "MIT",
"scripts": {
"test": "tstest test/",
"build": "tsbuild --web"
"build": "tsbuild --web",
"buildDocs": "tsdoc"
},
"devDependencies": {
"@gitzone/tsbuild": "^2.1.28",
"@gitzone/tsbundle": "^1.0.88",
"@gitzone/tstest": "^1.0.58",
"@pushrocks/tapbundle": "^3.2.14",
"@types/node": "^16.10.3",
"tslint": "^6.1.3",
"tslint-config-prettier": "^1.18.0"
"@git.zone/tsbuild": "^2.1.66",
"@git.zone/tsbundle": "^2.0.8",
"@git.zone/tsrun": "^1.2.46",
"@git.zone/tstest": "^1.0.77",
"@push.rocks/tapbundle": "^5.0.8",
"@types/node": "^20.14.2"
},
"private": false,
"browserslist": [
@ -45,9 +45,13 @@
"asynchronous storage",
"thread local storage"
],
"homepage": "https://code.foss.global/push.rocks/smartcls",
"homepage": "https://code.foss.global/push.rocks/smartcls#readme",
"repository": {
"type": "git",
"url": "https://code.foss.global/push.rocks/smartcls.git"
}
"url": "git+https://code.foss.global/push.rocks/smartcls.git"
},
"bugs": {
"url": "https://code.foss.global/push.rocks/smartcls/issues"
},
"type": "module"
}

File diff suppressed because it is too large Load Diff

View File

@ -1,5 +1,5 @@
import { expect, tap } from '@pushrocks/tapbundle';
import * as smartcls from '../ts/index';
import { expect, tap } from '@push.rocks/tapbundle';
import * as smartcls from '../ts/index.js';
const testSmartcls = new smartcls.SmartCls();
@ -7,9 +7,9 @@ tap.testParallel('should get namespace', async (tools) => {
testSmartcls.run(async () => {
testSmartcls.set('some', 'anything');
await tools.delayFor(1000);
expect(testSmartcls.get('some')).to.equal('anything');
expect(testSmartcls.get('some')).toEqual('anything');
tools.delayFor(200).then(() => {
expect(testSmartcls.get('some')).to.equal('anything');
expect(testSmartcls.get('some')).toEqual('anything');
});
});
});
@ -18,9 +18,9 @@ tap.testParallel('should get namespace with other values', async (tools) => {
testSmartcls.run(async () => {
testSmartcls.set('some', 'otherthing');
await tools.delayFor(500);
expect(testSmartcls.get('some')).to.equal('otherthing');
expect(testSmartcls.get('some')).toEqual('otherthing');
tools.delayFor(200).then(() => {
expect(testSmartcls.get('some')).to.equal('otherthing');
expect(testSmartcls.get('some')).toEqual('otherthing');
});
});
});

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/smartcls',
version: '1.0.13',
description: 'Provides a wrapper for native AsyncLocalStorage to manage continuation-local storage.'
}

View File

@ -1,4 +1,4 @@
import * as plugins from './smartcls.plugins';
import * as plugins from './smartcls.plugins.js';
export class SmartCls {
private asyncLocalStorage = new plugins.AsyncLocalStorage();