Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ version: 2.1
executors:
node:
docker:
- image: mcr.microsoft.com/playwright:v1.44.0
- image: mcr.microsoft.com/playwright:v1.52.0
resource_class: xlarge
environment:
NODE_ENV: development
Expand All @@ -22,12 +22,12 @@ commands:
downstream:
steps:
- checkout
# - restore_cache:
# keys:
# - v4c-dependencies-{{ arch }}-{{ checksum "yarn.lock" }}
# - restore_cache:
# keys:
# - v4b-<< pipeline.parameters.wireit_cache_name >>-{{ arch }}-{{ checksum "package.json" }}-
- restore_cache:
keys:
- v4c-dependencies-{{ arch }}-{{ checksum "yarn.lock" }}
- restore_cache:
keys:
- v4b-<< pipeline.parameters.wireit_cache_name >>-{{ arch }}-{{ checksum "package.json" }}-
- run:
name: Installing Dependencies
command: |
Expand Down Expand Up @@ -128,7 +128,7 @@ commands:
- run:
when: always
command: |
rm -rf test/visual/screenshots-baseline
[[ -f test/visual/screenshots-baseline ]] && rm -rf test/visual/screenshots-baseline
cp -R test/visual/screenshots-actual/updates test/visual/screenshots-baseline
- save_cache:
when: always
Expand Down Expand Up @@ -312,7 +312,7 @@ jobs:
- run:
when: always
command: |
rm -rf test/visual/screenshots-baseline
[[ -f test/visual/screenshots-baseline ]] && rm -rf test/visual/screenshots-baseline
cp -R test/visual/screenshots-actual/updates test/visual/screenshots-baseline
- save_cache:
when: always
Expand Down
39 changes: 38 additions & 1 deletion .eslintrc.json
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@
}
],
"import/prefer-default-export": "off",
"import/no-extraneous-dependencies": "off",
"lit-a11y/click-events-have-key-events": [
"error",
{
Expand Down Expand Up @@ -153,5 +154,41 @@
"ignoreMemberSort": false
}
]
}
},
"extends": [
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [eslint] <no-dupe-keys> reported by reviewdog 🐶
Duplicate key 'extends'.

"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:prettier/recommended",
"plugin:lit-a11y/recommended",
"plugin:require-extensions/recommended"
],
"overrides": [
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [eslint] <no-dupe-keys> reported by reviewdog 🐶
Duplicate key 'overrides'.

{
"files": ["scripts/*"],
"rules": {
"no-console": ["off"]
}
},
{
"files": [
"packages/*/src/*.ts",
"tools/*/src/*.ts",
"projects/*/src/*.ts"
],
"rules": {
"import/no-extraneous-dependencies": [
"error",
{
"devDependencies": true
}
]
}
},
{
"files": ["react/**/*.ts"],
"rules": {
"@typescript-eslint/no-explicit-any": "off"
}
}
]
}
4 changes: 2 additions & 2 deletions lint-staged.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@

export default {
'*.css': [
'stylelint --fix --cache --allow-empty-input',
'prettier --cache --no-error-on-unmatched-pattern --ignore-unknown --log-level silent --write',
'stylelint --fix --cache --allow-empty-input',
],
'*.ts': [
'eslint --fix --format pretty --cache --no-error-on-unmatched-pattern --quiet',
'prettier --cache --no-error-on-unmatched-pattern --ignore-unknown --log-level silent --write',
'eslint --fix --format pretty --config .eslintrc.json --cache --no-error-on-unmatched-pattern --quiet',
],
'{packages,tools}/*/src/**/!(*.css).ts': ['yarn lit-analyzer'],
'package.json': () => [
Expand Down
5 changes: 4 additions & 1 deletion package.json
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@
"@netlify/build": "^29.17.3",
"@open-wc/dev-server-hmr": "^0.2.0",
"@open-wc/testing": "^4.0.0",
"@playwright/test": "^1.44.0",
"@playwright/test": "^1.52.0",
"@rollup/plugin-commonjs": "^25.0.7",
"@rollup/plugin-json": "^6.0.1",
"@rollup/plugin-node-resolve": "^15.2.3",
Expand Down Expand Up @@ -219,6 +219,9 @@
"node": ">=20",
"yarn": ">=4.6.0"
},
"resolutions": {
"playwright": "^1.52.0"
},
"wireit": {
"build": {
"dependencies": [
Expand Down
22 changes: 11 additions & 11 deletions packages/icons-workflow/bin/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import prettier from 'prettier';
import Case from 'case';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [eslint] <import/no-extraneous-dependencies> reported by reviewdog 🐶
'case' should be listed in the project's dependencies, not devDependencies.

import { fileURLToPath } from 'url';

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

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

Expand Down Expand Up @@ -169,9 +169,9 @@ async function buildIcons(icons, tag, iconsNameList) {

const iconLiteral = `
${disclaimer}

import {tag as html, TemplateResult} from '../custom-tag.js';

export {setCustomTemplateLiteralTag} from '../custom-tag.js';
export const ${ComponentName}Icon = ({
width = 24,
Expand Down Expand Up @@ -241,7 +241,7 @@ async function buildIcons(icons, tag, iconsNameList) {

const iconElement = `
${disclaimer}

import {
html,
TemplateResult
Expand All @@ -252,22 +252,22 @@ async function buildIcons(icons, tag, iconsNameList) {
import {
setCustomTemplateLiteralTag
} from '../custom-tag.js';

${currenVersionIconImport}
${otherVersionIconImport}

/**
* @element ${iconElementName}
*/
export class Icon${ComponentName} extends IconBase {
protected override render(): TemplateResult {
setCustomTemplateLiteralTag(html);

if(this.spectrumVersion === ${spectrumVersion}){
return CurrentIcon({ hidden: !this.label, title: this.label }) as TemplateResult;
}
return AlternateIcon({ hidden: !this.label, title: this.label }) as TemplateResult;

}
}
`;
Expand Down Expand Up @@ -302,12 +302,12 @@ async function buildIcons(icons, tag, iconsNameList) {

const iconRegistration = `
${disclaimer}

import { Icon${ComponentName} } from '../src/elements/Icon${id}.js';
import { defineElement } from '@spectrum-web-components/base/src/define-element.js';

defineElement('${iconElementName}', Icon${ComponentName});

declare global {
interface HTMLElementTagNameMap {
'${iconElementName}': Icon${ComponentName};
Expand Down
9 changes: 6 additions & 3 deletions packages/iconset/stories/icons-demo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ import bodyStyles from '@spectrum-web-components/styles/body.js';
import '@spectrum-web-components/icon/sp-icon.js';
import '@spectrum-web-components/help-text/sp-help-text.js';

import iconsList from './iconsList.json' assert { type: 'json' };
import iconsList from './iconsList.json' with { type: 'json' };

import {
SystemResolutionController,
Expand Down Expand Up @@ -209,7 +209,8 @@ export class IconsDemo extends SpectrumElement {
var(
--spectrum-alias-focus-ring-gap,
var(--spectrum-spacing-50)
) * 2
) *
2
);
}
`,
Expand All @@ -225,7 +226,9 @@ export class IconsDemo extends SpectrumElement {
}

private shouldCopy(tag: string): void {
if (!this.package) return;
if (!this.package) {
return;
}
const conditionedTag = tag.slice(1, tag.length - 1);
const importURL = `import '@spectrum-web-components/${this.package}/icons/${conditionedTag}.js';`;
this.dispatchEvent(
Expand Down
18 changes: 0 additions & 18 deletions packages/number-field/test/inputs.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import { html } from '@spectrum-web-components/base';
import { elementUpdated, expect, nextFrame } from '@open-wc/testing';
import { getElFrom } from './helpers.js';
import { createLanguageContext } from '../../../tools/reactive-controllers/test/helpers.js';
import { shouldPolyfill } from '@formatjs/intl-numberformat/should-polyfill.js';

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

describe('NumberField - inputs', () => {
before(async () => {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CanIUse indicates that the international number field has been available in our supported evergreen - 2 so we can remove the polyfills now

const shouldPolyfillEn = shouldPolyfill('en');
const shouldPolyfillEs = shouldPolyfill('es');
const shouldPolyfillFr = shouldPolyfill('fr');
if (shouldPolyfillEn || shouldPolyfillEs || shouldPolyfillFr) {
await import('@formatjs/intl-numberformat/polyfill-force.js');
}
if (shouldPolyfillEn) {
await import('@formatjs/intl-numberformat/locale-data/en.js');
}
if (shouldPolyfillEs) {
await import('@formatjs/intl-numberformat/locale-data/es.js');
}
if (shouldPolyfillFr) {
await import('@formatjs/intl-numberformat/locale-data/fr.js');
}
});
describe('keystroke prevention', () => {
it('converts 2 byte characters, default', async () => {
const el = await getElFrom(html`
Expand Down
Loading
Loading