Skip to content

Commit f6d085e

Browse files
committed
feat: update to use auto compatibility of es-dev-server
1 parent 7d5ea56 commit f6d085e

File tree

17 files changed

+182
-156
lines changed

17 files changed

+182
-156
lines changed

.prettierignore

-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ packages/semantic-dom-diff/bundle/get-diffable-html.js
77
packages/**/test/**/snapshots
88
/packages/es-dev-server/test/fixtures/**/*
99
/packages/es-dev-server/demo/**/*
10-
/packages/karma-esm/src/test-loader-browser-script.js
1110
/packages/karma-esm/src/esm-debug.html
1211
/packages/karma-esm/src/esm-context.html
1312
CHANGELOG.md

karma.conf.js

+7-1
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,17 @@ module.exports = config => {
1010
{
1111
pattern: config.grep
1212
? config.grep
13-
: 'packages/!(webpack-import-meta-loader|create|building-utils|webpack-index-html-plugin|rollup-plugin-index-html|import-maps-generate|import-maps-resolve|es-dev-server)/test/**/*.test.js',
13+
: 'packages/!(webpack-import-meta-loader|create|building-utils|webpack-index-html-plugin|rollup-plugin-index-html|import-maps-generate|import-maps-resolve|es-dev-server|karma-esm)/test/**/*.test.js',
1414
type: 'module',
1515
},
1616
],
1717

18+
client: {
19+
mocha: {
20+
timeout: 20000,
21+
},
22+
},
23+
1824
esm: {
1925
nodeResolve: true,
2026
},

package.json

+1-3
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,10 @@
2222
"site:start": "npm run vuepress:start",
2323
"test": "yarn test:browser && yarn test:node",
2424
"test:browser": "karma start --coverage",
25-
"test:browser:compatibility": "karma start --compatibility all --coverage",
26-
"test:browser:compatibility:watch": "karma start --auto-watch=true --single-run=false --compatibility all --coverage",
2725
"test:browser:prune-snapshots": "karma start --prune-snapshots",
2826
"test:browser:update-snapshots": "karma start --update-snapshots",
2927
"test:browser:watch": "karma start --auto-watch=true --single-run=false",
30-
"test:bs": "karma start karma.bs.conf.js --compatibility all --coverage",
28+
"test:bs": "karma start karma.bs.conf.js --coverage",
3129
"test:node": "lerna run test:node",
3230
"test:update-snapshots": "lerna run test:update-snapshots",
3331
"vuepress:build": "vuepress build docs",

packages/building-rollup/package.json

+5-5
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,10 @@
3636
"rollup"
3737
],
3838
"dependencies": {
39-
"@babel/core": "^7.3.3",
39+
"@babel/core": "^7.7.2",
4040
"@babel/plugin-syntax-dynamic-import": "^7.2.0",
4141
"@babel/plugin-syntax-import-meta": "^7.2.0",
42-
"@babel/preset-env": "^7.0.0",
42+
"@babel/preset-env": "^7.7.1",
4343
"@open-wc/building-utils": "^2.10.2",
4444
"babel-plugin-bundled-import-meta": "^0.3.0",
4545
"babel-plugin-template-html-minifier": "^3.0.0",
@@ -51,9 +51,9 @@
5151
"rollup-plugin-workbox": "^4.0.0"
5252
},
5353
"devDependencies": {
54-
"@babel/plugin-proposal-class-properties": "^7.3.4",
55-
"@babel/plugin-proposal-decorators": "^7.4.4",
56-
"@babel/preset-typescript": "^7.3.3",
54+
"@babel/plugin-proposal-class-properties": "^7.7.0",
55+
"@babel/plugin-proposal-decorators": "^7.7.0",
56+
"@babel/preset-typescript": "^7.7.2",
5757
"es-dev-server": "^1.23.1",
5858
"lit-element": "^2.0.1",
5959
"rimraf": "^2.6.3",

packages/building-webpack/package.json

+5-5
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,10 @@
3838
"config"
3939
],
4040
"dependencies": {
41-
"@babel/core": "^7.3.3",
41+
"@babel/core": "^7.7.2",
4242
"@babel/plugin-syntax-dynamic-import": "^7.2.0",
4343
"@babel/plugin-syntax-import-meta": "^7.2.0",
44-
"@babel/preset-env": "^7.0.0",
44+
"@babel/preset-env": "^7.7.1",
4545
"@open-wc/building-utils": "^2.10.2",
4646
"@open-wc/webpack-index-html-plugin": "^1.5.4",
4747
"babel-loader": "^8.0.0",
@@ -54,9 +54,9 @@
5454
"workbox-webpack-plugin": "^4.3.1"
5555
},
5656
"devDependencies": {
57-
"@babel/plugin-proposal-class-properties": "^7.3.4",
58-
"@babel/preset-typescript": "^7.3.3",
59-
"@babel/register": "^7.0.0",
57+
"@babel/plugin-proposal-class-properties": "^7.7.0",
58+
"@babel/preset-typescript": "^7.7.2",
59+
"@babel/register": "^7.7.0",
6060
"http-server": "^0.11.1",
6161
"lit-element": "^2.0.1",
6262
"ts-loader": "^5.3.3",

packages/create/package.json

+4-4
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,10 @@
4343
"semver": "^6.1.0"
4444
},
4545
"devDependencies": {
46-
"@babel/cli": "^7.2.3",
47-
"@babel/core": "^7.3.3",
48-
"@babel/preset-env": "^7.0.0",
49-
"@babel/register": "^7.0.0",
46+
"@babel/cli": "^7.7.0",
47+
"@babel/core": "^7.7.2",
48+
"@babel/preset-env": "^7.7.1",
49+
"@babel/register": "^7.7.0",
5050
"babel-plugin-transform-dynamic-import": "^2.1.0",
5151
"chai": "^4.2.0",
5252
"chai-fs": "^2.0.0",

packages/create/src/core.js

+4-1
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,10 @@ export async function writeFilesToDisk() {
257257
type: 'select',
258258
name: 'writeToDisk',
259259
message: 'Do you want to write this file structure to disk?',
260-
choices: [{ title: 'Yes', value: 'true' }, { title: 'No', value: 'false' }],
260+
choices: [
261+
{ title: 'Yes', value: 'true' },
262+
{ title: 'No', value: 'false' },
263+
],
261264
},
262265
],
263266
{

packages/create/src/generators/wc-lit-element/index.js

+1-4
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,7 @@ import { processTemplate, readFileFromPath } from '../../core.js';
55
const compose = (...fns) => fns.reduce((f, g) => (...args) => f(g(...args)));
66
const safeReduce = (f, initial) => xs => (Array.isArray(xs) ? xs.reduce(f, initial) : xs);
77

8-
const getTemplatePart = compose(
9-
processTemplate,
10-
readFileFromPath,
11-
);
8+
const getTemplatePart = compose(processTemplate, readFileFromPath);
129

1310
function featureReadmeBlurb(feature) {
1411
const path = join(__dirname, `./templates/partials/README.${feature}.md`);

packages/import-maps-generate/package.json

+4-4
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,10 @@
4141
"semver": "^6.1.0"
4242
},
4343
"devDependencies": {
44-
"@babel/cli": "^7.2.3",
45-
"@babel/core": "^7.3.3",
46-
"@babel/preset-env": "^7.0.0",
47-
"@babel/register": "^7.0.0",
44+
"@babel/cli": "^7.7.0",
45+
"@babel/core": "^7.7.2",
46+
"@babel/preset-env": "^7.7.1",
47+
"@babel/register": "^7.7.0",
4848
"babel-plugin-transform-dynamic-import": "^2.1.0",
4949
"chai": "^4.2.0",
5050
"mocha": "^6.0.0",

packages/import-maps-generate/test/assets/example/node_modules/lit-element/package.json

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/import-maps-generate/test/assets/exampleNested/node_modules/lit-element/package.json

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/import-maps-resolve/package.json

+4-4
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,10 @@
3030
"import-maps"
3131
],
3232
"devDependencies": {
33-
"@babel/cli": "^7.2.3",
34-
"@babel/core": "^7.3.3",
35-
"@babel/preset-env": "^7.0.0",
36-
"@babel/register": "^7.0.0",
33+
"@babel/cli": "^7.7.0",
34+
"@babel/core": "^7.7.2",
35+
"@babel/preset-env": "^7.7.1",
36+
"@babel/register": "^7.7.0",
3737
"babel-plugin-transform-dynamic-import": "^2.1.0",
3838
"chai": "^4.2.0",
3939
"mocha": "^6.0.0",

packages/rollup-plugin-index-html/README.md

+5-4
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,11 @@ Rollup plugin to make rollup understand your index.html.
5353
</head>
5454
<body>
5555
<h1><span>Hello world!</span></h1>
56-
<my-app></my-app
57-
><script>
58-
console.log('hello inline script');</script
59-
><script src="app.202933f045cc9f6cdf51.js"></script>
56+
<my-app></my-app>
57+
<script>
58+
console.log('hello inline script');
59+
</script>
60+
<script src="app.202933f045cc9f6cdf51.js"></script>
6061
</body>
6162
</html>
6263
```

packages/rollup-plugin-index-html/test/integration.test.js

+1
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ async function testSnapshot(name, configFilePath) {
2929

3030
output.forEach(file => {
3131
const filePath = path.join(config.output.dir, file.fileName);
32+
// @ts-ignore
3233
outputFiles[filePath] = file.code;
3334
});
3435
}

packages/testing-helpers/test/stringLitFixture.test.js

+55-45
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,16 @@ describe('stringFixtureSync & litFixtureSync & fixture & litFixture', () => {
2424
`,
2525
),
2626
].forEach(testElement);
27-
(await Promise.all([
28-
stringFixture('<test-component>Text content</test-component>'),
29-
litFixture(
30-
html`
31-
<test-component>Text content</test-component>
32-
`,
33-
),
34-
])).forEach(testElement);
27+
(
28+
await Promise.all([
29+
stringFixture('<test-component>Text content</test-component>'),
30+
litFixture(
31+
html`
32+
<test-component>Text content</test-component>
33+
`,
34+
),
35+
])
36+
).forEach(testElement);
3537
});
3638

3739
it('wraps element into a div attached to the body', async () => {
@@ -50,14 +52,16 @@ describe('stringFixtureSync & litFixtureSync & fixture & litFixture', () => {
5052
`,
5153
),
5254
].forEach(testElement);
53-
(await Promise.all([
54-
stringFixture('<test-component></test-component>'),
55-
litFixture(
56-
html`
57-
<test-component></test-component>
58-
`,
59-
),
60-
])).forEach(testElement);
55+
(
56+
await Promise.all([
57+
stringFixture('<test-component></test-component>'),
58+
litFixture(
59+
html`
60+
<test-component></test-component>
61+
`,
62+
),
63+
])
64+
).forEach(testElement);
6165
});
6266

6367
it('allows to create several fixtures in one test', async () => {
@@ -83,20 +87,22 @@ describe('stringFixtureSync & litFixtureSync & fixture & litFixture', () => {
8387
`,
8488
),
8589
].forEach(testElement);
86-
(await Promise.all([
87-
stringFixture('<test-component></test-component>'),
88-
stringFixture('<test-component></test-component>'),
89-
litFixture(
90-
html`
91-
<test-component></test-component>
92-
`,
93-
),
94-
litFixture(
95-
html`
96-
<test-component></test-component>
97-
`,
98-
),
99-
])).forEach(testElement);
90+
(
91+
await Promise.all([
92+
stringFixture('<test-component></test-component>'),
93+
stringFixture('<test-component></test-component>'),
94+
litFixture(
95+
html`
96+
<test-component></test-component>
97+
`,
98+
),
99+
litFixture(
100+
html`
101+
<test-component></test-component>
102+
`,
103+
),
104+
])
105+
).forEach(testElement);
100106
});
101107

102108
it('handles self closing tags', async () => {
@@ -114,14 +120,16 @@ describe('stringFixtureSync & litFixtureSync & fixture & litFixture', () => {
114120
`,
115121
),
116122
].forEach(testElement);
117-
(await Promise.all([
118-
stringFixture('<test-component/>'),
119-
litFixture(
120-
html`
121-
<test-component />
122-
`,
123-
),
124-
])).forEach(testElement);
123+
(
124+
await Promise.all([
125+
stringFixture('<test-component/>'),
126+
litFixture(
127+
html`
128+
<test-component />
129+
`,
130+
),
131+
])
132+
).forEach(testElement);
125133
});
126134

127135
it('always returns first child element ignoring whitespace and other elements', async () => {
@@ -141,16 +149,18 @@ describe('stringFixtureSync & litFixtureSync & fixture & litFixture', () => {
141149
<div></div>
142150
`),
143151
].forEach(testElement);
144-
(await Promise.all([
145-
stringFixture(`
146-
<test-component></test-component>
147-
<div></div>
148-
`),
149-
litFixture(html`
152+
(
153+
await Promise.all([
154+
stringFixture(`
150155
<test-component></test-component>
151156
<div></div>
152157
`),
153-
])).forEach(testElement);
158+
litFixture(html`
159+
<test-component></test-component>
160+
<div></div>
161+
`),
162+
])
163+
).forEach(testElement);
154164
});
155165

156166
it('will wait for one frame', async () => {

packages/webpack-import-meta-loader/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
"import-meta"
3030
],
3131
"devDependencies": {
32-
"@babel/register": "^7.0.0",
32+
"@babel/register": "^7.7.0",
3333
"babel-preset-env": "^1.7.0",
3434
"chai": "^4.2.0",
3535
"memory-fs": "^0.4.1",

0 commit comments

Comments
 (0)