Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(release): tiptap v2.5 #5341

Merged
merged 115 commits into from
Jul 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
115 commits
Select commit Hold shift + click to select a range
cf9cb28
merge main
bdbch Jan 11, 2024
48e2e28
utilities link
janthurau Feb 2, 2024
8010dfb
Merge branch 'develop' of github.com:ueberdosis/tiptap into develop
svenadlung Feb 12, 2024
4eb9874
webhook docs for v2
janthurau Feb 24, 2024
0be1c5b
Update links.yaml
ThisDavidRichard Mar 13, 2024
1bcef03
Feature/y sync options: allow passing ySyncOptions to extension-colla…
janthurau Mar 27, 2024
2390cf2
fix for data attributes not rendering after pr #4082 (#4980)
moham96 Apr 5, 2024
7213843
merge main into develop
bdbch Apr 5, 2024
fb2b1c0
fix: only start at block with removing if not an inline node (#4791)
PHillemans May 9, 2024
5ae2de2
chore: merge main into develop
bdbch May 13, 2024
55cc320
chore: merge main
bdbch May 14, 2024
80ba352
Merge branch 'main' of github.com:ueberdosis/tiptap into develop
bdbch May 14, 2024
32ed87b
fix: don't init when editor is already destroyed (#4029)
tomi-bigpi May 17, 2024
ec17523
fix: Allow `emit` to be accessed anywhere (#3848)
fw6 May 23, 2024
393d83e
fix(suggestion): unused parameter oldState in apply. (#4771)
remyma May 23, 2024
c1e115c
Fix unexpected token in index.js (Rollup) (#4538)
AlphaX-Projects May 23, 2024
6991788
chore: merge branch 'main' into develop
nperez0111 May 29, 2024
d36a7ef
v2.5.0-beta.0
nperez0111 May 29, 2024
65a0613
Merge branch 'main' into develop
nperez0111 Jun 4, 2024
52002fe
v2.5.0-beta.1
nperez0111 Jun 4, 2024
ea6dd09
docs: define keepOnSplit and default optional (#4404)
moander Jun 7, 2024
65cef59
Merge branch 'main' into develop
nperez0111 Jun 7, 2024
4a01716
v2.5.0-beta.2
nperez0111 Jun 7, 2024
3d32639
feat: pass node & mark extensions as a contextual variable to `addGlo…
nperez0111 Jun 3, 2024
aee15c2
fix: use a faster type check for determining if a fragment or not
nperez0111 Jun 3, 2024
f4a7dba
refactor: use the faster `.eq` method for determining equality
nperez0111 May 31, 2024
747985b
chore: update package versions for prosemirror
nperez0111 Jun 11, 2024
7e7ae19
test: wait a little longer, pre-optimize some deps
nperez0111 Jun 11, 2024
4e4c622
refactor: rm circular dependency
nperez0111 Jun 12, 2024
8d93070
fix(suggestion): fixes re-rendering logic (#4380)
fsvergara Jun 12, 2024
31f3746
fix(vue-3): faster component rendering (#5206)
Rirax Jun 12, 2024
fe78faa
fix(core): mergeDeep now can merge nulls (#4088)
YousefED Jun 12, 2024
d6dc1e0
v2.5.0-beta.3
nperez0111 Jun 12, 2024
ca2a228
Merge branch 'main' into develop
nperez0111 Jun 13, 2024
33de6fe
fix(horizontal-rule): fix insertion behavior (#4898)
aguydan Jun 14, 2024
d122980
fix(core): update tabindex on state change (#5231) (#5232)
nazar-ch Jun 14, 2024
b2aefc2
chore: package-lock
nperez0111 Jun 18, 2024
2ef43e9
fix(core): make exitable resolve it's value through inheritance (#5244)
nperez0111 Jun 18, 2024
3556d58
fix(core): the whitespace value for a node was not being sent to pros…
nperez0111 Jun 18, 2024
c540c7d
fix: apply #5147 fix to marks and nodes resolves #4704 (#5156)
nperez0111 Jun 18, 2024
08125c4
v2.5.0-beta.4
nperez0111 Jun 18, 2024
9ec0cd5
docs: make docs searchable
nperez0111 Jun 18, 2024
1175b9c
revert: reverts a52118c34b30cc2937c258ea6aac9c9a2702adc2 to fix cente…
nperez0111 Jun 25, 2024
2198991
fix: provide the error cause
nperez0111 Jun 25, 2024
81d3b8a
feat(core): normalize setContent and insertContentAt (#4895)
bdbch Jun 25, 2024
0e96a2c
v2.5.0-beta.5
nperez0111 Jun 25, 2024
1cab33f
chore: update prosemirror-model dep to non-breaking version
nperez0111 Jun 26, 2024
6f59052
chore: make prosemirrror-model a range
nperez0111 Jun 26, 2024
aa745be
chore: rebuidl package-lock for correct versions
nperez0111 Jun 26, 2024
05856fb
v2.5.0-beta.6
nperez0111 Jun 26, 2024
7c0631e
chore: package-lock
nperez0111 Jun 26, 2024
4ad8bbe
chore: update package-lock
nperez0111 Jun 26, 2024
c121d53
refactor: fix types
nperez0111 Jun 26, 2024
45f58ca
chore: update types
nperez0111 Jun 26, 2024
729d107
chore: revert dev dependencies in demos package to ensure peer depend…
bdbch Jun 26, 2024
8c017d8
chore: merged main branch into beta branch
bdbch Jun 26, 2024
c2a6177
Merge branch 'main' into next
bdbch Jun 26, 2024
6af368e
chore: removed old rollup plugin sizes plugin
bdbch Jun 27, 2024
e986853
chore: update package-lock
nperez0111 Jun 27, 2024
de04a9f
chore: ignore
nperez0111 Jun 27, 2024
58e43bb
switch from lerna to changesets for versioning and publishing (#5274)
bdbch Jun 27, 2024
d471b6b
fix publish script
bdbch Jun 27, 2024
359d808
add run url to notification
bdbch Jun 27, 2024
d78370d
cancel running runs that are obsolete
bdbch Jun 27, 2024
f86bf5c
add manual trigger for release
bdbch Jun 27, 2024
f3ff7ca
move CHANGELOG notice to correct file
bdbch Jun 27, 2024
c2e4ad9
cancel running build runs in concurrency
bdbch Jun 27, 2024
89fefab
fix: placeholders now check for empty content compared to their "true…
nperez0111 Jun 28, 2024
d1c5c97
chore: version Packages (pre) (#5280)
github-actions[bot] Jul 2, 2024
c96d332
Merge branch 'main' into develop
nperez0111 Jul 2, 2024
f79f223
Merge branch 'main' into develop
svenadlung Jul 2, 2024
dfacb3b
chore: regenerate package-lock
nperez0111 Jul 2, 2024
509676e
fix(vue-3): fix editor.state updating too late during a transaction d…
segevfiner Jul 2, 2024
4cbb09e
chore: version packages
github-actions[bot] Jul 2, 2024
05271c9
build: try to update gh action step versions
nperez0111 Jul 3, 2024
780bff8
feat: add turbo for parallel builds
nperez0111 Jul 3, 2024
826ffbc
chore: allow pushing tags
nperez0111 Jul 3, 2024
14a00f4
chore: use vite in prod mode during tests
nperez0111 Jul 3, 2024
a43afc3
chore: allow PR writes
nperez0111 Jul 3, 2024
f1446a2
chore: on push of develop
nperez0111 Jul 3, 2024
5ccc2ad
build(deps): bump cypress-io/github-action from 6.6.0 to 6.7.1 (#5240)
dependabot[bot] Jul 3, 2024
d5e10dc
fix: make blockquote shortcut work in starter-kit (#4995)
Mathias-S Jul 3, 2024
42af7a1
chore: version packages (pre) (#5308)
github-actions[bot] Jul 3, 2024
0c4396e
chore: title PRs
nperez0111 Jul 3, 2024
74a37ff
chore: add a changeset
nperez0111 Jul 3, 2024
a20b18c
chore(release): publish a new pre-release version (pre)
github-actions[bot] Jul 3, 2024
3169879
chore: add turbo to cached files
nperez0111 Jul 3, 2024
8995a16
chore: add cache to publish step
nperez0111 Jul 3, 2024
fc71c11
chore: rm from changeset for releasing
nperez0111 Jul 3, 2024
76063d7
chore: coalesce the two steps together
nperez0111 Jul 3, 2024
1fc534f
chore: fix notation
nperez0111 Jul 3, 2024
9fe7378
chore: add inputs
nperez0111 Jul 3, 2024
1f87cd9
chore(release): publish a new pre-release version (pre)
github-actions[bot] Jul 3, 2024
e5909d9
chore: to use changesets publish
nperez0111 Jul 3, 2024
3f5be5e
chore(release): publish a new pre-release version (pre)
github-actions[bot] Jul 3, 2024
6b7daca
chore: make pm not rebuild everytime
nperez0111 Jul 3, 2024
1db0250
chore: rm changeset
nperez0111 Jul 3, 2024
89b5f4d
chore: build with publish step
nperez0111 Jul 3, 2024
5c2f67f
chore(release): publish a new pre-release version (pre)
github-actions[bot] Jul 3, 2024
df5609c
fix: default to rendering the editor immediately, while staying backw…
nperez0111 Jul 10, 2024
91d8f58
Publish a new pre-release version (pre) (#5322)
github-actions[bot] Jul 10, 2024
e902c12
refactor(react): flip order of useEditorState overloads
alii Jul 11, 2024
3a67a5b
chore: add changeset for release
nperez0111 Jul 11, 2024
db0d007
Publish a new pre-release version (pre) (#5328)
github-actions[bot] Jul 11, 2024
1110280
fix(react): `useEditor` should not destroy still mounted instances (#…
nperez0111 Jul 13, 2024
c15f89b
chore(release): publish a new pre-release version (pre)
github-actions[bot] Jul 13, 2024
fcf5eee
chore: add previous changesets
nperez0111 Jul 13, 2024
964df55
chore: exit pre release
nperez0111 Jul 13, 2024
ff15704
chore(release): publish a new pre-release version
github-actions[bot] Jul 13, 2024
fb45149
revert: "chore(release): publish a new pre-release version"
nperez0111 Jul 14, 2024
b2dad29
chore: version number
nperez0111 Jul 14, 2024
9b566b9
chore: release version 2.5
nperez0111 Jul 14, 2024
dd2e54a
chore: package-lock
nperez0111 Jul 14, 2024
acf86b0
chore: update package version
nperez0111 Jul 14, 2024
82fbabc
chore: regenerate package-lock
nperez0111 Jul 14, 2024
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
5 changes: 3 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ jobs:
with:
path: |
**/node_modules
**/.turbo
/home/runner/.cache/Cypress
key: ${{ runner.os }}-node-${{ matrix.node-version }}-${{ hashFiles('**/package-lock.json') }}

Expand Down Expand Up @@ -102,10 +103,10 @@ jobs:

- name: Test ${{ matrix.test-spec.name }}
id: cypress
uses: cypress-io/github-action@v6.6.0
uses: cypress-io/github-action@v6.7.1
with:
cache-key: ${{ runner.os }}-node-${{ matrix.node-version }}-${{ hashFiles('**/package-lock.json') }}
start: npm run start
start: npm run serve
wait-on: 'http://localhost:3000'
spec: ${{ matrix.test-spec.spec }}
project: ./tests
Expand Down
48 changes: 30 additions & 18 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,14 @@ on:
push:
branches:
- main
- develop
# manual trigger for other branches
workflow_dispatch:

permissions:
id-token: write
contents: write
pull-requests: write

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand All @@ -16,41 +21,48 @@ jobs:
release:
name: Release
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [20]

steps:
- name: Checkout Repo
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Setup Node 20
uses: actions/setup-node@v3
- name: Setup Node ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: 20
registry-url: https://registry.npmjs.org/
node-version: ${{ matrix.node-version }}
registry-url: 'https://registry.npmjs.org/'

- name: Load cached dependencies
uses: actions/cache@v4.0.2
id: cache
with:
path: |
**/node_modules
**/.turbo
/home/runner/.cache/Cypress
key: ${{ runner.os }}-node-${{ matrix.node-version }}-${{ hashFiles('**/package-lock.json') }}

- name: Install Dependencies
run: npm ci

- name: Create Release PR or publish stable version to npm
if: github.ref_name == 'main'
id: changesets
uses: changesets/action@v1
with:
publish: npm run publish
title: ${{ github.ref_name == 'main' && 'Publish a new stable version' || 'Publish a new pre-release version' }}
commit: >-
${{ github.ref_name == 'main' && 'chore(release): publish a new release version' || 'chore(release): publish a new pre-release version' }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{secrets.NPM_TOKEN}}

- name: Create Release PR or publish pre version to npm
if: github.ref_name != 'main'
id: changesets_pre
uses: changesets/action@v1
with:
publish: npm run publish:pre
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{secrets.NPM_TOKEN}}
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}

- name: Send release notification
if: steps.changesets.outputs.published == 'true' || steps.changesets_pre.outputs.published == 'true'
if: steps.changesets.outputs.published == 'true'
id: slack
uses: slackapi/slack-github-action@v1.26.0
with:
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ yarn-error.log*
# parcel-bundler cache (https://parceljs.org/)
.cache

# Turbo cache
.turbo

.rpt2_cache
.rts2_cache
.rts2_cache_cjs
Expand Down
6 changes: 3 additions & 3 deletions demos/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

104 changes: 81 additions & 23 deletions demos/preview/index.vue
Original file line number Diff line number Diff line change
@@ -1,32 +1,90 @@
<script>
<script setup>
import { ref } from 'vue'

// @ts-nocheck
const showDemoList = process.env.NODE_ENV === 'development'

const searchValue = ref('')

</script>

<template>
<ul v-if="$route.path === '/'">
<li
class="p-5 border-b-2 border-black"
v-for="route in $router.options.routes"
:key="route.path"
<template v-if="$route.path === '/'">
<input
class="w-full p-3 my-3 focus:outline-none border-b"
type="search"
placeholder="Search for a demo..."
autofocus
v-model="searchValue"
>
<router-link
class="block mb-2 font-medium"
:to="route.path"
<ul v-if="showDemoList || listing">
<li
class="p-5 border-b-2 border-black"
v-for="route in $router.options.routes.filter(route => searchValue === ''? true : route.props.name.toLowerCase().includes(searchValue.toLowerCase()))"
:key="route.path"
>
{{ route.props.name }}
</router-link>

<div class="flex">
<a
class="mr-4 text-sm text-gray-300 font-medium"
v-for="(tab, index) in route.props.tabs"
:key="index"
:href="`/src/${route.props.name}/${tab.name}/`"
<router-link
class="block mb-2 font-medium"
:to="route.path"
>
{{ tab.name }}
</a>
</div>
</li>
</ul>
{{ route.props.name }}
</router-link>

<div class="flex">
<a
class="mr-4 text-sm text-gray-300 font-medium"
v-for="(tab, index) in route.props.tabs"
:key="index"
:href="`/src/${route.props.name}/${tab.name}/`"
>
{{ tab.name }}
</a>
</div>
</li>
</ul>
<div v-else>Nothing to see here :-)</div>
</template>
<router-view v-else />
</template>

<script>
export default {
methods: {
fromString(value) {
if (value === null) {
return true
}

if (value.match(/^\d*(\.\d+)?$/)) {
return Number(value)
}

if (value === 'true') {
return true
}

if (value === 'false') {
return false
}

if (value === 'null') {
return null
}

return value
},
},

computed: {
query() {
return Object.fromEntries(Object
.entries(this.$route.query)
.map(([key, value]) => [key, this.fromString(value)]))
},

listing() {
return this.query.listing || false
},
},
}
</script>
50 changes: 50 additions & 0 deletions demos/src/Commands/InsertContent/React/index.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,54 @@ context('/src/Commands/InsertContent/React/', () => {
cy.get('.tiptap').should('contain.html', '<pre><code>foo\nbar</code></pre>')
})
})

it('should keep newlines and tabs', () => {
cy.get('.tiptap').then(([{ editor }]) => {
editor.commands.insertContent('<p>Hello\n\tworld\n\t\thow\n\t\t\tnice.\ntest\tOK</p>')
cy.get('.tiptap').should('contain.html', '<p>Hello\n\tworld\n\t\thow\n\t\t\tnice.\ntest\tOK</p>')
})
})

it('should keep newlines and tabs', () => {
cy.get('.tiptap').then(([{ editor }]) => {
editor.commands.insertContent('<h1>Tiptap</h1>\n<p><strong>Hello World</strong></p>')
cy.get('.tiptap').should('contain.html', '<h1>Tiptap</h1><p><strong>Hello World</strong></p>')
})
})

it('should allow inserting nothing', () => {
cy.get('.tiptap').then(([{ editor }]) => {
editor.commands.insertContent('')
cy.get('.tiptap').should('contain.html', '')
})
})

it('should allow inserting a partial HTML tag', () => {
cy.get('.tiptap').then(([{ editor }]) => {
editor.commands.insertContent('<p>foo')
cy.get('.tiptap').should('contain.html', '<p>foo</p>')
})
})

it('should allow inserting an incomplete HTML tag', () => {
cy.get('.tiptap').then(([{ editor }]) => {
editor.commands.insertContent('foo<p')
cy.get('.tiptap').should('contain.html', '<p>foo&lt;p</p>')
})
})

it('should allow inserting a list', () => {
cy.get('.tiptap').then(([{ editor }]) => {
editor.commands.insertContent('<ul><li>ABC</li><li>123</li></ul>')
cy.get('.tiptap').should('contain.html', '<ul><li><p>ABC</p></li><li><p>123</p></li></ul>')
})
})

it('should remove newlines and tabs when parseOptions.preserveWhitespace=false', () => {
cy.get('.tiptap').then(([{ editor }]) => {
editor.commands.insertContent('\n<h1>Tiptap</h1><p><strong>Hello\n World</strong>\n</p>\n', { parseOptions: { preserveWhitespace: false } })
cy.get('.tiptap').should('contain.html', '<h1>Tiptap</h1><p><strong>Hello World</strong></p>')
})
})

})
Empty file.
31 changes: 31 additions & 0 deletions demos/src/Commands/SetContent/React/index.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
import './styles.scss'

import { Color } from '@tiptap/extension-color'
import ListItem from '@tiptap/extension-list-item'
import Mentions from '@tiptap/extension-mention'
import TextStyle from '@tiptap/extension-text-style'
import { EditorProvider } from '@tiptap/react'
import StarterKit from '@tiptap/starter-kit'
import React from 'react'

const extensions = [
Color.configure({ types: [TextStyle.name, ListItem.name] }),
TextStyle.configure({ types: [ListItem.name] }),
StarterKit.configure({
bulletList: {
keepMarks: true,
},
orderedList: {
keepMarks: true,
},
}),
Mentions,
]

const content = ''

export default () => {
return (
<EditorProvider extensions={extensions} content={content}></EditorProvider>
)
}
Loading