BREAKING CHANGE(core): update

This commit is contained in:
Philipp Kunz 2022-06-09 19:59:21 +02:00
parent a7c6f4343d
commit 8c0efd532f
14 changed files with 10742 additions and 960 deletions

20
.gitignore vendored
View File

@ -1,2 +1,20 @@
node_modules/ .nogit/
# artifacts
coverage/ coverage/
public/
pages/
# installs
node_modules/
# caches
.yarn/
.cache/
.rpt2_cache
# builds
dist/
dist_*/
# custom

View File

@ -1,16 +1,19 @@
# gitzone standard # gitzone ci_default
image: hosttoday/ht-docker-node:npmci image: registry.gitlab.com/hosttoday/ht-docker-node:npmci
cache: cache:
paths: paths:
- .npmci_cache/ - .npmci_cache/
key: "$CI_BUILD_STAGE" key: '$CI_BUILD_STAGE'
stages: stages:
- security - security
- test - test
- release - release
- metadata - metadata
before_script:
- npm install -g @shipzone/npmci
# ==================== # ====================
# security stage # security stage
@ -18,127 +21,113 @@ stages:
mirror: mirror:
stage: security stage: security
script: script:
- npmci git mirror - npmci git mirror
only:
- tags
tags: tags:
- docker - lossless
- notpriv - docker
- notpriv
snyk: auditProductionDependencies:
image: registry.gitlab.com/hosttoday/ht-docker-node:npmci
stage: security stage: security
script: script:
- npmci npm prepare - npmci npm prepare
- npmci command npm install -g snyk - npmci command npm install --production --ignore-scripts
- npmci command npm install --ignore-scripts - npmci command npm config set registry https://registry.npmjs.org
- npmci command snyk test - npmci command npm audit --audit-level=high --only=prod --production
tags: tags:
- docker - docker
- notpriv
sast:
stage: security
image: registry.gitlab.com/hosttoday/ht-docker-dbase:npmci
variables:
DOCKER_DRIVER: overlay2
allow_failure: true allow_failure: true
services:
- docker:stable-dind auditDevDependencies:
image: registry.gitlab.com/hosttoday/ht-docker-node:npmci
stage: security
script: script:
- npmci npm prepare - npmci npm prepare
- npmci npm install - npmci command npm install --ignore-scripts
- npmci command npm run build - npmci command npm config set registry https://registry.npmjs.org
- export SP_VERSION=$(echo "$CI_SERVER_VERSION" | sed 's/^\([0-9]*\)\.\([0-9]*\).*/\1-\2-stable/') - npmci command npm audit --audit-level=high --only=dev
- docker run
--env SAST_CONFIDENCE_LEVEL="${SAST_CONFIDENCE_LEVEL:-3}"
--volume "$PWD:/code"
--volume /var/run/docker.sock:/var/run/docker.sock
"registry.gitlab.com/gitlab-org/security-products/sast:$SP_VERSION" /app/bin/run /code
artifacts:
reports:
sast: gl-sast-report.json
tags: tags:
- docker - docker
- priv allow_failure: true
# ==================== # ====================
# test stage # test stage
# ==================== # ====================
testLTS: testStable:
stage: test stage: test
script: script:
- npmci npm prepare - npmci npm prepare
- npmci node install lts - npmci node install stable
- npmci npm install - npmci npm install
- npmci npm test - npmci npm test
coverage: /\d+.?\d+?\%\s*coverage/ coverage: /\d+.?\d+?\%\s*coverage/
tags: tags:
- docker - docker
- notpriv
testBuild:
testSTABLE:
stage: test stage: test
script: script:
- npmci npm prepare - npmci npm prepare
- npmci node install stable - npmci node install stable
- npmci npm install - npmci npm install
- npmci npm test - npmci command npm run build
coverage: /\d+.?\d+?\%\s*coverage/ coverage: /\d+.?\d+?\%\s*coverage/
tags: tags:
- docker - docker
- notpriv
release: release:
stage: release stage: release
script: script:
- npmci node install stable - npmci node install stable
- npmci npm publish - npmci npm publish
only: only:
- tags - tags
tags: tags:
- docker - lossless
- notpriv - docker
- notpriv
# ==================== # ====================
# metadata stage # metadata stage
# ==================== # ====================
codequality: codequality:
stage: metadata stage: metadata
image: docker:stable
allow_failure: true allow_failure: true
services: only:
- docker:stable-dind - tags
script: script:
- export SP_VERSION=$(echo "$CI_SERVER_VERSION" | sed 's/^\([0-9]*\)\.\([0-9]*\).*/\1-\2-stable/') - npmci command npm install -g typescript
- docker run - npmci npm prepare
--env SOURCE_CODE="$PWD" - npmci npm install
--volume "$PWD":/code
--volume /var/run/docker.sock:/var/run/docker.sock
"registry.gitlab.com/gitlab-org/security-products/codequality:$SP_VERSION" /code
artifacts:
paths: [codeclimate.json]
tags: tags:
- docker - lossless
- priv - docker
- priv
trigger: trigger:
stage: metadata stage: metadata
script: script:
- npmci trigger - npmci trigger
only: only:
- tags - tags
tags: tags:
- docker - lossless
- notpriv - docker
- notpriv
pages: pages:
image: hosttoday/ht-docker-node:npmci
stage: metadata stage: metadata
script: script:
- npmci command npm install -g typedoc typescript - npmci node install stable
- npmci npm prepare - npmci npm prepare
- npmci npm install - npmci npm install
- npmci command typedoc --module "commonjs" --target "ES2016" --out public/ ts/ - npmci command npm run buildDocs
tags: tags:
- lossless
- docker - docker
- notpriv - notpriv
only: only:
@ -146,5 +135,5 @@ pages:
artifacts: artifacts:
expire_in: 1 week expire_in: 1 week
paths: paths:
- public - public
allow_failure: true allow_failure: true

11
.vscode/launch.json vendored Normal file
View File

@ -0,0 +1,11 @@
{
"version": "0.2.0",
"configurations": [
{
"command": "npm test",
"name": "Run npm test",
"request": "launch",
"type": "node-terminal"
}
]
}

26
.vscode/settings.json vendored Normal file
View File

@ -0,0 +1,26 @@
{
"json.schemas": [
{
"fileMatch": ["/npmextra.json"],
"schema": {
"type": "object",
"properties": {
"npmci": {
"type": "object",
"description": "settings for npmci"
},
"gitzone": {
"type": "object",
"description": "settings for gitzone",
"properties": {
"projectType": {
"type": "string",
"enum": ["website", "element", "service", "npm", "wcc"]
}
}
}
}
}
}
]
}

View File

@ -4,11 +4,12 @@
"npmAccessLevel": "public" "npmAccessLevel": "public"
}, },
"gitzone": { "gitzone": {
"projectType": "npm",
"module": { "module": {
"githost": "gitlab.com", "githost": "gitlab.com",
"gitscope": "pushrocks", "gitscope": "pushrocks",
"gitrepo": "smartevent", "gitrepo": "smartevent",
"shortDescription": "lightweight gulp replacement", "description": "lightweight gulp replacement",
"npmPackagename": "@pushrocks/smartgulp", "npmPackagename": "@pushrocks/smartgulp",
"license": "MIT" "license": "MIT"
} }

11373
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -3,11 +3,12 @@
"version": "2.0.2", "version": "2.0.2",
"private": false, "private": false,
"description": "lightweight gulp replacement", "description": "lightweight gulp replacement",
"main": "dist/index.js", "main": "dist_ts/index.js",
"typings": "dist/index.d.ts", "typings": "dist_ts/index.d.ts",
"scripts": { "scripts": {
"test": "(tstest test/)", "test": "(tstest test/)",
"build": "(tsbuild)" "build": "(tsbuild --web --allowimplicitany)",
"buildDocs": "tsdoc"
}, },
"repository": { "repository": {
"type": "git", "type": "git",
@ -23,19 +24,35 @@
}, },
"homepage": "https://gitlab.com/pushrocks/smartgulp#README", "homepage": "https://gitlab.com/pushrocks/smartgulp#README",
"devDependencies": { "devDependencies": {
"@gitzone/tsbuild": "^2.1.8", "@gitzone/tsbuild": "^2.1.63",
"@gitzone/tsrun": "^1.1.17", "@gitzone/tsrun": "^1.2.35",
"@gitzone/tstest": "^1.0.18", "@gitzone/tstest": "^1.0.71",
"@pushrocks/tapbundle": "^3.0.7", "@pushrocks/tapbundle": "^5.0.3",
"@types/node": "^11.9.4", "@types/node": "^17.0.41",
"gulp-function": "^2.2.14" "gulp-function": "^2.2.14"
}, },
"dependencies": { "dependencies": {
"@pushrocks/smartevent": "^2.0.3", "@pushrocks/smartevent": "^2.0.5",
"@pushrocks/smartfile": "^7.0.0", "@pushrocks/smartfile": "^10.0.2",
"@pushrocks/smartpromise": "^2.0.5", "@pushrocks/smartpromise": "^3.1.7",
"@pushrocks/smartstream": "^1.0.14", "@pushrocks/smartstream": "^2.0.3",
"@types/through2": "^2.0.34", "@types/through2": "^2.0.34",
"through2": "^3.0.0" "through2": "^4.0.2"
} },
} "type": "module",
"browserslist": [
"last 1 chrome versions"
],
"files": [
"ts/**/*",
"ts_web/**/*",
"dist/**/*",
"dist_*/**/*",
"dist_ts/**/*",
"dist_ts_web/**/*",
"assets/**/*",
"cli.js",
"npmextra.json",
"readme.md"
]
}

View File

@ -8,19 +8,31 @@ lightweight gulp replacement
* [docs (typedoc)](https://pushrocks.gitlab.io/smartevent/) * [docs (typedoc)](https://pushrocks.gitlab.io/smartevent/)
## Status for master ## Status for master
[![build status](https://gitlab.com/pushrocks/smartevent/badges/master/build.svg)](https://gitlab.com/pushrocks/smartevent/commits/master)
[![coverage report](https://gitlab.com/pushrocks/smartevent/badges/master/coverage.svg)](https://gitlab.com/pushrocks/smartevent/commits/master) Status Category | Status Badge
[![npm downloads per month](https://img.shields.io/npm/dm/@pushrocks/smartgulp.svg)](https://www.npmjs.com/package/@pushrocks/smartgulp) -- | --
[![Known Vulnerabilities](https://snyk.io/test/npm/@pushrocks/smartgulp/badge.svg)](https://snyk.io/test/npm/@pushrocks/smartgulp) GitLab Pipelines | [![pipeline status](https://gitlab.com/pushrocks/smartevent/badges/master/pipeline.svg)](https://lossless.cloud)
[![TypeScript](https://img.shields.io/badge/TypeScript->=%203.x-blue.svg)](https://nodejs.org/dist/latest-v10.x/docs/api/) GitLab Pipline Test Coverage | [![coverage report](https://gitlab.com/pushrocks/smartevent/badges/master/coverage.svg)](https://lossless.cloud)
[![node](https://img.shields.io/badge/node->=%2010.x.x-blue.svg)](https://nodejs.org/dist/latest-v10.x/docs/api/) npm | [![npm downloads per month](https://badgen.net/npm/dy/@pushrocks/smartgulp)](https://lossless.cloud)
[![JavaScript Style Guide](https://img.shields.io/badge/code%20style-standard-brightgreen.svg)](http://standardjs.com/) Snyk | [![Known Vulnerabilities](https://badgen.net/snyk/pushrocks/smartevent)](https://lossless.cloud)
TypeScript Support | [![TypeScript](https://badgen.net/badge/TypeScript/>=%203.x/blue?icon=typescript)](https://lossless.cloud)
node Support | [![node](https://img.shields.io/badge/node->=%2010.x.x-blue.svg)](https://nodejs.org/dist/latest-v10.x/docs/api/)
Code Style | [![Code Style](https://badgen.net/badge/style/prettier/purple)](https://lossless.cloud)
PackagePhobia (total standalone install weight) | [![PackagePhobia](https://badgen.net/packagephobia/install/@pushrocks/smartgulp)](https://lossless.cloud)
PackagePhobia (package size on registry) | [![PackagePhobia](https://badgen.net/packagephobia/publish/@pushrocks/smartgulp)](https://lossless.cloud)
BundlePhobia (total size when bundled) | [![BundlePhobia](https://badgen.net/bundlephobia/minzip/@pushrocks/smartgulp)](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
## Contribution
We are always happy for code contributions. If you are not the code contributing type that is ok. Still, maintaining Open Source repositories takes considerable time and thought. If you like the quality of what we do and our modules are useful to you we would appreciate a little monthly contribution: You can [contribute one time](https://lossless.link/contribute-onetime) or [contribute monthly](https://lossless.link/contribute). :)
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) > MIT licensed | **©** [Lossless GmbH](https://lossless.gmbh)
| By using this npm module you agree to our [privacy policy](https://lossless.gmbH/privacy.html) | By using this npm module you agree to our [privacy policy](https://lossless.gmbH/privacy)
[![repo-footer](https://pushrocks.gitlab.io/assets/repo-footer.svg)](https://maintainedby.lossless.com) [![repo-footer](https://lossless.gitlab.io/publicrelations/repofooter.svg)](https://maintainedby.lossless.com)

View File

@ -1,16 +1,16 @@
import { expect, tap } from '@pushrocks/tapbundle'; import { expect, tap } from '@pushrocks/tapbundle';
import * as smartgulp from '../ts/index'; import * as smartgulp from '../ts/index.js';
import * as smartstream from '@pushrocks/smartstream'; import * as smartstream from '@pushrocks/smartstream';
import * as gulpFunction from 'gulp-function'; import * as gulpFunction from 'gulp-function';
import * as smartq from 'smartq'; import * as smartq from 'smartq';
tap.test('smartgulp.src -> should read a directoy', async tools => { tap.test('smartgulp.src -> should read a directoy', async (tools) => {
let done = smartq.defer(); let done = smartq.defer();
smartgulp smartgulp
.src(['./test/testfiles/**/*.md']) .src(['./test/testfiles/**/*.md'])
.pipe( .pipe(
gulpFunction.forEach(async fileArg => { gulpFunction.forEach(async (fileArg) => {
console.log(fileArg.path); console.log(fileArg.path);
}) })
) )
@ -27,7 +27,7 @@ tap.test('smartgulp shoould replace files', async () => {
smartgulp smartgulp
.src(['./test/testfiles/**/*.md']) .src(['./test/testfiles/**/*.md'])
.pipe( .pipe(
gulpFunction.forEach(async fileArg => { gulpFunction.forEach(async (fileArg) => {
console.log(fileArg.path); console.log(fileArg.path);
}) })
) )

8
ts/00_commitinfo_data.ts Normal file
View File

@ -0,0 +1,8 @@
/**
* autocreated commitinfo by @pushrocks/commitinfo
*/
export const commitinfo = {
name: '@pushrocks/smartgulp',
version: '3.0.0',
description: 'lightweight gulp replacement'
}

View File

@ -1 +1 @@
export * from './smartgulp.gulpapi'; export * from './smartgulp.gulpapi.js';

View File

@ -1,6 +1,6 @@
// this file contains the code to generate and handle the stream // this file contains the code to generate and handle the stream
import * as plugins from './smartgulp.plugins'; import * as plugins from './smartgulp.plugins.js';
import { Smartfile } from '@pushrocks/smartfile'; import { Smartfile } from '@pushrocks/smartfile';
import { Transform } from 'stream'; import { Transform } from 'stream';

View File

@ -1,6 +1,6 @@
// this file contains the implementation of the standard gulp api // this file contains the implementation of the standard gulp api
import * as plugins from './smartgulp.plugins'; import * as plugins from './smartgulp.plugins.js';
import { GulpStream } from './smartgulp.classes.gulpstream'; import { GulpStream } from './smartgulp.classes.gulpstream.js';
import { Transform } from 'stream'; import { Transform } from 'stream';
import { Smartfile } from '@pushrocks/smartfile'; import { Smartfile } from '@pushrocks/smartfile';
@ -18,7 +18,7 @@ export let src = (minimatchPathArrayArg: string[]): Transform => {
} }
gulpStream.pipeSmartfileArray(smartfileArray); gulpStream.pipeSmartfileArray(smartfileArray);
}; };
handleFiles().catch(err => { handleFiles().catch((err) => {
console.log(err); console.log(err);
}); });
return gulpStream.stream; return gulpStream.stream;
@ -32,7 +32,7 @@ export let replace = () => {
await file.write(); await file.write();
cb(null, file); cb(null, file);
}, },
cb => { (cb) => {
cb(); cb();
} }
); );

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"
}