@blockcerts/blockcerts-verifier 1.55.0 → 1.56.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/karma.conf.js CHANGED
@@ -11,14 +11,15 @@ module.exports = config => {
11
11
  //
12
12
  // npm run test -- --grep test/foo/bar.test.js
13
13
  // npm run test -- --grep test/bar/*
14
- { pattern: config.grep ? config.grep : 'test/e2e/*.test.js', type: 'module' }
14
+ { pattern: config.grep ? config.grep : 'test/e2e/*.test.js', type: 'module', nocache: true }
15
15
  ],
16
16
 
17
17
  browsers: ['FirefoxHeadless'], // Chrome from default config
18
18
 
19
19
  esm: {
20
20
  nodeResolve: true
21
- }
21
+ },
22
+ listenAddress: '::' // https://github.com/karma-runner/karma/issues/3730#issuecomment-1122075632
22
23
  // you can overwrite/extend the config further
23
24
  })
24
25
  );
package/package.json CHANGED
@@ -1,20 +1,22 @@
1
1
  {
2
2
  "name": "@blockcerts/blockcerts-verifier",
3
- "version": "1.55.0",
3
+ "version": "1.56.1",
4
4
  "description": "A standalone universal viewer and verifier for blockcerts credentials",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "https://github.com/blockchain-certificates/blockcerts-verifier.git"
8
8
  },
9
9
  "main": "dist/main.js",
10
+ "engines": {
11
+ "node": ">=18.0.0 <19.0.0"
12
+ },
10
13
  "dependencies": {
11
- "@babel/runtime": "^7.6.0",
12
- "@blockcerts/cert-verifier-js": "^6.7.0",
14
+ "@blockcerts/cert-verifier-js": "^6.7.1",
13
15
  "@blockcerts/cert-verifier-js-v1-legacy": "^3.0.0",
14
16
  "@polymer/lit-element": "0.5.1",
15
- "@polymer/polymer": "3.4.1",
16
- "@webcomponents/webcomponentsjs": "2.6.0",
17
- "autolinker": "^3.14.1",
17
+ "@polymer/polymer": "3.5.1",
18
+ "@webcomponents/webcomponentsjs": "2.8.0",
19
+ "autolinker": "^4.0.0",
18
20
  "cssfilter": "0.0.10",
19
21
  "html-canvas": "^0.0.4",
20
22
  "jspdf": "^2.5.1",
@@ -27,29 +29,25 @@
27
29
  "xss": "^1.0.3"
28
30
  },
29
31
  "devDependencies": {
30
- "@babel/core": "^7.6.0",
31
- "@babel/plugin-transform-runtime": "^7.6.0",
32
- "@babel/preset-env": "^7.6.0",
33
- "@babel/preset-typescript": "^7.9.0",
34
32
  "@commitlint/cli": "^17.1.2",
35
33
  "@commitlint/config-conventional": "^17.2.0",
36
- "@open-wc/testing": "^3.1.7",
37
- "@open-wc/testing-karma": "^4.0.3",
38
- "@polymer/iron-demo-helpers": "^3.0.0-pre.19",
39
- "@rollup/plugin-commonjs": "^22.0.0",
40
- "@rollup/plugin-node-resolve": "^13.3.0",
41
- "@types/jest": "^27.0.0",
34
+ "@open-wc/testing": "^3.2.0",
35
+ "@open-wc/testing-karma": "^4.0.9",
36
+ "@rollup/plugin-commonjs": "^25.0.2",
37
+ "@rollup/plugin-node-resolve": "^15.1.0",
38
+ "@rollup/plugin-replace": "^5.0.2",
39
+ "@rollup/plugin-terser": "^0.4.3",
40
+ "@rollup/plugin-typescript": "^11.1.1",
41
+ "@types/jest": "^29.5.2",
42
42
  "@types/qrcode-svg": "^1.1.1",
43
43
  "@types/sinon": "^10.0.0",
44
44
  "@typescript-eslint/eslint-plugin": "^4.16.1",
45
45
  "@typescript-eslint/parser": "^4.16.1",
46
- "axe-core": "^4.0.1",
47
- "babel-jest": "^29.4.3",
48
46
  "codecov": "^3.1.0",
49
- "concurrently": "^7.3.0",
47
+ "concurrently": "^8.2.0",
50
48
  "deepmerge": "^4.2.2",
51
49
  "eslint": "^7.21.0",
52
- "eslint-config-standard": "^16.0.2",
50
+ "eslint-config-standard": "^17.1.0",
53
51
  "eslint-config-standard-with-typescript": "^20.0.0",
54
52
  "eslint-plugin-import": "^2.20.2",
55
53
  "eslint-plugin-node": "^11.1.0",
@@ -57,54 +55,38 @@
57
55
  "eslint-plugin-standard": "^5.0.0",
58
56
  "express": "^4.16.3",
59
57
  "husky": "^7.0.1",
60
- "jest": "^25.5.4",
58
+ "jest": "^29.5.0",
61
59
  "jest-canvas-mock": "^2.4.0",
60
+ "jest-environment-jsdom": "^29.5.0",
62
61
  "jest-fetch-mock": "^3.0.0",
63
62
  "karma-firefox-launcher": "^2.0.0",
64
- "polymer-cli": "^1.8.1",
65
63
  "pwa-helpers": "^0.8.2",
66
- "rollup": "^2.2.0",
67
- "rollup-plugin-babel": "^4.3.3",
68
- "rollup-plugin-commonjs": "^10.0.0",
64
+ "rollup": "^3.25.3",
69
65
  "rollup-plugin-livereload": "^2.0.0",
70
- "rollup-plugin-node-resolve": "^5.0.0",
71
- "rollup-plugin-replace": "^2.0.0",
72
- "rollup-plugin-serve": "^1.0.1",
73
- "rollup-plugin-terser": "^7.0.0",
74
- "rollup-plugin-typescript": "^1.0.1",
66
+ "rollup-plugin-serve": "^2.0.2",
75
67
  "sass-lint": "^1.12.1",
76
- "semantic-release": "^18.0.0",
77
- "semistandard": "^14.1.0",
68
+ "semantic-release": "^21.0.5",
78
69
  "sinon": "^11.1.0",
79
- "snazzy": "^9.0.0",
80
- "ts-jest": "^26.5.2",
81
- "typescript": "^4.2.2",
82
- "watch": "^1.0.2",
83
- "wc-sass-render": "blockchain-certificates/wc-sass-render",
84
- "wct-browser-legacy": "^1.0.2",
85
- "web-component-tester": "^6.9.0"
70
+ "ts-jest": "^29.1.0",
71
+ "typescript": "^5.1.3",
72
+ "wc-sass-render": "blockchain-certificates/wc-sass-render"
86
73
  },
87
74
  "scripts": {
88
- "build": "rollup -c rollup.config.js",
89
- "build:sanitizer": "rollup -c rollup-sanitizer.config.js",
75
+ "build": "rollup -c rollup.config.mjs",
76
+ "build:sanitizer": "rollup -c rollup-sanitizer.config.mjs",
90
77
  "test": "npm run test:application",
91
78
  "test:build": "npm run test:components:retrieve && polymer test; npm run test:karma",
92
79
  "test:karma": "tsc -p tsconfig-test.json && karma start; npm run test:karma:cleanup",
93
80
  "test:karma:cleanup": "git clean -dfq",
94
- "test:components:retrieve": "node test/wct-script/retrieveTestFiles",
95
- "test:components:retrieve:watch": "npm run test:components:retrieve -- --watch",
96
- "test:components:persist": "concurrently 'npm run test:components:retrieve:watch' 'polymer test -p'",
97
81
  "test:application": "jest --runInBand --silent",
98
82
  "test:application:watch": "jest --watch",
99
83
  "test:coverage": "jest --maxWorkers=4 --silent --noStackTrace --coverage",
100
84
  "test:coverage:report": "codecov",
101
- "start": "concurrently 'rollup -c rollup.dev.config.js -w' 'npm run styles:compile:watch' 'npm run start:mock-server'",
85
+ "start": "concurrently 'rollup -c rollup.dev.config.mjs -w' 'npm run styles:compile:watch' 'npm run start:mock-server'",
102
86
  "start:mock-server": "node test/mock-server",
103
87
  "styles:compile": "sass-render ./src/components/**/*.scss",
104
88
  "styles:compile:watch": "sass-render ./src/components/**/*.scss -w",
105
- "lint": "npm run lint:js && npm run lint:ts && npm run lint:styles",
106
- "lint:fix": "semistandard --fix",
107
- "lint:js": "semistandard \"**/*.js\" | snazzy",
89
+ "lint": "npm run lint:ts && npm run lint:styles",
108
90
  "lint:ts": "eslint . --ext .ts",
109
91
  "lint:styles": "sass-lint --verbose",
110
92
  "semantic-release": "semantic-release",
@@ -0,0 +1,21 @@
1
+ import resolve from '@rollup/plugin-node-resolve';
2
+ import commonjs from '@rollup/plugin-commonjs';
3
+
4
+ export default {
5
+ input: 'sanitizer/index.js',
6
+ name: 'Sanitizer',
7
+ output: [
8
+ {
9
+ file: 'sanitizer/sanitizer.js',
10
+ format: 'es',
11
+ banner: '/**\n * @warning\n *\n * THIS IS AN AUTO GENERATED FILE. IF YOU WISH TO WHITELIST PROPERTIES / TAGS, PLEASE DO IT SO IN sanitizer/index.js \n *\n * More Information: https://github.com/blockchain-certificates/blockcerts-verifier#modifying-the-sanitizer\n **/\n'
12
+ }
13
+ ],
14
+ plugins: [
15
+ resolve({
16
+ browser: true,
17
+ preferBuiltins: true
18
+ }),
19
+ commonjs()
20
+ ]
21
+ };
@@ -0,0 +1,31 @@
1
+ import replace from '@rollup/plugin-replace';
2
+ import resolve from '@rollup/plugin-node-resolve';
3
+ import commonjs from '@rollup/plugin-commonjs';
4
+ import typescript from '@rollup/plugin-typescript';
5
+ import terser from '@rollup/plugin-terser';
6
+
7
+ export default [
8
+ {
9
+ input: 'src/blockcerts-verifier/index.ts',
10
+ output: [
11
+ {
12
+ file: 'dist/main.js',
13
+ format: 'iife',
14
+ name: 'BlockcertsVerifier',
15
+ inlineDynamicImports: true
16
+ }
17
+ ],
18
+ plugins: [
19
+ commonjs(),
20
+ replace({
21
+ 'process.env.NODE_ENV': JSON.stringify('production')
22
+ }),
23
+ typescript(),
24
+ resolve({
25
+ browser: true,
26
+ preferBuiltins: true
27
+ }),
28
+ terser()
29
+ ]
30
+ }
31
+ ];
@@ -0,0 +1,43 @@
1
+ import serve from 'rollup-plugin-serve';
2
+ import resolve from '@rollup/plugin-node-resolve';
3
+ import typescript from '@rollup/plugin-typescript';
4
+ import livereload from 'rollup-plugin-livereload';
5
+ import commonjs from '@rollup/plugin-commonjs';
6
+ import fs from 'fs';
7
+
8
+ const BUILD_OUTPUT_FOLDER = 'dev';
9
+
10
+ export default [
11
+ {
12
+ input: 'src/blockcerts-verifier/index.ts',
13
+ output: [
14
+ {
15
+ file: `${BUILD_OUTPUT_FOLDER}/index.js`,
16
+ format: 'iife',
17
+ name: 'BlockcertsVerifier',
18
+ inlineDynamicImports: true
19
+ }
20
+ ],
21
+ plugins: [
22
+ commonjs(),
23
+ typescript(),
24
+ resolve({
25
+ browser: true,
26
+ preferBuiltins: true
27
+ }),
28
+ serve({
29
+ contentBase: [BUILD_OUTPUT_FOLDER, 'demo', 'node_modules', 'dist', 'test/fixtures'],
30
+ host: '0.0.0.0',
31
+ port: 8081,
32
+ open: true,
33
+ https: {
34
+ cert: fs.readFileSync(`${BUILD_OUTPUT_FOLDER}/https-cert/cert.pem`),
35
+ key: fs.readFileSync(`${BUILD_OUTPUT_FOLDER}/https-cert/key.pem`)
36
+ }
37
+ }),
38
+ livereload({
39
+ watch: BUILD_OUTPUT_FOLDER
40
+ })
41
+ ]
42
+ }
43
+ ];
@@ -1,38 +0,0 @@
1
- <!doctype html>
2
- <html lang="en">
3
- <head>
4
- <meta charset="utf-8">
5
- <meta name="viewport" content="width=device-width, minimum-scale=1, initial-scale=1, user-scalable=yes">
6
-
7
- <title>blockcerts-verifier demo</title>
8
-
9
- <script src="./@webcomponents/webcomponentsjs/custom-elements-es5-adapter.js"></script>
10
- <script src="./@webcomponents/webcomponentsjs/webcomponents-loader.js"></script>
11
-
12
- <script type="module" src="./ie11.js"></script>
13
-
14
- <script>
15
- // HACK(keanulee): The Redux package assumes `process` exists - mock it here before
16
- // the module is loaded.
17
- window.process = {
18
- env: {
19
- NODE_ENV: 'development'
20
- }
21
- };
22
- </script>
23
- <style>
24
- .main {
25
- max-width: 700px;
26
- margin: 0 auto;
27
- width: 100%;
28
- }
29
- </style>
30
- </head>
31
- <body>
32
- <div class="main">
33
- <h3>Basic blockcerts-verifier demo - Display mode Full</h3>
34
- <blockcerts-verifier display-mode="full"></blockcerts-verifier>
35
- </div>
36
- </body>
37
- </body>
38
- </html>