Skip to content

Commit

Permalink
Merge branch 'main' into patch-2
Browse files Browse the repository at this point in the history
  • Loading branch information
etrepum authored Dec 2, 2024
2 parents 53d17d1 + c1d8a36 commit 5ecf938
Show file tree
Hide file tree
Showing 335 changed files with 33,130 additions and 12,163 deletions.
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,4 @@
.ts-temp
**/.docusaurus
/playwright-report
test-results
5 changes: 4 additions & 1 deletion .flowconfig
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ untyped-type-import=error
[options]
server.max_workers=4
exact_by_default=true
component_syntax=true

;; [generated-start update-flowconfig]
module.name_mapper='^lexical$' -> '<PROJECT_ROOT>/packages/lexical/flow/Lexical.js.flow'
Expand Down Expand Up @@ -52,6 +53,7 @@ module.name_mapper='^@lexical/react/LexicalComposerContext$' -> '<PROJECT_ROOT>/
module.name_mapper='^@lexical/react/LexicalContentEditable$' -> '<PROJECT_ROOT>/packages/lexical-react/flow/LexicalContentEditable.js.flow'
module.name_mapper='^@lexical/react/LexicalContextMenuPlugin$' -> '<PROJECT_ROOT>/packages/lexical-react/flow/LexicalContextMenuPlugin.js.flow'
module.name_mapper='^@lexical/react/LexicalDecoratorBlockNode$' -> '<PROJECT_ROOT>/packages/lexical-react/flow/LexicalDecoratorBlockNode.js.flow'
module.name_mapper='^@lexical/react/LexicalDraggableBlockPlugin$' -> '<PROJECT_ROOT>/packages/lexical-react/flow/LexicalDraggableBlockPlugin.js.flow'
module.name_mapper='^@lexical/react/LexicalEditorRefPlugin$' -> '<PROJECT_ROOT>/packages/lexical-react/flow/LexicalEditorRefPlugin.js.flow'
module.name_mapper='^@lexical/react/LexicalErrorBoundary$' -> '<PROJECT_ROOT>/packages/lexical-react/flow/LexicalErrorBoundary.js.flow'
module.name_mapper='^@lexical/react/LexicalHashtagPlugin$' -> '<PROJECT_ROOT>/packages/lexical-react/flow/LexicalHashtagPlugin.js.flow'
Expand All @@ -67,6 +69,7 @@ module.name_mapper='^@lexical/react/LexicalNodeMenuPlugin$' -> '<PROJECT_ROOT>/p
module.name_mapper='^@lexical/react/LexicalOnChangePlugin$' -> '<PROJECT_ROOT>/packages/lexical-react/flow/LexicalOnChangePlugin.js.flow'
module.name_mapper='^@lexical/react/LexicalPlainTextPlugin$' -> '<PROJECT_ROOT>/packages/lexical-react/flow/LexicalPlainTextPlugin.js.flow'
module.name_mapper='^@lexical/react/LexicalRichTextPlugin$' -> '<PROJECT_ROOT>/packages/lexical-react/flow/LexicalRichTextPlugin.js.flow'
module.name_mapper='^@lexical/react/LexicalSelectionAlwaysOnDisplay$' -> '<PROJECT_ROOT>/packages/lexical-react/flow/LexicalSelectionAlwaysOnDisplay.js.flow'
module.name_mapper='^@lexical/react/LexicalTabIndentationPlugin$' -> '<PROJECT_ROOT>/packages/lexical-react/flow/LexicalTabIndentationPlugin.js.flow'
module.name_mapper='^@lexical/react/LexicalTableOfContents$' -> '<PROJECT_ROOT>/packages/lexical-react/flow/LexicalTableOfContents.js.flow'
module.name_mapper='^@lexical/react/LexicalTableOfContentsPlugin$' -> '<PROJECT_ROOT>/packages/lexical-react/flow/LexicalTableOfContentsPlugin.js.flow'
Expand Down Expand Up @@ -104,4 +107,4 @@ nonstrict-import
unclear-type

[version]
^0.226.0
^0.250.0
2 changes: 1 addition & 1 deletion .github/workflows/after-approval.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
concurrent_skipping: 'same_content_newer'
skip_after_successful_duplicate: 'true'
do_not_skip: '["pull_request", "merge_group"]'
paths_ignore: '["packages/lexical-website/**", "packages/*/README.md", ".size-limit.js"]'
paths_ignore: '["packages/lexical-website/**", "packages/*/README.md", ".size-limit.js", "examples/**"]'
e2e-tests:
needs: pre_job
if: needs.pre_job.outputs.should_skip != 'true' && (github.event.review.state == 'approved' && !contains(github.event.pull_request.labels.*.name, 'extended-tests'))
Expand Down
65 changes: 40 additions & 25 deletions .github/workflows/call-e2e-all-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,27 @@ on:
workflow_call:

jobs:
mac:
mac-rich:
strategy:
matrix:
node-version: [18.18.0]
browser: ['chromium', 'firefox', 'webkit']
editor-mode: ['rich-text', 'plain-text']
browser: ['webkit', 'chromium', 'firefox']
editor-mode: ['rich-text']
events-mode: ['modern-events']
uses: ./.github/workflows/call-e2e-test.yml
with:
os: 'macos-latest'
node-version: ${{ matrix.node-version }}
browser: ${{ matrix.browser }}
editor-mode: ${{ matrix.editor-mode }}
events-mode: ${{ matrix.events-mode }}

mac-plain:
strategy:
matrix:
node-version: [18.18.0]
browser: ['webkit']
editor-mode: ['plain-text']
events-mode: ['modern-events']
uses: ./.github/workflows/call-e2e-test.yml
with:
Expand Down Expand Up @@ -56,7 +71,7 @@ jobs:
strategy:
matrix:
node-version: [18.18.0]
browser: ['chromium', 'firefox', 'webkit']
browser: ['webkit']
uses: ./.github/workflows/call-e2e-test.yml
with:
os: 'macos-latest'
Expand Down Expand Up @@ -94,7 +109,7 @@ jobs:
prod:
strategy:
matrix:
os: ['macos-latest']
os: ['ubuntu-latest']
node-version: [18.18.0]
browser: ['chromium']
editor-mode: ['rich-text']
Expand All @@ -111,7 +126,7 @@ jobs:
collab-prod:
strategy:
matrix:
os: ['macos-latest']
os: ['ubuntu-latest']
node-version: [18.18.0]
browser: ['chromium']
editor-mode: ['rich-text-with-collab']
Expand All @@ -125,34 +140,34 @@ jobs:
editor-mode: ${{ matrix.editor-mode }}
events-mode: ${{ matrix.events-mode }}

react-beta:
strategy:
matrix:
# Currently using a single combination for every-patch e2e tests of
# react beta to reduce cost impact
editor-mode: ['rich-text']
prod: [false]
uses: ./.github/workflows/call-e2e-test.yml
with:
os: 'macos-latest'
browser: 'chromium'
node-version: 18.18.0
events-mode: 'modern-events'
editor-mode: ${{ matrix.editor-mode }}
prod: ${{ matrix.prod }}
override-react-version: beta
# This has been stalling in GitHub CI for unknown reasons, disable for now
# react-beta:
# strategy:
# matrix:
# # Currently using a single combination for every-patch e2e tests of
# # react beta to reduce cost impact
# editor-mode: ['rich-text']
# prod: [false]
# uses: ./.github/workflows/call-e2e-test.yml
# with:
# os: 'ubuntu-latest'
# browser: 'chromium'
# node-version: 18.18.0
# events-mode: 'modern-events'
# editor-mode: ${{ matrix.editor-mode }}
# prod: ${{ matrix.prod }}
# override-react-version: beta

flaky:
strategy:
matrix:
node-version: [18.18.0]
# Currently using single browser & os combination for flaky tests to reduce cost impact
browser: ['chromium']
browser: ['chromium', 'firefox']
editor-mode: ['rich-text', 'plain-text', 'rich-text-with-collab']
events-mode: ['modern-events']
uses: ./.github/workflows/call-e2e-test.yml
with:
os: 'macos-latest'
os: 'ubuntu-latest'
flaky: true
node-version: ${{ matrix.node-version }}
browser: ${{ matrix.browser }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/call-e2e-canary-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
canary:
strategy:
matrix:
os: ['macos-latest']
os: ['ubuntu-latest']
node-version: [18.18.0]
browser: ['chromium']
editor-mode: ['rich-text']
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/call-e2e-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ name: Lexical e2e test runner
on:
workflow_call:
inputs:
# Make sure that all of these are present in the name of the actions/upload-artifact@v4 action below
os: {required: true, type: string}
node-version: {required: true, type: string}
browser: {required: true, type: string}
Expand All @@ -15,14 +16,15 @@ on:
jobs:
e2e-test:
runs-on: ${{ inputs.os }}
continue-on-error: ${{ inputs.flaky }}
if: (inputs.browser != 'webkit' || inputs.os == 'macos-latest') && (inputs.editor-mode != 'rich-text-with-collab' || inputs.events-mode != 'legacy-events')
env:
CI: true
E2E_EDITOR_MODE: ${{ inputs.editor-mode }}
E2E_EVENTS_MODE: ${{ inputs.events-mode }}
OVERRIDE_REACT_VERSION: ${{ inputs.override-react-version }}
cache_playwright_path: ${{ inputs.os == 'macos-latest' && '~/Library/Caches/ms-playwright' || inputs.os == 'windows-latest' && 'C:\Users\runneradmin\AppData\Local\ms-playwright' || '~/.cache/ms-playwright' }}
test_results_path: ${{ inputs.os == 'windows-latest' && '~/.npm/_logs/' || 'test-results/' }}
test_results_path: 'test-results/'
test_script: test-e2e-${{ inputs.editor-mode == 'rich-text-with-collab' && 'collab-' || '' }}${{ inputs.prod && 'prod-' || '' }}ci-${{ inputs.browser }} ${{ inputs.flaky && '-- -- --grep "@flaky"' || '-- -- --grep-invert "@flaky"' }}
steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -64,6 +66,6 @@ jobs:
if: failure()
uses: actions/upload-artifact@v4
with:
name: Test Results ${{ inputs.os }}-${{ inputs.browser }}-${{ inputs.editor-mode }}-${{ inputs.events-mode }}-${{ inputs.prod && 'prod' || 'dev' }}-${{ inputs.node-version }}-${{ inputs.override-react-version }}
name: Test Results ${{ inputs.os }}-${{ inputs.browser }}-${{ inputs.editor-mode }}-${{ inputs.events-mode }}-${{ inputs.prod && 'prod' || 'dev' }}-${{ inputs.node-version }}-${{ inputs.override-react-version }}-${{ inputs.flaky && 'flaky' || ''}}
path: ${{ env.test_results_path }}
retention-days: 7
2 changes: 1 addition & 1 deletion .github/workflows/call-integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.18.0]
node-version: [20.15.1]
env:
CI: true
steps:
Expand Down
18 changes: 18 additions & 0 deletions .github/workflows/close-stale-pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Close stale PR
on:
pull_request:
types: labeled
jobs:
close-pr:
if: github.event.label.name == 'stale-pr'
permissions:
pull-requests: write
runs-on: ubuntu-latest
steps:
- run: gh pr close "$NUMBER" --comment "$COMMENT"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_REPO: ${{ github.repository }}
NUMBER: ${{ github.event.number }}
COMMENT: >
Closing this PR due to staleness! If there are new updates, please reopen the PR.
1 change: 1 addition & 0 deletions .github/workflows/tests-extended.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
pull_request:
types: [labeled, synchronize, reopened]
paths-ignore:
- 'examples/**'
- 'packages/lexical-website/**'
- 'packages/*/README.md'
- '.size-limit.js'
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,12 @@ on:
branches:
- main
paths-ignore:
- 'examples/**'
- 'packages/lexical-website/**'
pull_request:
types: [opened, synchronize, reopened]
paths-ignore:
- 'examples/**'
- 'packages/lexical-website/**'

concurrency:
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ npm
.env.production.local
.ts-temp
.docusaurus
.playwright-clipboard.lock
e2e-screenshots
test-results
playwright-report
Expand Down
2 changes: 2 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ packages/playwright-core
packages/**/vite.config.js
packages/**/vite.prod.config.js
packages/lexical-website/docs/api
packages/lexical-website/fb/*.json
**/*.md
**/*.js.flow
**/node_modules
Expand All @@ -23,3 +24,4 @@ flow-typed
.prettierignore
**/.docusaurus
/playwright-report
test-results
Loading

0 comments on commit 5ecf938

Please sign in to comment.