Skip to content

Commit 16ac9a1

Browse files
committed
chore: lock playwright version [swc-829]
1 parent 74386e8 commit 16ac9a1

File tree

13 files changed

+87
-130
lines changed

13 files changed

+87
-130
lines changed

.circleci/config.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ version: 2.1
33
executors:
44
node:
55
docker:
6-
- image: mcr.microsoft.com/playwright:v1.44.0
6+
- image: mcr.microsoft.com/playwright:v1.52.0
77
resource_class: xlarge
88
environment:
99
NODE_ENV: development
@@ -22,12 +22,12 @@ commands:
2222
downstream:
2323
steps:
2424
- checkout
25-
# - restore_cache:
26-
# keys:
27-
# - v4c-dependencies-{{ arch }}-{{ checksum "yarn.lock" }}
28-
# - restore_cache:
29-
# keys:
30-
# - v4b-<< pipeline.parameters.wireit_cache_name >>-{{ arch }}-{{ checksum "package.json" }}-
25+
- restore_cache:
26+
keys:
27+
- v4c-dependencies-{{ arch }}-{{ checksum "yarn.lock" }}
28+
- restore_cache:
29+
keys:
30+
- v4b-<< pipeline.parameters.wireit_cache_name >>-{{ arch }}-{{ checksum "package.json" }}-
3131
- run:
3232
name: Installing Dependencies
3333
command: |
@@ -128,7 +128,7 @@ commands:
128128
- run:
129129
when: always
130130
command: |
131-
rm -rf test/visual/screenshots-baseline
131+
[[ -f test/visual/screenshots-baseline ]] && rm -rf test/visual/screenshots-baseline
132132
cp -R test/visual/screenshots-actual/updates test/visual/screenshots-baseline
133133
- save_cache:
134134
when: always
@@ -339,7 +339,7 @@ jobs:
339339
- run:
340340
when: always
341341
command: |
342-
rm -rf test/visual/screenshots-baseline
342+
[[ -f test/visual/screenshots-baseline ]] && rm -rf test/visual/screenshots-baseline
343343
cp -R test/visual/screenshots-actual/updates test/visual/screenshots-baseline
344344
- save_cache:
345345
when: always

package.json

Lines changed: 34 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,18 @@
22
"name": "@adobe/spectrum-web-components",
33
"version": "0.0.9",
44
"private": true,
5-
"description": "",
5+
"description": "A web-component implementation of the Adobe Spectrum design system.",
66
"type": "module",
7+
"license": "Apache-2.0",
8+
"author": "Adobe",
9+
"repository": {
10+
"type": "git",
11+
"url": "https://github.com/adobe/spectrum-web-components.git"
12+
},
13+
"homepage": "https://opensource.adobe.com/spectrum-web-components/",
14+
"bugs": {
15+
"url": "https://github.com/adobe/spectrum-web-components/issues"
16+
},
717
"engines": {
818
"node": ">=20",
919
"yarn": ">=4.6.0"
@@ -107,7 +117,7 @@
107117
"@netlify/build": "^29.17.3",
108118
"@open-wc/dev-server-hmr": "^0.2.0",
109119
"@open-wc/testing": "^4.0.0",
110-
"@playwright/test": "^1.44.0",
120+
"@playwright/test": "^1.52.0",
111121
"@rollup/plugin-commonjs": "^25.0.7",
112122
"@rollup/plugin-json": "^6.0.1",
113123
"@rollup/plugin-node-resolve": "^15.2.3",
@@ -205,6 +215,27 @@
205215
"wireit": "^0.14.3",
206216
"yargs": "^17.2.1"
207217
},
218+
"resolutions": {
219+
"playwright": "^1.52.0"
220+
},
221+
"workspaces": [
222+
"linters/*",
223+
"packages/*",
224+
"projects/*",
225+
"tools/*",
226+
"react/*"
227+
],
228+
"packageManager": "[email protected]",
229+
"keywords": [
230+
"design-system",
231+
"spectrum",
232+
"adobe",
233+
"adobe-spectrum",
234+
"web components",
235+
"web-components",
236+
"lit-element",
237+
"lit-html"
238+
],
208239
"wireit": {
209240
"build:css:watch": {
210241
"command": "node ./tasks/watch-css.js",
@@ -432,33 +463,5 @@
432463
],
433464
"clean": "if-file-deleted"
434465
}
435-
},
436-
"workspaces": [
437-
"linters/*",
438-
"packages/*",
439-
"projects/*",
440-
"tools/*",
441-
"react/*"
442-
],
443-
"packageManager": "[email protected]",
444-
"license": "Apache-2.0",
445-
"author": "Adobe",
446-
"repository": {
447-
"type": "git",
448-
"url": "https://github.com/adobe/spectrum-web-components.git"
449-
},
450-
"bugs": {
451-
"url": "https://github.com/adobe/spectrum-web-components/issues"
452-
},
453-
"keywords": [
454-
"design-system",
455-
"spectrum",
456-
"adobe",
457-
"adobe-spectrum",
458-
"web components",
459-
"web-components",
460-
"lit-element",
461-
"lit-html"
462-
],
463-
"homepage": "https://opensource.adobe.com/spectrum-web-components/"
466+
}
464467
}

packages/icons-workflow/bin/build.js

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import prettier from 'prettier';
1919
import Case from 'case';
2020
import { fileURLToPath } from 'url';
2121

22-
import systemsIconMapping from './icons-mapping.json' assert { type: 'json' };
22+
import systemsIconMapping from './icons-mapping.json' with { type: 'json' };
2323

2424
const __dirname = path.dirname(fileURLToPath(import.meta.url));
2525

@@ -169,9 +169,9 @@ async function buildIcons(icons, tag, iconsNameList) {
169169

170170
const iconLiteral = `
171171
${disclaimer}
172-
172+
173173
import {tag as html, TemplateResult} from '../custom-tag.js';
174-
174+
175175
export {setCustomTemplateLiteralTag} from '../custom-tag.js';
176176
export const ${ComponentName}Icon = ({
177177
width = 24,
@@ -241,7 +241,7 @@ async function buildIcons(icons, tag, iconsNameList) {
241241

242242
const iconElement = `
243243
${disclaimer}
244-
244+
245245
import {
246246
html,
247247
TemplateResult
@@ -252,22 +252,22 @@ async function buildIcons(icons, tag, iconsNameList) {
252252
import {
253253
setCustomTemplateLiteralTag
254254
} from '../custom-tag.js';
255-
255+
256256
${currenVersionIconImport}
257257
${otherVersionIconImport}
258-
258+
259259
/**
260260
* @element ${iconElementName}
261261
*/
262262
export class Icon${ComponentName} extends IconBase {
263263
protected override render(): TemplateResult {
264264
setCustomTemplateLiteralTag(html);
265-
265+
266266
if(this.spectrumVersion === ${spectrumVersion}){
267267
return CurrentIcon({ hidden: !this.label, title: this.label }) as TemplateResult;
268268
}
269269
return AlternateIcon({ hidden: !this.label, title: this.label }) as TemplateResult;
270-
270+
271271
}
272272
}
273273
`;
@@ -302,12 +302,12 @@ async function buildIcons(icons, tag, iconsNameList) {
302302

303303
const iconRegistration = `
304304
${disclaimer}
305-
305+
306306
import { Icon${ComponentName} } from '../src/elements/Icon${id}.js';
307307
import { defineElement } from '@spectrum-web-components/base/src/define-element.js';
308-
308+
309309
defineElement('${iconElementName}', Icon${ComponentName});
310-
310+
311311
declare global {
312312
interface HTMLElementTagNameMap {
313313
'${iconElementName}': Icon${ComponentName};

packages/iconset/stories/icons-demo.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ import bodyStyles from '@spectrum-web-components/styles/body.js';
3131
import '@spectrum-web-components/icon/sp-icon.js';
3232
import '@spectrum-web-components/help-text/sp-help-text.js';
3333

34-
import iconsList from './iconsList.json' assert { type: 'json' };
34+
import iconsList from './iconsList.json' with { type: 'json' };
3535

3636
import {
3737
SystemResolutionController,

packages/number-field/test/inputs.test.ts

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ import { html } from '@spectrum-web-components/base';
1414
import { elementUpdated, expect, nextFrame } from '@open-wc/testing';
1515
import { getElFrom } from './helpers.js';
1616
import { createLanguageContext } from '../../../tools/reactive-controllers/test/helpers.js';
17-
import { shouldPolyfill } from '@formatjs/intl-numberformat/should-polyfill.js';
1817

1918
import '@spectrum-web-components/number-field/sp-number-field.js';
2019
import { remapMultiByteCharacters } from '@spectrum-web-components/number-field';
@@ -28,23 +27,6 @@ import {
2827
import { sendKeys } from '@web/test-runner-commands';
2928

3029
describe('NumberField - inputs', () => {
31-
before(async () => {
32-
const shouldPolyfillEn = shouldPolyfill('en');
33-
const shouldPolyfillEs = shouldPolyfill('es');
34-
const shouldPolyfillFr = shouldPolyfill('fr');
35-
if (shouldPolyfillEn || shouldPolyfillEs || shouldPolyfillFr) {
36-
await import('@formatjs/intl-numberformat/polyfill-force.js');
37-
}
38-
if (shouldPolyfillEn) {
39-
await import('@formatjs/intl-numberformat/locale-data/en.js');
40-
}
41-
if (shouldPolyfillEs) {
42-
await import('@formatjs/intl-numberformat/locale-data/es.js');
43-
}
44-
if (shouldPolyfillFr) {
45-
await import('@formatjs/intl-numberformat/locale-data/fr.js');
46-
}
47-
});
4830
describe('keystroke prevention', () => {
4931
it('converts 2 byte characters, default', async () => {
5032
const el = await getElFrom(html`

packages/number-field/test/number-field.test.ts

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -54,19 +54,6 @@ import {
5454
import { isMac } from '@spectrum-web-components/shared/src/platform.js';
5555

5656
describe('NumberField', () => {
57-
before(async () => {
58-
const shouldPolyfillEn = shouldPolyfill('en');
59-
const shouldPolyfillFr = shouldPolyfill('fr');
60-
if (shouldPolyfillEn || shouldPolyfillFr) {
61-
await import('@formatjs/intl-numberformat/polyfill-force.js');
62-
}
63-
if (shouldPolyfillEn) {
64-
await import('@formatjs/intl-numberformat/locale-data/en.js');
65-
}
66-
if (shouldPolyfillFr) {
67-
await import('@formatjs/intl-numberformat/locale-data/fr.js');
68-
}
69-
});
7057
testForLitDevWarnings(async () => await getElFrom(Default({})));
7158
it('loads default number-field accessibly', async () => {
7259
const el = await getElFrom(Default({}));

projects/documentation/.eleventy.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,15 @@ const packageVersion = async function (packageName) {
1919
packageJSON = await import(
2020
`../../packages/${packageName}/package.json`,
2121
{
22-
assert: { type: 'json' },
22+
with: { type: 'json' },
2323
}
2424
).then((packageDefault) => packageDefault.default);
2525
} catch (e) {
2626
try {
2727
packageJSON = await import(
2828
`../../tools/${packageName}/package.json`,
2929
{
30-
assert: { type: 'json' },
30+
with: { type: 'json' },
3131
}
3232
).then((packageDefault) => packageDefault.default);
3333
} catch (e) {}

projects/documentation/scripts/copy-component-docs.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ const findDeprecationNotice = async function (filePath) {
6464
const hasDeprecation = fs.existsSync(mdPath);
6565
if (hasDeprecation) {
6666
const packageJSON = await import(mdPath, {
67-
assert: { type: 'json' },
67+
with: { type: 'json' },
6868
}).then((packageDefault) => packageDefault.default);
6969
return packageJSON.deprecationNotice;
7070
}

storybook/preview.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ import DocumentationTemplate from './DocumentationTemplate.mdx';
1717
import '@spectrum-web-components/story-decorator/sp-story-decorator.js';
1818

1919
// const cem = await import('./custom-elements.json', {
20-
// assert: { type: 'json' },
20+
// with: { type: 'json' },
2121
// });
2222

2323
// setCustomElementsManifest(cem);

test/benchmark/cli.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ $ node test/benchmark/cli -n 20
235235
'package.json'
236236
),
237237
{
238-
assert: { type: 'json' },
238+
with: { type: 'json' },
239239
}
240240
);
241241
if (pjson.version === '0.0.1' && opts.compare !== 'none') {

tools/reactive-controllers/src/LanguageResolution.ts

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,18 @@ export const languageResolverUpdatedSymbol = Symbol(
1919

2020
export class LanguageResolutionController implements ReactiveController {
2121
private host: ReactiveElement;
22-
language = document.documentElement.lang || navigator.language;
22+
get language(): string {
23+
return document.documentElement.lang || navigator.language;
24+
}
25+
set language(value: string) {
26+
// Replace all _ with - in the language string
27+
value = value.replace(/_/g, '-');
28+
// Set the document language
29+
if (this.language === value) return;
30+
31+
document.documentElement.lang = value;
32+
this.host.requestUpdate(languageResolverUpdatedSymbol, value);
33+
}
2334
private unsubscribe?: () => void;
2435

2536
constructor(host: ReactiveElement) {

web-test-runner.utils.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,6 @@ export const coverallsChromium = playwrightLauncher({
3838
permissions: ['clipboard-read', 'clipboard-write'],
3939
}),
4040
launchOptions: {
41-
executablePath:
42-
'/home/runner/.cache/ms-playwright/chromium-1148/chrome-linux/chrome',
4341
headless: true,
4442
},
4543
});

0 commit comments

Comments
 (0)