@blockquote/create-wc 1.102.0 → 1.103.0
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/package.json +1 -1
- package/src/common-linting/templates/package.json +1 -1
- package/src/common-repo/templates/eslint.config.js +15 -7
- package/src/common-repo/templates/package.json +3 -3
- package/src/common-repo/templates/prettierignore +0 -1
- package/src/common-repo/templates/static/custom-elements-manifest.config.js +1 -1
- package/src/common-repo/templates/static/vite.config.js +7 -3
- package/src/common-testing-wtr/templates/static/web-test-runner.config.js +7 -10
- package/src/wc-lit-element-ts/templates/package.json +1 -1
package/package.json
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import tseslint from 'typescript-eslint';
|
|
2
2
|
import html from '@html-eslint/eslint-plugin';
|
|
3
|
-
// import htmlParser from '@html-eslint/parser';
|
|
4
3
|
import eslintConfigPrettier from 'eslint-config-prettier';
|
|
5
4
|
import path from 'node:path';
|
|
6
|
-
import { fileURLToPath } from 'node:url';
|
|
7
5
|
import js from '@eslint/js';
|
|
8
|
-
import {
|
|
6
|
+
import {fileURLToPath} from 'node:url';
|
|
7
|
+
import {FlatCompat} from '@eslint/eslintrc';
|
|
9
8
|
|
|
10
9
|
const __filename = fileURLToPath(import.meta.url);
|
|
11
10
|
const __dirname = path.dirname(__filename);
|
|
@@ -16,7 +15,7 @@ const compat = new FlatCompat({
|
|
|
16
15
|
allConfig: js.configs.all,
|
|
17
16
|
});
|
|
18
17
|
|
|
19
|
-
const htmlFilesConfig = [html.configs['flat/recommended']].map(conf => ({
|
|
18
|
+
const htmlFilesConfig = [html.configs['flat/recommended']].map((conf) => ({
|
|
20
19
|
...conf,
|
|
21
20
|
files: ['**/*.html'],
|
|
22
21
|
}));
|
|
@@ -31,7 +30,7 @@ const htmlFilesRules = {
|
|
|
31
30
|
},
|
|
32
31
|
};
|
|
33
32
|
|
|
34
|
-
const tsFilesConfig = [...tseslint.configs.strict, ...tseslint.configs.stylistic].map(conf => ({
|
|
33
|
+
const tsFilesConfig = [...tseslint.configs.strict, ...tseslint.configs.stylistic].map((conf) => ({
|
|
35
34
|
...conf,
|
|
36
35
|
files: ['**/*.ts'],
|
|
37
36
|
}));
|
|
@@ -52,7 +51,6 @@ export default [
|
|
|
52
51
|
ignores: [
|
|
53
52
|
'**/.idea',
|
|
54
53
|
'**/.vscode',
|
|
55
|
-
'**/.code-workspace',
|
|
56
54
|
'**/coverage',
|
|
57
55
|
'**/reports',
|
|
58
56
|
'**/__snapshots__',
|
|
@@ -66,6 +64,7 @@ export default [
|
|
|
66
64
|
'**/*.d.ts',
|
|
67
65
|
'**/storybook-static',
|
|
68
66
|
'**/*.config.*',
|
|
67
|
+
'**/*.workspace.*',
|
|
69
68
|
'**/*.min.js',
|
|
70
69
|
'**/*-styles.*',
|
|
71
70
|
],
|
|
@@ -118,9 +117,18 @@ export default [
|
|
|
118
117
|
],
|
|
119
118
|
'import/no-unresolved': 'off',
|
|
120
119
|
'import/prefer-default-export': 'off',
|
|
121
|
-
'lit/no-classfield-shadowing': 'off',
|
|
122
120
|
'lit/no-native-attributes': 'off',
|
|
121
|
+
'lit/no-useless-template-literals': 'off',
|
|
122
|
+
'lit-a11y/anchor-is-valid': 'off',
|
|
123
123
|
'lit-a11y/click-events-have-key-events': 'off',
|
|
124
|
+
'lit-a11y/no-autofocus': 'off',
|
|
125
|
+
},
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
files: ['**/test/**/*.{js,ts}'],
|
|
129
|
+
rules: {
|
|
130
|
+
'no-unused-expressions': 'off',
|
|
131
|
+
'@typescript-eslint/no-unused-expressions': 'off',
|
|
124
132
|
},
|
|
125
133
|
},
|
|
126
134
|
];
|
|
@@ -33,13 +33,13 @@
|
|
|
33
33
|
"@custom-elements-manifest/analyzer": "^0.10.3",
|
|
34
34
|
"@open-wc/testing": "^4.0.0",
|
|
35
35
|
"@types/mocha": "^10.0.7",
|
|
36
|
-
"@web/test-runner": "^0.
|
|
36
|
+
"@web/test-runner": "^0.19.0",
|
|
37
37
|
"@web/test-runner-playwright": "^0.11.0",
|
|
38
38
|
"@web/rollup-plugin-html": "^2.3.0",
|
|
39
|
-
"concurrently": "^
|
|
39
|
+
"concurrently": "^9.0.0",
|
|
40
40
|
"sort-package-json": "^2.10.1",
|
|
41
41
|
"ts-lit-plugin": "^2.0.2",
|
|
42
|
-
"vite": "^5.4.
|
|
42
|
+
"vite": "^5.4.4"
|
|
43
43
|
},
|
|
44
44
|
"publishConfig": {
|
|
45
45
|
"access": "public"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/* eslint-disable implicit-arrow-linebreak */
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import {defineConfig} from 'vite';
|
|
3
|
+
import {rollupPluginHTML as pluginHtml} from '@web/rollup-plugin-html';
|
|
4
4
|
import totalBundlesize from '@blockquote/rollup-plugin-total-bundlesize';
|
|
5
5
|
import externalizeSourceDependencies from '@blockquote/rollup-plugin-externalize-source-dependencies';
|
|
6
6
|
|
|
@@ -10,7 +10,11 @@ import externalizeSourceDependencies from '@blockquote/rollup-plugin-externalize
|
|
|
10
10
|
*/
|
|
11
11
|
|
|
12
12
|
export default defineConfig({
|
|
13
|
-
plugins: [
|
|
13
|
+
plugins: [
|
|
14
|
+
externalizeSourceDependencies(['/__web-dev-server__web-socket.js']),
|
|
15
|
+
pluginHtml(),
|
|
16
|
+
totalBundlesize(),
|
|
17
|
+
],
|
|
14
18
|
build: {
|
|
15
19
|
target: ['chrome71'],
|
|
16
20
|
outDir: 'dev',
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/* eslint-disable import/no-extraneous-dependencies */
|
|
2
2
|
/* process.env.npm_lifecycle_event, process.env.npm_lifecycle_script, process.env.OUTDIR; */
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
3
|
+
import {playwrightLauncher} from '@web/test-runner-playwright';
|
|
4
|
+
import {defaultReporter, summaryReporter} from '@web/test-runner';
|
|
5
|
+
import {coverageTableReporter} from '@blockquote/coverage-table-reporter';
|
|
6
6
|
|
|
7
7
|
const filteredLogs = ['in dev mode'];
|
|
8
8
|
const outDir = process.env.OUTDIR || '.';
|
|
@@ -15,10 +15,7 @@ export default /** @type {import("@web/test-runner").TestRunnerConfig} */ ({
|
|
|
15
15
|
nodeResolve: true,
|
|
16
16
|
|
|
17
17
|
/** Browsers to run tests on */
|
|
18
|
-
browsers: [
|
|
19
|
-
playwrightLauncher({ product: 'chromium' }),
|
|
20
|
-
playwrightLauncher({ product: 'webkit' }),
|
|
21
|
-
],
|
|
18
|
+
browsers: [playwrightLauncher({product: 'chromium'}), playwrightLauncher({product: 'webkit'})],
|
|
22
19
|
|
|
23
20
|
/** Amount of browsers to run concurrently */
|
|
24
21
|
concurrentBrowsers: 2,
|
|
@@ -27,7 +24,7 @@ export default /** @type {import("@web/test-runner").TestRunnerConfig} */ ({
|
|
|
27
24
|
concurrency: 1,
|
|
28
25
|
|
|
29
26
|
reporters: [summaryReporter({}), defaultReporter(), coverageTableReporter()],
|
|
30
|
-
|
|
27
|
+
|
|
31
28
|
preserveSymlinks: true,
|
|
32
29
|
|
|
33
30
|
coverage: true,
|
|
@@ -48,14 +45,14 @@ export default /** @type {import("@web/test-runner").TestRunnerConfig} */ ({
|
|
|
48
45
|
// https://mochajs.org/api/mocha
|
|
49
46
|
config: {
|
|
50
47
|
ui: 'tdd',
|
|
51
|
-
timeout: 4000
|
|
48
|
+
timeout: 4000,
|
|
52
49
|
},
|
|
53
50
|
},
|
|
54
51
|
|
|
55
52
|
/** Filter out lit dev mode logs */
|
|
56
53
|
filterBrowserLogs(log) {
|
|
57
54
|
for (const arg of log.args) {
|
|
58
|
-
if (typeof arg === 'string' && filteredLogs.some(l => arg.includes(l))) {
|
|
55
|
+
if (typeof arg === 'string' && filteredLogs.some((l) => arg.includes(l))) {
|
|
59
56
|
return false;
|
|
60
57
|
}
|
|
61
58
|
}
|