BREAKING CHANGE(core): switch to esm
This commit is contained in:
		@@ -12,30 +12,35 @@ stages:
 | 
				
			|||||||
  - release
 | 
					  - release
 | 
				
			||||||
  - metadata
 | 
					  - metadata
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					before_script:
 | 
				
			||||||
 | 
					  - npm install -g @shipzone/npmci
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# ====================
 | 
					# ====================
 | 
				
			||||||
# security stage
 | 
					# security stage
 | 
				
			||||||
# ====================
 | 
					# ====================
 | 
				
			||||||
mirror:
 | 
					auditProductionDependencies:
 | 
				
			||||||
 | 
					  image: registry.gitlab.com/hosttoday/ht-docker-node:npmci
 | 
				
			||||||
  stage: security
 | 
					  stage: security
 | 
				
			||||||
  script:
 | 
					  script:
 | 
				
			||||||
    - npmci git mirror
 | 
					    - 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
 | 
				
			||||||
  tags:
 | 
					  tags:
 | 
				
			||||||
    - lossless
 | 
					 | 
				
			||||||
    - docker
 | 
					    - docker
 | 
				
			||||||
    - notpriv
 | 
					  allow_failure: true
 | 
				
			||||||
 | 
					
 | 
				
			||||||
audit:
 | 
					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 npm prepare
 | 
				
			||||||
    - npmci command npm install --ignore-scripts
 | 
					    - 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
 | 
					    - npmci command npm audit --audit-level=high --only=dev
 | 
				
			||||||
  tags:
 | 
					  tags:
 | 
				
			||||||
    - lossless
 | 
					 | 
				
			||||||
    - docker
 | 
					    - docker
 | 
				
			||||||
    - notpriv
 | 
					  allow_failure: true
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# ====================
 | 
					# ====================
 | 
				
			||||||
# test stage
 | 
					# test stage
 | 
				
			||||||
@@ -50,9 +55,7 @@ testStable:
 | 
				
			|||||||
    - npmci npm test
 | 
					    - npmci npm test
 | 
				
			||||||
  coverage: /\d+.?\d+?\%\s*coverage/
 | 
					  coverage: /\d+.?\d+?\%\s*coverage/
 | 
				
			||||||
  tags:
 | 
					  tags:
 | 
				
			||||||
    - lossless
 | 
					 | 
				
			||||||
    - docker
 | 
					    - docker
 | 
				
			||||||
    - priv
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
testBuild:
 | 
					testBuild:
 | 
				
			||||||
  stage: test
 | 
					  stage: test
 | 
				
			||||||
@@ -63,9 +66,7 @@ testBuild:
 | 
				
			|||||||
    - npmci command npm run build
 | 
					    - npmci command npm run build
 | 
				
			||||||
  coverage: /\d+.?\d+?\%\s*coverage/
 | 
					  coverage: /\d+.?\d+?\%\s*coverage/
 | 
				
			||||||
  tags:
 | 
					  tags:
 | 
				
			||||||
    - lossless
 | 
					 | 
				
			||||||
    - docker
 | 
					    - docker
 | 
				
			||||||
    - notpriv
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
release:
 | 
					release:
 | 
				
			||||||
  stage: release
 | 
					  stage: release
 | 
				
			||||||
@@ -85,11 +86,12 @@ release:
 | 
				
			|||||||
codequality:
 | 
					codequality:
 | 
				
			||||||
  stage: metadata
 | 
					  stage: metadata
 | 
				
			||||||
  allow_failure: true
 | 
					  allow_failure: true
 | 
				
			||||||
 | 
					  only:
 | 
				
			||||||
 | 
					    - tags
 | 
				
			||||||
  script:
 | 
					  script:
 | 
				
			||||||
    - npmci command npm install -g tslint typescript
 | 
					    - npmci command npm install -g typescript
 | 
				
			||||||
    - npmci npm prepare
 | 
					    - npmci npm prepare
 | 
				
			||||||
    - npmci npm install
 | 
					    - npmci npm install
 | 
				
			||||||
    - npmci command "tslint -c tslint.json ./ts/**/*.ts"
 | 
					 | 
				
			||||||
  tags:
 | 
					  tags:
 | 
				
			||||||
    - lossless
 | 
					    - lossless
 | 
				
			||||||
    - docker
 | 
					    - docker
 | 
				
			||||||
@@ -109,11 +111,10 @@ trigger:
 | 
				
			|||||||
pages:
 | 
					pages:
 | 
				
			||||||
  stage: metadata
 | 
					  stage: metadata
 | 
				
			||||||
  script:
 | 
					  script:
 | 
				
			||||||
    - npmci node install lts
 | 
					    - npmci node install stable 
 | 
				
			||||||
    - npmci command npm install -g @gitzone/tsdoc
 | 
					 | 
				
			||||||
    - npmci npm prepare
 | 
					    - npmci npm prepare
 | 
				
			||||||
    - npmci npm install
 | 
					    - npmci npm install
 | 
				
			||||||
    - npmci command tsdoc
 | 
					    - npmci command npm run buildDocs
 | 
				
			||||||
  tags:
 | 
					  tags:
 | 
				
			||||||
    - lossless
 | 
					    - lossless
 | 
				
			||||||
    - docker
 | 
					    - docker
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										24
									
								
								.vscode/launch.json
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										24
									
								
								.vscode/launch.json
									
									
									
									
										vendored
									
									
								
							@@ -2,28 +2,10 @@
 | 
				
			|||||||
  "version": "0.2.0",
 | 
					  "version": "0.2.0",
 | 
				
			||||||
  "configurations": [
 | 
					  "configurations": [
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
      "name": "current file",
 | 
					      "command": "npm test",
 | 
				
			||||||
      "type": "node",
 | 
					      "name": "Run npm test",
 | 
				
			||||||
      "request": "launch",
 | 
					      "request": "launch",
 | 
				
			||||||
      "args": [
 | 
					      "type": "node-terminal"
 | 
				
			||||||
        "${relativeFile}"
 | 
					 | 
				
			||||||
      ],
 | 
					 | 
				
			||||||
      "runtimeArgs": ["-r", "@gitzone/tsrun"],
 | 
					 | 
				
			||||||
      "cwd": "${workspaceRoot}",
 | 
					 | 
				
			||||||
      "protocol": "inspector",
 | 
					 | 
				
			||||||
      "internalConsoleOptions": "openOnSessionStart"
 | 
					 | 
				
			||||||
    },
 | 
					 | 
				
			||||||
    {
 | 
					 | 
				
			||||||
      "name": "test.ts",
 | 
					 | 
				
			||||||
      "type": "node",
 | 
					 | 
				
			||||||
      "request": "launch",
 | 
					 | 
				
			||||||
      "args": [
 | 
					 | 
				
			||||||
        "test/test.ts"
 | 
					 | 
				
			||||||
      ],
 | 
					 | 
				
			||||||
      "runtimeArgs": ["-r", "@gitzone/tsrun"],
 | 
					 | 
				
			||||||
      "cwd": "${workspaceRoot}",
 | 
					 | 
				
			||||||
      "protocol": "inspector",
 | 
					 | 
				
			||||||
      "internalConsoleOptions": "openOnSessionStart"
 | 
					 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
  ]
 | 
					  ]
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										2
									
								
								.vscode/settings.json
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								.vscode/settings.json
									
									
									
									
										vendored
									
									
								
							@@ -15,7 +15,7 @@
 | 
				
			|||||||
            "properties": {
 | 
					            "properties": {
 | 
				
			||||||
              "projectType": {
 | 
					              "projectType": {
 | 
				
			||||||
                "type": "string",
 | 
					                "type": "string",
 | 
				
			||||||
                "enum": ["website", "element", "service", "npm"]
 | 
					                "enum": ["website", "element", "service", "npm", "wcc"]
 | 
				
			||||||
              }
 | 
					              }
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
          }
 | 
					          }
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -5,7 +5,7 @@
 | 
				
			|||||||
      "githost": "gitlab.com",
 | 
					      "githost": "gitlab.com",
 | 
				
			||||||
      "gitscope": "pushrocks",
 | 
					      "gitscope": "pushrocks",
 | 
				
			||||||
      "gitrepo": "smartmatch",
 | 
					      "gitrepo": "smartmatch",
 | 
				
			||||||
      "shortDescription": "a minimal matching library using picomatch",
 | 
					      "description": "a minimal matching library using picomatch",
 | 
				
			||||||
      "npmPackagename": "@pushrocks/smartmatch",
 | 
					      "npmPackagename": "@pushrocks/smartmatch",
 | 
				
			||||||
      "license": "MIT",
 | 
					      "license": "MIT",
 | 
				
			||||||
      "projectDomain": "push.rocks"
 | 
					      "projectDomain": "push.rocks"
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										14620
									
								
								package-lock.json
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										14620
									
								
								package-lock.json
									
									
									
										generated
									
									
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							
							
								
								
									
										21
									
								
								package.json
									
									
									
									
									
								
							
							
						
						
									
										21
									
								
								package.json
									
									
									
									
									
								
							@@ -5,24 +5,24 @@
 | 
				
			|||||||
  "description": "a minimal matching library using picomatch",
 | 
					  "description": "a minimal matching library using picomatch",
 | 
				
			||||||
  "main": "dist_ts/index.js",
 | 
					  "main": "dist_ts/index.js",
 | 
				
			||||||
  "typings": "dist_ts/index.d.ts",
 | 
					  "typings": "dist_ts/index.d.ts",
 | 
				
			||||||
 | 
					  "type": "module",
 | 
				
			||||||
  "author": "Lossless GmbH",
 | 
					  "author": "Lossless GmbH",
 | 
				
			||||||
  "license": "MIT",
 | 
					  "license": "MIT",
 | 
				
			||||||
  "scripts": {
 | 
					  "scripts": {
 | 
				
			||||||
    "test": "(tstest test/)",
 | 
					    "test": "(tstest test/)",
 | 
				
			||||||
    "build": "(tsbuild && tsbundle npm)",
 | 
					    "build": "(tsbuild && tsbundle npm)",
 | 
				
			||||||
    "format": "(gitzone format)"
 | 
					    "format": "(gitzone format)",
 | 
				
			||||||
 | 
					    "buildDocs": "tsdoc"
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  "devDependencies": {
 | 
					  "devDependencies": {
 | 
				
			||||||
    "@gitzone/tsbuild": "^2.1.24",
 | 
					    "@gitzone/tsbuild": "^2.1.65",
 | 
				
			||||||
    "@gitzone/tsbundle": "^1.0.68",
 | 
					    "@gitzone/tsbundle": "^2.0.7",
 | 
				
			||||||
    "@gitzone/tstest": "^1.0.15",
 | 
					    "@gitzone/tstest": "^1.0.73",
 | 
				
			||||||
    "@pushrocks/tapbundle": "^3.2.1",
 | 
					    "@pushrocks/tapbundle": "^5.0.4",
 | 
				
			||||||
    "@types/node": "^14.0.5",
 | 
					    "@types/node": "^18.6.5"
 | 
				
			||||||
    "tslint": "^6.1.2",
 | 
					 | 
				
			||||||
    "tslint-config-prettier": "^1.15.0"
 | 
					 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  "dependencies": {
 | 
					  "dependencies": {
 | 
				
			||||||
    "matcher": "^3.0.0"
 | 
					    "matcher": "^5.0.0"
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  "files": [
 | 
					  "files": [
 | 
				
			||||||
    "ts/**/*",
 | 
					    "ts/**/*",
 | 
				
			||||||
@@ -35,5 +35,8 @@
 | 
				
			|||||||
    "cli.js",
 | 
					    "cli.js",
 | 
				
			||||||
    "npmextra.json",
 | 
					    "npmextra.json",
 | 
				
			||||||
    "readme.md"
 | 
					    "readme.md"
 | 
				
			||||||
 | 
					  ],
 | 
				
			||||||
 | 
					  "browserslist": [
 | 
				
			||||||
 | 
					    "last 1 chrome versions"
 | 
				
			||||||
  ]
 | 
					  ]
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										21
									
								
								readme.md
									
									
									
									
									
								
							
							
						
						
									
										21
									
								
								readme.md
									
									
									
									
									
								
							@@ -8,13 +8,20 @@ a minimal matching library using picomatch
 | 
				
			|||||||
* [docs (typedoc)](https://pushrocks.gitlab.io/smartmatch/)
 | 
					* [docs (typedoc)](https://pushrocks.gitlab.io/smartmatch/)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
## Status for master
 | 
					## Status for master
 | 
				
			||||||
[](https://gitlab.com/pushrocks/smartmatch/commits/master)
 | 
					
 | 
				
			||||||
[](https://gitlab.com/pushrocks/smartmatch/commits/master)
 | 
					Status Category | Status Badge
 | 
				
			||||||
[](https://www.npmjs.com/package/@pushrocks/smartmatch)
 | 
					-- | --
 | 
				
			||||||
[](https://snyk.io/test/npm/@pushrocks/smartmatch)
 | 
					GitLab Pipelines | [](https://lossless.cloud)
 | 
				
			||||||
[](https://nodejs.org/dist/latest-v10.x/docs/api/)
 | 
					GitLab Pipline Test Coverage | [](https://lossless.cloud)
 | 
				
			||||||
[](https://nodejs.org/dist/latest-v10.x/docs/api/)
 | 
					npm | [](https://lossless.cloud)
 | 
				
			||||||
[](https://prettier.io/)
 | 
					Snyk | [](https://lossless.cloud)
 | 
				
			||||||
 | 
					TypeScript Support | [](https://lossless.cloud)
 | 
				
			||||||
 | 
					node Support | [](https://nodejs.org/dist/latest-v10.x/docs/api/)
 | 
				
			||||||
 | 
					Code Style | [](https://lossless.cloud)
 | 
				
			||||||
 | 
					PackagePhobia (total standalone install weight) | [](https://lossless.cloud)
 | 
				
			||||||
 | 
					PackagePhobia (package size on registry) | [](https://lossless.cloud)
 | 
				
			||||||
 | 
					BundlePhobia (total size when bundled) | [](https://lossless.cloud)
 | 
				
			||||||
 | 
					Platform support | [](https://lossless.cloud) [](https://lossless.cloud)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
## Usage
 | 
					## Usage
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,13 +1,13 @@
 | 
				
			|||||||
import { expect, tap } from '@pushrocks/tapbundle';
 | 
					import { expect, tap } from '@pushrocks/tapbundle';
 | 
				
			||||||
import * as smartmatch from '../ts/index';
 | 
					import * as smartmatch from '../ts/index.js';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
tap.test('first test', async () => {
 | 
					tap.test('first test', async () => {
 | 
				
			||||||
  const smartMatchInstance = new smartmatch.SmartMatch('*.any');
 | 
					  const smartMatchInstance = new smartmatch.SmartMatch('*.any');
 | 
				
			||||||
  const isAMatch = smartMatchInstance.match('wow.any');
 | 
					  const isAMatch = smartMatchInstance.match('wow.any');
 | 
				
			||||||
  const isNotAMatch = smartMatchInstance.match('wow.not');
 | 
					  const isNotAMatch = smartMatchInstance.match('wow.not');
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  expect(isAMatch).to.be.true;
 | 
					  expect(isAMatch).toBeTrue();
 | 
				
			||||||
  expect(isNotAMatch).to.be.false;
 | 
					  expect(isNotAMatch).toBeFalse();
 | 
				
			||||||
});
 | 
					});
 | 
				
			||||||
 | 
					
 | 
				
			||||||
tap.start();
 | 
					tap.start();
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										8
									
								
								ts/00_commitinfo_data.ts
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										8
									
								
								ts/00_commitinfo_data.ts
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,8 @@
 | 
				
			|||||||
 | 
					/**
 | 
				
			||||||
 | 
					 * autocreated commitinfo by @pushrocks/commitinfo
 | 
				
			||||||
 | 
					 */
 | 
				
			||||||
 | 
					export const commitinfo = {
 | 
				
			||||||
 | 
					  name: '@pushrocks/smartmatch',
 | 
				
			||||||
 | 
					  version: '2.0.0',
 | 
				
			||||||
 | 
					  description: 'a minimal matching library using picomatch'
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
@@ -1,4 +1,4 @@
 | 
				
			|||||||
import * as plugins from './smartmatch.plugins';
 | 
					import * as plugins from './smartmatch.plugins.js';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export class SmartMatch {
 | 
					export class SmartMatch {
 | 
				
			||||||
  public wildcard: string;
 | 
					  public wildcard: string;
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,4 +1,4 @@
 | 
				
			|||||||
// third party scope
 | 
					// third party scope
 | 
				
			||||||
import matcher from 'matcher';
 | 
					import * as matcher from 'matcher';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export { matcher };
 | 
					export { matcher };
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										10
									
								
								tsconfig.json
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										10
									
								
								tsconfig.json
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,10 @@
 | 
				
			|||||||
 | 
					{
 | 
				
			||||||
 | 
					  "compilerOptions": {
 | 
				
			||||||
 | 
					    "experimentalDecorators": true,
 | 
				
			||||||
 | 
					    "useDefineForClassFields": false,
 | 
				
			||||||
 | 
					    "target": "ES2022",
 | 
				
			||||||
 | 
					    "module": "ES2022",
 | 
				
			||||||
 | 
					    "moduleResolution": "nodenext",
 | 
				
			||||||
 | 
					    "esModuleInterop": true
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
							
								
								
									
										17
									
								
								tslint.json
									
									
									
									
									
								
							
							
						
						
									
										17
									
								
								tslint.json
									
									
									
									
									
								
							@@ -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"
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
		Reference in New Issue
	
	Block a user