From 86631cee2f5309aa29f52ed6a569dc7ed94579f0 Mon Sep 17 00:00:00 2001 From: Hans Pagel Date: Wed, 18 Nov 2020 11:04:38 +0100 Subject: [PATCH 01/12] prevent build memory leak, build one package ofter the other --- .github/workflows/build.yml | 2 -- package.json | 4 ++-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d0b3c076..6e91f175 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -148,8 +148,6 @@ jobs: - name: Try to build the packages id: build-packages run: yarn build:ci - env: - NODE_OPTIONS: --max_old_space_size=8192 - name: Send Slack notifications uses: act10ns/slack@v1 diff --git a/package.json b/package.json index c479eaf5..72b104fb 100644 --- a/package.json +++ b/package.json @@ -13,8 +13,8 @@ "scripts": { "start": "yarn --cwd ./docs start", "build:docs": "yarn --cwd ./docs build", - "build:packages": "yarn clean:packages && node --max-old-space-size=8192 node_modules/.bin/rollup -c", - "build:ci": "yarn clean:packages && rollup -c --ci", + "build:packages": "yarn clean:packages && for dir in packages/*; do package=${dir#'packages/'}; rollup -c --scope @tiptap/$package; done", + "build:ci": "yarn clean:packages && for dir in packages/*; do package=${dir#'packages/'}; rollup -c --ci --scope @tiptap/$package; done", "clean:packages": "rm -rf ./packages/*/dist", "release": "yarn lint && yarn test && yarn build:packages && lerna publish", "lint": "eslint --quiet --no-error-on-unmatched-pattern ./", From 55137951919ca5539e28f194fbf9eea8f1837087 Mon Sep 17 00:00:00 2001 From: Hans Pagel Date: Wed, 18 Nov 2020 11:08:49 +0100 Subject: [PATCH 02/12] add lint:fix script --- package.json | 1 + 1 file changed, 1 insertion(+) diff --git a/package.json b/package.json index 72b104fb..d1aed130 100644 --- a/package.json +++ b/package.json @@ -18,6 +18,7 @@ "clean:packages": "rm -rf ./packages/*/dist", "release": "yarn lint && yarn test && yarn build:packages && lerna publish", "lint": "eslint --quiet --no-error-on-unmatched-pattern ./", + "lint:fix": "eslint --fix --quiet --no-error-on-unmatched-pattern ./", "test:open": "cypress open --project tests", "test": "cypress run --project tests", "reset": "yarn clean:packages && rm -rf ./**/.cache && rm -rf ./**/node_modules && rm -rf ./yarn.lock && yarn install" From b394d66a3add6b31d4837fa88f9699ffd38faa33 Mon Sep 17 00:00:00 2001 From: Hans Pagel Date: Wed, 18 Nov 2020 11:16:51 +0100 Subject: [PATCH 03/12] automatically fix linting errors --- .github/workflows/build.yml | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 6e91f175..7983dac8 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -51,12 +51,24 @@ jobs: - name: Send Slack notifications uses: act10ns/slack@v1 + if: failure() with: status: ${{ job.status }} steps: ${{ toJson(steps) }} channel: '#tiptap-notifications' + + - name: Fix code style linting errors + id: lint-fix + run: yarn lint:fix if: failure() + - name: Commit fixed linting errors + id: commit + uses: stefanzweifel/git-auto-commit-action@v4 + if: failure() + with: + commit_message: "ci: fix code style linting errors" + test: runs-on: ubuntu-latest @@ -104,11 +116,11 @@ jobs: - name: Send Slack notifications uses: act10ns/slack@v1 + if: failure() with: status: ${{ job.status }} steps: ${{ toJson(steps) }} channel: '#tiptap-notifications' - if: failure() build: runs-on: ubuntu-latest @@ -151,8 +163,8 @@ jobs: - name: Send Slack notifications uses: act10ns/slack@v1 + if: failure() with: status: ${{ job.status }} steps: ${{ toJson(steps) }} channel: '#tiptap-notifications' - if: failure() From b3db94c9448e821429acede3e5c38786259ef6fc Mon Sep 17 00:00:00 2001 From: Hans Pagel Date: Wed, 18 Nov 2020 11:17:03 +0100 Subject: [PATCH 04/12] add linting error to test automatic fixing --- packages/extension-bold/src/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/extension-bold/src/index.ts b/packages/extension-bold/src/index.ts index 4e60e821..459236a2 100644 --- a/packages/extension-bold/src/index.ts +++ b/packages/extension-bold/src/index.ts @@ -17,7 +17,7 @@ const Bold = Mark.create({ name: 'bold', defaultOptions: { - HTMLAttributes: {}, + HTMLAttributes: {} }, parseHTML() { From 4e487dd57590b3c036a0f7a68ffe2ff616487de8 Mon Sep 17 00:00:00 2001 From: hanspagel Date: Wed, 18 Nov 2020 10:18:16 +0000 Subject: [PATCH 05/12] ci: fix code style linting errors --- packages/extension-bold/src/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/extension-bold/src/index.ts b/packages/extension-bold/src/index.ts index 459236a2..4e60e821 100644 --- a/packages/extension-bold/src/index.ts +++ b/packages/extension-bold/src/index.ts @@ -17,7 +17,7 @@ const Bold = Mark.create({ name: 'bold', defaultOptions: { - HTMLAttributes: {} + HTMLAttributes: {}, }, parseHTML() { From be7b6be31f66fb2d0a91646c144aeac8d56e4cf1 Mon Sep 17 00:00:00 2001 From: Hans Pagel Date: Wed, 18 Nov 2020 11:23:33 +0100 Subject: [PATCH 06/12] reorder npm scripts --- package.json | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index d1aed130..7084ff88 100644 --- a/package.json +++ b/package.json @@ -12,15 +12,15 @@ ], "scripts": { "start": "yarn --cwd ./docs start", - "build:docs": "yarn --cwd ./docs build", - "build:packages": "yarn clean:packages && for dir in packages/*; do package=${dir#'packages/'}; rollup -c --scope @tiptap/$package; done", - "build:ci": "yarn clean:packages && for dir in packages/*; do package=${dir#'packages/'}; rollup -c --ci --scope @tiptap/$package; done", - "clean:packages": "rm -rf ./packages/*/dist", - "release": "yarn lint && yarn test && yarn build:packages && lerna publish", "lint": "eslint --quiet --no-error-on-unmatched-pattern ./", "lint:fix": "eslint --fix --quiet --no-error-on-unmatched-pattern ./", "test:open": "cypress open --project tests", "test": "cypress run --project tests", + "build:docs": "yarn --cwd ./docs build", + "build:ci": "yarn clean:packages && for dir in packages/*; do package=${dir#'packages/'}; rollup -c --ci --scope @tiptap/$package; done", + "build:packages": "yarn clean:packages && for dir in packages/*; do package=${dir#'packages/'}; rollup -c --scope @tiptap/$package; done", + "release": "yarn lint && yarn test && yarn build:packages && lerna publish", + "clean:packages": "rm -rf ./packages/*/dist", "reset": "yarn clean:packages && rm -rf ./**/.cache && rm -rf ./**/node_modules && rm -rf ./yarn.lock && yarn install" }, "devDependencies": { From b916c4317c551b1238bb6e280ad7302803e8558a Mon Sep 17 00:00:00 2001 From: Hans Pagel Date: Wed, 18 Nov 2020 11:28:24 +0100 Subject: [PATCH 07/12] =?UTF-8?q?send=20Slack=20notifications=20only,=20wh?= =?UTF-8?q?en=20linting=20errors=20can=E2=80=99t=20be=20fixed=20automatica?= =?UTF-8?q?lly?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/build.yml | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 7983dac8..21872b60 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -45,6 +45,16 @@ jobs: if: steps.cache.outputs.cache-hit != 'true' run: yarn install + - name: Fix code style linting errors + id: lint-fix + run: yarn lint:fix + + - name: Commit fixed linting errors + id: commit + uses: stefanzweifel/git-auto-commit-action@v4 + with: + commit_message: "ci: fix code style linting errors" + - name: Lint code id: lint run: yarn lint @@ -57,18 +67,6 @@ jobs: steps: ${{ toJson(steps) }} channel: '#tiptap-notifications' - - name: Fix code style linting errors - id: lint-fix - run: yarn lint:fix - if: failure() - - - name: Commit fixed linting errors - id: commit - uses: stefanzweifel/git-auto-commit-action@v4 - if: failure() - with: - commit_message: "ci: fix code style linting errors" - test: runs-on: ubuntu-latest From 8e1fd50967cc8b60d2c70697156c52bfaf8279cf Mon Sep 17 00:00:00 2001 From: Hans Pagel Date: Wed, 18 Nov 2020 11:29:05 +0100 Subject: [PATCH 08/12] add a linting error which should be fixed automatically --- packages/extension-bold/src/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/extension-bold/src/index.ts b/packages/extension-bold/src/index.ts index 4e60e821..459236a2 100644 --- a/packages/extension-bold/src/index.ts +++ b/packages/extension-bold/src/index.ts @@ -17,7 +17,7 @@ const Bold = Mark.create({ name: 'bold', defaultOptions: { - HTMLAttributes: {}, + HTMLAttributes: {} }, parseHTML() { From 29f8b7212afed19c0b9ff719349cb440648e43a6 Mon Sep 17 00:00:00 2001 From: hanspagel Date: Wed, 18 Nov 2020 10:29:55 +0000 Subject: [PATCH 09/12] ci: fix code style linting errors --- packages/extension-bold/src/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/extension-bold/src/index.ts b/packages/extension-bold/src/index.ts index 459236a2..4e60e821 100644 --- a/packages/extension-bold/src/index.ts +++ b/packages/extension-bold/src/index.ts @@ -17,7 +17,7 @@ const Bold = Mark.create({ name: 'bold', defaultOptions: { - HTMLAttributes: {} + HTMLAttributes: {}, }, parseHTML() { From d5b6069511e4bf0b66ac1acffa1e4391d632bee5 Mon Sep 17 00:00:00 2001 From: Hans Pagel Date: Wed, 18 Nov 2020 11:31:40 +0100 Subject: [PATCH 10/12] =?UTF-8?q?add=20unused=20import=20which=20can?= =?UTF-8?q?=E2=80=99t=20be=20fixed=20automatically?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/src/demos/Marks/Bold/index.vue | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/src/demos/Marks/Bold/index.vue b/docs/src/demos/Marks/Bold/index.vue index f99e514d..751e9621 100644 --- a/docs/src/demos/Marks/Bold/index.vue +++ b/docs/src/demos/Marks/Bold/index.vue @@ -15,6 +15,7 @@ import Document from '@tiptap/extension-document' import Paragraph from '@tiptap/extension-paragraph' import Text from '@tiptap/extension-text' import Bold from '@tiptap/extension-bold' +import Strike from '@tiptap/extension-strike' export default { components: { From 9388e6c85ca6dd9be10a9000b4cb238dfb953d71 Mon Sep 17 00:00:00 2001 From: Hans Pagel Date: Wed, 18 Nov 2020 11:34:33 +0100 Subject: [PATCH 11/12] commit some linting fixes, even if not all errors can be fixed --- .github/workflows/build.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 21872b60..912ca6ca 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -48,6 +48,7 @@ jobs: - name: Fix code style linting errors id: lint-fix run: yarn lint:fix + continue-on-error: true - name: Commit fixed linting errors id: commit From 5ee92bcbfb38b1f6e10760cd943d4b79ac5d0798 Mon Sep 17 00:00:00 2001 From: Hans Pagel Date: Wed, 18 Nov 2020 11:37:12 +0100 Subject: [PATCH 12/12] remove unused import --- docs/src/demos/Marks/Bold/index.vue | 1 - 1 file changed, 1 deletion(-) diff --git a/docs/src/demos/Marks/Bold/index.vue b/docs/src/demos/Marks/Bold/index.vue index 751e9621..f99e514d 100644 --- a/docs/src/demos/Marks/Bold/index.vue +++ b/docs/src/demos/Marks/Bold/index.vue @@ -15,7 +15,6 @@ import Document from '@tiptap/extension-document' import Paragraph from '@tiptap/extension-paragraph' import Text from '@tiptap/extension-text' import Bold from '@tiptap/extension-bold' -import Strike from '@tiptap/extension-strike' export default { components: {