[dev] Add Baseline warnings to CSS (#6217)
This commit is contained in:
parent
2f11ce4778
commit
7cfaadefb1
@ -1,19 +0,0 @@
|
||||
src/lib/rlottie/rlottie-wasm.js
|
||||
src/lib/video-preview/polyfill
|
||||
src/lib/fasttextweb/fasttext-wasm.js
|
||||
|
||||
src/lib/gramjs/tl/types-generator/template.ts
|
||||
src/lib/gramjs/tl/api.d.ts
|
||||
src/lib/gramjs/tl/apiTl.ts
|
||||
src/lib/gramjs/tl/schemaTl.ts
|
||||
|
||||
src/lib/lovely-chart
|
||||
|
||||
src/lib/music-metadata-browser
|
||||
|
||||
jest.config.js
|
||||
src/lib/secret-sauce/
|
||||
playwright.config.ts
|
||||
|
||||
dist
|
||||
public
|
||||
14
.github/workflows/package-and-publish.yml
vendored
14
.github/workflows/package-and-publish.yml
vendored
@ -261,6 +261,8 @@ jobs:
|
||||
path: ${{ steps.file-info.outputs.path }}/${{ steps.file-info.outputs.name }}.dmg
|
||||
|
||||
# Windows release
|
||||
- name: Install DigiCert Client tools
|
||||
uses: digicert/ssm-code-signing@v1.1.1
|
||||
- name: Setup certificate and set environment variables (Windows)
|
||||
if: matrix.settings.platform == 'windows-latest'
|
||||
shell: bash
|
||||
@ -275,21 +277,13 @@ jobs:
|
||||
echo "C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.8 Tools" >> $GITHUB_PATH
|
||||
echo "C:\Program Files\DigiCert\DigiCert One Signing Manager Tools" >> $GITHUB_PATH
|
||||
|
||||
- name: Setup SSM KSP and sign package (Windows)
|
||||
- name: Sign package (Windows)
|
||||
if: matrix.settings.platform == 'windows-latest'
|
||||
env:
|
||||
SM_API_KEY: ${{ secrets.SM_API_KEY }}
|
||||
KEYPAIR_ALIAS: ${{ secrets.KEYPAIR_ALIAS }}
|
||||
FILE_PATH: ${{ steps.file-info.outputs.path }}/${{ steps.file-info.outputs.filename }}
|
||||
shell: cmd
|
||||
run: |
|
||||
curl.exe -X GET https://one.digicert.com/signingmanager/api-ui/v1/releases/smtools-windows-x64.msi/download -H "x-api-key:%SM_API_KEY%" -o smtools.msi
|
||||
msiexec /i smtools.msi /quiet /qn
|
||||
smksp_registrar.exe list
|
||||
smctl.exe keypair ls
|
||||
C:\Windows\System32\certutil.exe -csp "DigiCert Signing Manager KSP" -key -user
|
||||
smksp_cert_sync.exe
|
||||
smctl.exe sign --keypair-alias=%KEYPAIR_ALIAS% --input "%FILE_PATH%"
|
||||
run: smctl.exe sign --keypair-alias=%KEYPAIR_ALIAS% --input "%FILE_PATH%"
|
||||
|
||||
- name: Update release asset (Windows)
|
||||
if: matrix.settings.platform == 'windows-latest' && needs.get-version.outputs.should-publish != ''
|
||||
|
||||
@ -14,6 +14,7 @@
|
||||
"stylelint-high-performance-animation",
|
||||
"stylelint-group-selectors",
|
||||
"stylelint-selector-tag-no-without-class",
|
||||
"stylelint-plugin-use-baseline",
|
||||
"@mytonwallet/stylelint-whole-pixel"
|
||||
],
|
||||
"rules": {
|
||||
@ -45,6 +46,21 @@
|
||||
}
|
||||
],
|
||||
"plugin/selector-tag-no-without-class": ["/^(?!body|html)([^_-]*)$/", { "severity": "warning" }],
|
||||
"plugin/use-baseline": [true, {
|
||||
"severity": "warning",
|
||||
"ignoreSelectors": ["nesting", "dir", "selection", "view-transition-group"],
|
||||
"ignoreProperties": [
|
||||
"text-wrap",
|
||||
"outline",
|
||||
"backdrop-filter",
|
||||
"user-select",
|
||||
"scrollbar-gutter",
|
||||
"scrollbar-width",
|
||||
"scrollbar-color",
|
||||
"box-decoration-break",
|
||||
"offset-anchor"
|
||||
]
|
||||
}],
|
||||
"@stylistic/number-leading-zero": "always",
|
||||
"@stylistic/string-quotes": null,
|
||||
"@stylistic/color-hex-case": null,
|
||||
|
||||
@ -41,6 +41,7 @@ export default tseslint.config(
|
||||
'dist/',
|
||||
'public/',
|
||||
'deploy/update_version.js',
|
||||
'tauri/target/',
|
||||
]),
|
||||
{
|
||||
name: 'teact-config',
|
||||
|
||||
151
package-lock.json
generated
151
package-lock.json
generated
@ -102,6 +102,7 @@
|
||||
"stylelint-declaration-block-no-ignored-properties": "^2.8.0",
|
||||
"stylelint-group-selectors": "^1.0.10",
|
||||
"stylelint-high-performance-animation": "^1.11.0",
|
||||
"stylelint-plugin-use-baseline": "^0.9.1",
|
||||
"stylelint-selector-tag-no-without-class": "^3.0.1",
|
||||
"telegraph-node": "^1.0.4",
|
||||
"tsx": "^4.20.3",
|
||||
@ -4406,141 +4407,6 @@
|
||||
"@rspack/binding-win32-x64-msvc": "1.3.15"
|
||||
}
|
||||
},
|
||||
"node_modules/@rspack/binding-darwin-arm64": {
|
||||
"version": "1.3.15",
|
||||
"resolved": "https://registry.npmjs.org/@rspack/binding-darwin-arm64/-/binding-darwin-arm64-1.3.15.tgz",
|
||||
"integrity": "sha512-f+DnVRENRdVe+ufpZeqTtWAUDSTnP48jVo7x9KWsXf8XyJHUi+eHKEPrFoy1HvL1/k5yJ3HVnFBh1Hb9cNIwSg==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"optional": true,
|
||||
"os": [
|
||||
"darwin"
|
||||
],
|
||||
"peer": true
|
||||
},
|
||||
"node_modules/@rspack/binding-darwin-x64": {
|
||||
"version": "1.3.15",
|
||||
"resolved": "https://registry.npmjs.org/@rspack/binding-darwin-x64/-/binding-darwin-x64-1.3.15.tgz",
|
||||
"integrity": "sha512-TfUvEIBqYUT2OK01BYXb2MNcZeZIhAnJy/5aj0qV0uy4KlvwW63HYcKWa1sFd4Ac7bnGShDkanvP3YEuHOFOyg==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"optional": true,
|
||||
"os": [
|
||||
"darwin"
|
||||
],
|
||||
"peer": true
|
||||
},
|
||||
"node_modules/@rspack/binding-linux-arm64-gnu": {
|
||||
"version": "1.3.15",
|
||||
"resolved": "https://registry.npmjs.org/@rspack/binding-linux-arm64-gnu/-/binding-linux-arm64-gnu-1.3.15.tgz",
|
||||
"integrity": "sha512-D/YjYk9snKvYm1Elotq8/GsEipB4ZJWVv/V8cZ+ohhFNOPzygENi6JfyI06TryBTQiN0/JDZqt/S9RaWBWnMqw==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"optional": true,
|
||||
"os": [
|
||||
"linux"
|
||||
],
|
||||
"peer": true
|
||||
},
|
||||
"node_modules/@rspack/binding-linux-arm64-musl": {
|
||||
"version": "1.3.15",
|
||||
"resolved": "https://registry.npmjs.org/@rspack/binding-linux-arm64-musl/-/binding-linux-arm64-musl-1.3.15.tgz",
|
||||
"integrity": "sha512-lJbBsPMOiR0hYPCSM42yp7QiZjfo0ALtX7ws2wURpsQp3BMfRVAmXU3Ixpo2XCRtG1zj8crHaCmAWOJTS0smsA==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"optional": true,
|
||||
"os": [
|
||||
"linux"
|
||||
],
|
||||
"peer": true
|
||||
},
|
||||
"node_modules/@rspack/binding-linux-x64-gnu": {
|
||||
"version": "1.3.15",
|
||||
"resolved": "https://registry.npmjs.org/@rspack/binding-linux-x64-gnu/-/binding-linux-x64-gnu-1.3.15.tgz",
|
||||
"integrity": "sha512-qGB8ucHklrzNg6lsAS36VrBsCbOw0acgpQNqTE5cuHWrp1Pu3GFTRiFEogenxEmzoRbohMZt0Ev5grivrcgKBQ==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"optional": true,
|
||||
"os": [
|
||||
"linux"
|
||||
],
|
||||
"peer": true
|
||||
},
|
||||
"node_modules/@rspack/binding-linux-x64-musl": {
|
||||
"version": "1.3.15",
|
||||
"resolved": "https://registry.npmjs.org/@rspack/binding-linux-x64-musl/-/binding-linux-x64-musl-1.3.15.tgz",
|
||||
"integrity": "sha512-qRn6e40fLQP+N2rQD8GAj/h4DakeTIho32VxTIaHRVuzw68ZD7VmKkwn55ssN370ejmey35ZdoNFNE12RBrMZA==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"optional": true,
|
||||
"os": [
|
||||
"linux"
|
||||
],
|
||||
"peer": true
|
||||
},
|
||||
"node_modules/@rspack/binding-win32-arm64-msvc": {
|
||||
"version": "1.3.15",
|
||||
"resolved": "https://registry.npmjs.org/@rspack/binding-win32-arm64-msvc/-/binding-win32-arm64-msvc-1.3.15.tgz",
|
||||
"integrity": "sha512-7uJ7dWhO1nWXJiCss6Rslz8hoAxAhFpwpbWja3eHgRb7O4NPHg6MWw63AQSI2aFVakreenfu9yXQqYfpVWJ2dA==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"optional": true,
|
||||
"os": [
|
||||
"win32"
|
||||
],
|
||||
"peer": true
|
||||
},
|
||||
"node_modules/@rspack/binding-win32-ia32-msvc": {
|
||||
"version": "1.3.15",
|
||||
"resolved": "https://registry.npmjs.org/@rspack/binding-win32-ia32-msvc/-/binding-win32-ia32-msvc-1.3.15.tgz",
|
||||
"integrity": "sha512-UsaWTYCjDiSCB0A0qETgZk4QvhwfG8gCrO4SJvA+QSEWOmgSai1YV70prFtLLIiyT9mDt1eU3tPWl1UWPRU/EQ==",
|
||||
"cpu": [
|
||||
"ia32"
|
||||
],
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"optional": true,
|
||||
"os": [
|
||||
"win32"
|
||||
],
|
||||
"peer": true
|
||||
},
|
||||
"node_modules/@rspack/binding-win32-x64-msvc": {
|
||||
"version": "1.3.15",
|
||||
"resolved": "https://registry.npmjs.org/@rspack/binding-win32-x64-msvc/-/binding-win32-x64-msvc-1.3.15.tgz",
|
||||
"integrity": "sha512-ZnDIc9Es8EF94MirPDN+hOMt7tkb8nMEbRJFKLMmNd0ElNPgsql+1cY5SqyGRH1hsKB87KfSUQlhFiKZvzbfIg==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"optional": true,
|
||||
"os": [
|
||||
"win32"
|
||||
],
|
||||
"peer": true
|
||||
},
|
||||
"node_modules/@rspack/core": {
|
||||
"version": "1.3.15",
|
||||
"resolved": "https://registry.npmjs.org/@rspack/core/-/core-1.3.15.tgz",
|
||||
@ -18859,6 +18725,21 @@
|
||||
"stylelint": "^14.0.0 || ^15.0.0 || ^16.0.1"
|
||||
}
|
||||
},
|
||||
"node_modules/stylelint-plugin-use-baseline": {
|
||||
"version": "0.9.1",
|
||||
"resolved": "https://registry.npmjs.org/stylelint-plugin-use-baseline/-/stylelint-plugin-use-baseline-0.9.1.tgz",
|
||||
"integrity": "sha512-L0I72+TCGhIn+6L9pRpKMlk9cvfhh7GnBQfPWFtx2ghRKIC7JO3RBW404zYxUgEGedeJPRIsVOWfVbde+kqmHQ==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"css-tree": "^3.1.0",
|
||||
"postcss": "^8.5.5",
|
||||
"postcss-value-parser": "^4.2.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"stylelint": "^16.0.2"
|
||||
}
|
||||
},
|
||||
"node_modules/stylelint-scss": {
|
||||
"version": "6.12.1",
|
||||
"resolved": "https://registry.npmjs.org/stylelint-scss/-/stylelint-scss-6.12.1.tgz",
|
||||
|
||||
@ -112,6 +112,7 @@
|
||||
"stylelint-declaration-block-no-ignored-properties": "^2.8.0",
|
||||
"stylelint-group-selectors": "^1.0.10",
|
||||
"stylelint-high-performance-animation": "^1.11.0",
|
||||
"stylelint-plugin-use-baseline": "^0.9.1",
|
||||
"stylelint-selector-tag-no-without-class": "^3.0.1",
|
||||
"telegraph-node": "^1.0.4",
|
||||
"tsx": "^4.20.3",
|
||||
|
||||
@ -12,9 +12,11 @@ function compatTest() {
|
||||
var hasWebLocks = typeof navigator.locks !== 'undefined';
|
||||
var hasBigInt = typeof BigInt !== 'undefined';
|
||||
var hasBroadcastChannel = typeof BroadcastChannel !== 'undefined';
|
||||
var hasArrayAt = typeof new Array(0).at !== 'undefined';
|
||||
|
||||
var isCompatible = hasPromise && hasWebSockets && hasWebCrypto && hasObjectFromEntries && hasResizeObserver
|
||||
&& hasCssSupports && hasDisplayNames && hasPluralRules && hasNumberFormat && hasWebLocks && hasBigInt && hasBroadcastChannel;
|
||||
&& hasCssSupports && hasDisplayNames && hasPluralRules && hasNumberFormat && hasWebLocks && hasBigInt && hasBroadcastChannel
|
||||
&& hasArrayAt;
|
||||
|
||||
if (isCompatible || (window.localStorage && window.localStorage.getItem('tt-ignore-compat'))) {
|
||||
window.isCompatTestPassed = true;
|
||||
@ -35,6 +37,7 @@ function compatTest() {
|
||||
console.warn('WebLocks', hasWebLocks);
|
||||
console.warn('BigInt', hasBigInt);
|
||||
console.warn('BroadcastChannel', hasBroadcastChannel);
|
||||
console.warn('Array.at', hasArrayAt);
|
||||
}
|
||||
|
||||
// Hardcoded page because server forbids iframe embedding
|
||||
|
||||
1
src/@types/global.d.ts
vendored
1
src/@types/global.d.ts
vendored
@ -168,6 +168,7 @@ interface BooleanConstructor {
|
||||
|
||||
interface Array<T> {
|
||||
filter<S extends T>(predicate: BooleanConstructor, thisArg?: unknown): Exclude<S, Falsy>[];
|
||||
at(index: number): T; // Make it behave like arr[arr.length - 1]
|
||||
}
|
||||
interface ReadonlyArray<T> {
|
||||
filter<S extends T>(predicate: BooleanConstructor, thisArg?: unknown): Exclude<S, Falsy>[];
|
||||
|
||||
@ -127,7 +127,7 @@ export function updatePeerPhotos<T extends GlobalState>(
|
||||
});
|
||||
}
|
||||
|
||||
const hasFallbackPhoto = currentPhotos.photos[currentPhotos.photos.length - 1].id === fallbackPhoto?.id;
|
||||
const hasFallbackPhoto = currentPhotos.photos.at(-1).id === fallbackPhoto?.id;
|
||||
const currentPhotoArray = hasFallbackPhoto ? currentPhotos.photos.slice(0, -1) : currentPhotos.photos;
|
||||
|
||||
const photos = uniqueByField([...currentPhotoArray, ...newPhotos, fallbackPhoto].filter(Boolean), 'id');
|
||||
|
||||
@ -22,7 +22,7 @@
|
||||
"active": true,
|
||||
"createUpdaterArtifacts": false,
|
||||
"category": "SocialNetworking",
|
||||
"copyright": "",
|
||||
"copyright": "Telegram Air",
|
||||
"externalBin": [],
|
||||
"icon": [
|
||||
"icons/32x32.png",
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
"dom",
|
||||
"dom.iterable",
|
||||
"webworker",
|
||||
"es2021"
|
||||
"es2022"
|
||||
],
|
||||
"allowJs": true,
|
||||
"skipLibCheck": true,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user