This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { defineConfig } from '@playwright/test'; | |
| const storybookUrl = process.env.STORYBOOK_URL ?? 'http://localhost:6006'; | |
| export default defineConfig({ | |
| testDir: './playwright', | |
| globalSetup: './playwright/stories-setup.ts', | |
| use: { baseURL: storybookUrl }, | |
| fullyParallel: true, | |
| webServer: process.env.STORYBOOK_URL |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| export default [ | |
| { name: "openclaw/openclaw", stars: 380256, isToMatchScreenshotUsed: false }, | |
| { name: "n8n-io/n8n", stars: 193847, isToMatchScreenshotUsed: false }, | |
| { name: "langgenius/dify", stars: 146257, isToMatchScreenshotUsed: false }, | |
| { name: "ggml-org/llama.cpp", stars: 117829, isToMatchScreenshotUsed: false }, | |
| { name: "axios/axios", stars: 109083, isToMatchScreenshotUsed: false }, | |
| { name: "mui/material-ui", stars: 98461, isToMatchScreenshotUsed: false }, | |
| { name: "storybookjs/storybook", stars: 90415, isToMatchScreenshotUsed: false }, | |
| { name: "toeverything/AFFiNE", stars: 69733, isToMatchScreenshotUsed: false }, | |
| { name: "reduxjs/redux", stars: 61509, isToMatchScreenshotUsed: false }, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import inspector from "node:inspector/promises"; | |
| import { writeFileSync } from "node:fs"; | |
| const target = "coverage-target.mjs"; | |
| writeFileSync( | |
| target, | |
| `\ | |
| // Repro code here | |
| `, | |
| "utf-8", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const { controller, readable } = await new Promise((resolve) => { | |
| let readable = new ReadableStream({ | |
| start: (controller) => setTimeout(() => resolve({ controller, readable })), | |
| }); | |
| }); | |
| const encoder = new TextEncoder(); | |
| const decoder = new TextDecoder(); | |
| const transformer = new TransformStream({ | |
| transform(chunk, transformController) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function translate() { | |
| const walker = document.createTreeWalker(document.body, NodeFilter.SHOW_TEXT); | |
| /** @type Node[] */ | |
| const textNodes = []; | |
| /** @type Node */ | |
| let currentNode; | |
| while ((currentNode = walker.nextNode())) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * Create an array of string literal where all types are required and allowed just once | |
| * | |
| * ```ts | |
| * // Example usage: Make sure test.each() covers all cases for a string literal type | |
| * type UserTypes = "admin" | "user" | "anonymous"; | |
| * | |
| * test.each(["admin", "user", "anonymous"] satisfies UnionToArray<UserTypes>) | |
| */ | |
| type UnionToArray< |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @mixin increase-specificity($times: 1) { | |
| $selector: ""; | |
| @for $index from 1 through $times { | |
| $selector: #{$selector}#{&}; | |
| } | |
| &#{$selector} { | |
| @content; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| // Forbid importing modules directly from feature directories | |
| // Allow importing from feature directory's entrypoint, e.g. src/site/index.ts | |
| // https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/no-restricted-paths.md | |
| "import/no-restricted-paths": [ | |
| "error", | |
| { | |
| zones: ["actions", "admin", "api", "site", "shared"] | |
| .map((directory) => [ | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $ npm --no-git-tag-version version ${npm_package_version}-snapshot-${GIT_COMMIT} | |
| $ npm publish --tag snapshot |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| printHeadings(); | |
| function printHeadings() { | |
| const headings = document.querySelectorAll("h1,h2,h3,h4,h5,h6"); | |
| const formatted = Array.from(headings).map((element) => { | |
| const tag = element.tagName; | |
| const padding = parseInt(tag.charAt(1)) - 1; | |
| const text = element.textContent?.replace(/\s{2,}/g, " "); |
NewerOlder