Commit Graph

338 Commits

Author SHA1 Message Date
Joe Pea
7bbf13d9bd
Ensure code format (#2138)
* chore: add missing Vue support for Vercel builds

* refactor: move some functions and module-level state into classes as private methods and properties to start to encapsulate Docsify

Also some small tweaks:

- move initGlobalAPI out of Docsify.js to start to encapsulate Docsify
- move ajax to utils folder
- fix some type definitions and improve content in some JSDoc comments
- use concise class field syntax
- consolidate duplicate docsify-ignore comment removal code

This handles a task in [Simplify and modernize Docsify](https://github.com/docsifyjs/docsify/issues/2104), as well as works towards [Encapsulating Docsify](https://github.com/docsifyjs/docsify/issues/2135).

* chore: add prettier code format check to our lint script, and add a prettier script for manually formatting the whole code base

* chore: update issue/pr templates

* chore: apply our format to the whole code base


---------

Co-authored-by: Koy <koy@ko8e24.top>
Co-authored-by: i544693 <369491420@qq.com>
2023-08-09 17:53:30 +08:00
Joe Pea
9cb76027cd Merge branch 'es-modules' into update-rollup
* es-modules:
  feat: add google analytics gtag.js plugin (#1702)
  chore: bump conventional-changelog-cli from 2.2.2 to 3.0.0 (#2085)
2023-07-02 12:48:13 -07:00
Joe Pea
d34fef3635 Merge branch 'develop' into es-modules 2023-07-02 12:17:19 -07:00
Joe Pea
103dde845f Merge branch 'develop' into delete-ssr
* develop:
  feat: add google analytics gtag.js plugin (#1702)
  chore: bump conventional-changelog-cli from 2.2.2 to 3.0.0 (#2085)
2023-06-29 19:55:12 -07:00
Joe Pea
7a972d402a chore: update rollup
Update rollup and plugins, and remove some plugins. We'll use Rollup for
now only to bundle and minify our code, but otherwise we'll write
reasonably modern code and not need a transform.
2023-06-29 19:20:15 -07:00
Joe Pea
62d756c447 refactor: convert to ES Modules and remove traces of CommonJS except in Rollup config because some dependencies are still CommonJS
BREAKING: The new project layout might break in some tooling setups.

We've added an exports field to `package.json` to specify where
statements like `import ... from 'docsify'` will import from, and left
the `main` and `unpkg` fields as-is for backwards compatibility with the
global <script> import method. Most people who use a non-module
`<script>` tag to import Docsify will not notice a difference. Anyone
else who is importing Docsify into a specilized build setup using
`import` statements has a chance of being broken, so we've marked this
as BREAKING.
2023-06-29 19:02:08 -07:00
dependabot[bot]
a8a25d067b
chore: bump conventional-changelog-cli from 2.2.2 to 3.0.0 (#2085)
Bumps [conventional-changelog-cli](https://github.com/conventional-changelog/conventional-changelog) from 2.2.2 to 3.0.0.
- [Release notes](https://github.com/conventional-changelog/conventional-changelog/releases)
- [Changelog](https://github.com/conventional-changelog/conventional-changelog/blob/master/.release-please-manifest.json)
- [Commits](https://github.com/conventional-changelog/conventional-changelog/compare/conventional-changelog-cli-v2.2.2...conventional-changelog-cli-v3.0.0)

---
updated-dependencies:
- dependency-name: conventional-changelog-cli
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-26 15:38:42 +08:00
Joe Pea
8d5d20480a refactor: delete the experimental and incomplete SSR feature
BREAKING: SSR removed

Anyone depending on SSR will need to stay on an old Docsify version for
now, move forward without SSR, or maintain SSR against a fork of updated
Docsify. We have ideas on a better way to implement SSR, but these ideas
have not been implemented yet.
2023-06-25 12:03:44 -07:00
James Henry
4b9b464cbf
chore: migrate from lerna bootstrap to npm workspaces (#2094)
* chore: migrate from lerna bootstrap to npm workspaces

---------

Co-authored-by: 沈唁 <52o@qq52o.cn>
Co-authored-by: Joe Pea <joe@trusktr.io>
2023-06-24 14:35:13 -07:00
dependabot[bot]
a89d2f2607
chore: bump eslint-plugin-playwright from 0.8.0 to 0.12.0 (#2060)
Bumps [eslint-plugin-playwright](https://github.com/playwright-community/eslint-plugin-playwright) from 0.8.0 to 0.12.0.
- [Release notes](https://github.com/playwright-community/eslint-plugin-playwright/releases)
- [Commits](https://github.com/playwright-community/eslint-plugin-playwright/compare/v0.8.0...v0.12.0)

---
updated-dependencies:
- dependency-name: eslint-plugin-playwright
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-23 19:52:31 +08:00
dependabot[bot]
c0675e8870
chore: bump lint-staged from 10.5.4 to 13.2.2 (#2054)
Bumps [lint-staged](https://github.com/okonet/lint-staged) from 10.5.4 to 13.2.2.
- [Release notes](https://github.com/okonet/lint-staged/releases)
- [Commits](https://github.com/okonet/lint-staged/compare/v10.5.4...v13.2.2)

---
updated-dependencies:
- dependency-name: lint-staged
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Koy ['kɔɪ] <koy@ko8e24.top>
2023-05-19 16:26:03 +08:00
dependabot[bot]
8225f9c0bb
chore: bump eslint-plugin-jest from 26.9.0 to 27.2.1 (#2047)
Bumps [eslint-plugin-jest](https://github.com/jest-community/eslint-plugin-jest) from 26.9.0 to 27.2.1.
- [Release notes](https://github.com/jest-community/eslint-plugin-jest/releases)
- [Changelog](https://github.com/jest-community/eslint-plugin-jest/blob/main/CHANGELOG.md)
- [Commits](https://github.com/jest-community/eslint-plugin-jest/compare/v26.9.0...v27.2.1)

---
updated-dependencies:
- dependency-name: eslint-plugin-jest
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Koy ['kɔɪ] <koy@ko8e24.top>
2023-05-08 15:51:59 +08:00
Bálint József Jánvári
f5ad3d2711
Update marked to 4.2.12 (#1993)
* Update marked to 4.2.12


---------

Co-authored-by: Koy Zhuang <koy@ko8e24.top>
2023-04-22 18:07:21 +08:00
dependabot[bot]
c5ec51090e
chore: bump stylus from 0.54.8 to 0.59.0 (#2035)
Bumps [stylus](https://github.com/stylus/stylus) from 0.54.8 to 0.59.0.
- [Release notes](https://github.com/stylus/stylus/releases)
- [Changelog](https://github.com/stylus/stylus/blob/dev/Changelog.md)
- [Commits](https://github.com/stylus/stylus/compare/0.54.8...0.59.0)

---
updated-dependencies:
- dependency-name: stylus
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-04-19 18:00:45 +08:00
dependabot[bot]
90816c8522
chore: bump husky from 3.1.0 to 8.0.3 (#2029)
Bumps [husky](https://github.com/typicode/husky) from 3.1.0 to 8.0.3.
- [Release notes](https://github.com/typicode/husky/releases)
- [Commits](https://github.com/typicode/husky/compare/v3.1.0...v8.0.3)

---
updated-dependencies:
- dependency-name: husky
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Koy ['kɔɪ] <koy@ko8e24.top>
2023-04-18 16:19:15 +08:00
dependabot[bot]
fcc1377d44
chore: bump cross-env from 6.0.3 to 7.0.3 (#2031)
Bumps [cross-env](https://github.com/kentcdodds/cross-env) from 6.0.3 to 7.0.3.
- [Release notes](https://github.com/kentcdodds/cross-env/releases)
- [Changelog](https://github.com/kentcdodds/cross-env/blob/master/CHANGELOG.md)
- [Commits](https://github.com/kentcdodds/cross-env/compare/v6.0.3...v7.0.3)

---
updated-dependencies:
- dependency-name: cross-env
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Koy ['kɔɪ] <koy@ko8e24.top>
2023-04-18 16:15:29 +08:00
dependabot[bot]
582d81cf88
chore: bump mkdirp from 0.5.5 to 3.0.0 (#2028)
Bumps [mkdirp](https://github.com/isaacs/node-mkdirp) from 0.5.5 to 3.0.0.
- [Release notes](https://github.com/isaacs/node-mkdirp/releases)
- [Changelog](https://github.com/isaacs/node-mkdirp/blob/main/CHANGELOG.md)
- [Commits](https://github.com/isaacs/node-mkdirp/compare/v0.5.5...v3.0.0)

---
updated-dependencies:
- dependency-name: mkdirp
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Koy ['kɔɪ] <koy@ko8e24.top>
2023-04-18 15:55:09 +08:00
Anix
81fc1b7dce
fix: upgrade medium-zoom from 1.0.7 to 1.0.8 (#1939)
Snyk has created this PR to upgrade medium-zoom from 1.0.7 to 1.0.8.

See this package in npm:
https://www.npmjs.com/package/medium-zoom

See this project in Snyk:
https://app.snyk.io/org/anikethsaha/project/836f877b-b98e-47ed-89fc-554e9b2e146d?utm_source=github&utm_medium=referral&page=upgrade-pr

Co-authored-by: snyk-bot <snyk-bot@snyk.io>
2022-12-16 20:34:09 +08:00
Snyk bot
26013929cc
fix: upgrade medium-zoom from 1.0.6 to 1.0.7 (#1934)
Snyk has created this PR to upgrade medium-zoom from 1.0.6 to 1.0.7.

See this package in npm:
https://www.npmjs.com/package/medium-zoom

See this project in Snyk:
https://app.snyk.io/org/anikethsaha/project/836f877b-b98e-47ed-89fc-554e9b2e146d?utm_source=github&utm_medium=referral&page=upgrade-pr
2022-12-10 22:10:05 +08:00
Anix
959277eeb9
chore: Upgrade prismjs from 1.27.0 to 1.29.0 (#1923)
Co-authored-by: snyk-bot <snyk-bot@snyk.io>
Co-authored-by: Koy Zhuang <koy@ko8e24.top>
2022-11-14 18:54:02 +08:00
i544693
1d29eb305d chore: add changelog 4.13.0 2022-10-26 21:45:51 +08:00
i544693
dbc4b450c3 fix: upgrade dependencies. 2022-10-26 21:38:31 +08:00
i544693
73ea28df14 fix: fix test. 2022-10-26 21:27:14 +08:00
i544693
c044517caa chore: add changelog 4.12.4 2022-10-26 17:53:59 +08:00
i544693
7db2434a1a [build]: 4.12.3 2022-10-26 17:21:50 +08:00
dependabot[bot]
91272cac83
chore: bump trim-newlines and lerna (#1895)
Bumps [trim-newlines](https://github.com/sindresorhus/trim-newlines) and [lerna](https://github.com/lerna/lerna/tree/HEAD/core/lerna). These dependencies needed to be updated together.

Updates `trim-newlines` from 1.0.0 to 3.0.1
- [Release notes](https://github.com/sindresorhus/trim-newlines/releases)
- [Commits](https://github.com/sindresorhus/trim-newlines/commits)

Updates `lerna` from 3.22.1 to 5.5.1
- [Release notes](https://github.com/lerna/lerna/releases)
- [Changelog](https://github.com/lerna/lerna/blob/main/core/lerna/CHANGELOG.md)
- [Commits](https://github.com/lerna/lerna/commits/v5.5.1/core/lerna)

---
updated-dependencies:
- dependency-name: trim-newlines
  dependency-type: indirect
- dependency-name: lerna
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-10-04 15:47:37 +08:00
John Hildenbiddle
9bff31dff0
chore: Remove dompurify (#1490) 2022-03-08 07:45:23 -06:00
John Hildenbiddle
ba5ee26f00
feat: Emoji build (#1766)
* Fix incorrect file name

* Improve build

- Display emoji API URL
- Display number of emoji entries retrieved from API
- Distinguish between creating and updating files
- Catch and display errors (gracefully fail for offline work)
- Add “DO NOT EDIT” comment to generated output

* Add emoji to automated build

* Remove emoji plugin from dev index.html
2022-03-08 16:22:10 +08:00
John Hildenbiddle
35002c92b7
feat: Native emoji w/ image-based fallbacks and improved parsing (#1746)
* Render native emoji with image fallback

Fix #779

* Deprecate emoji plugin

* Add emoji tests

* Remove console.log statement

* Fix emoji image alt attribute

* Set nativeEmoji to false by default (non-breaking)

* Fix parsing emoji in HTML comments and script tags

* Add nativeEmoji and update noEmoji details

* Add Emoji plugin deprecation notice

* Fix ESLint issues

* Create build:emoji task

- Auto-generate emoji data from GitHub API
- Auto-generate emoji markdown for website
- Add emoji page to navigation

* Fix rendering of GitHub emoji without unicode

* Adjust and match size of native and image emoji

* Update emoji test snapshot

* Update docs test snapshot

* Fix ci/codesandbox error

* Update native emoji font-stack

* Fix rendering of native multi-character emoji

* Kick GitHub Workflow

* Replace rollup’s uglify plugin with terser

* Switch “npm ci” instead of “npm i” for stability

* Change emoji data from default to named export

* Revert "Replace rollup’s uglify plugin with terser"

This reverts commit 7ba85136361c72839516900d91cca806fac94fee.

* Revert "Switch “npm ci” instead of “npm i” for stability"

This reverts commit d52b476a387250740d934e8fd7df7ba274dd17a0.

* Revert "Change emoji data from default to named export"

This reverts commit 3f2dd467cf9c7a74d8c53c2ee52cc63837b00a3c.

* Specify codesandbox template and node version

* Update codesandbox config

* Revert "Revert "Replace rollup’s uglify plugin with terser""

This reverts commit e06fed49f0383c485e01f1758228849ad0085bc8.

* Revert "Revert "Revert "Replace rollup’s uglify plugin with terser"""

This reverts commit 27d49521f61976dedcbbf210e1811839853e0e47.

* Update codesandbox config

* Revert "Update codesandbox config"

This reverts commit 5120dd23d45fbd4b2c893db33acbf7014e57c023.

* Fix codesandbox uglify error

* Emoji docs tweaks

* Restore and update emoji plugin code

* Restore and update emoji plugin docs

* Prettier updates

* Match lowercase shortcodes only

Co-authored-by: Koy Zhuang <369491420@qq.com>
2022-03-05 22:25:09 -06:00
Snyk bot
2dc5b12b71
fix: package.json & package-lock.json to reduce vulnerabilities (#1756)
The following vulnerabilities are fixed with an upgrade:
- https://snyk.io/vuln/SNYK-JS-PRISMJS-2404333
2022-02-24 09:42:42 +08:00
John Hildenbiddle
c49c39a4a2
refactor: Update test environments and lint configuration (#1736)
* Update test environments and lint configuration

Update Jest (unit + integration) and Playwright (e2e) test environments. Includes stability improvements for e2e tests using newer, more stable methods per the Playwright docs.

- Update Jest 26 => 27
- Update Jest-related libs (babel parser)
- Update Playwright 1.8 => Playwright Test 1.18
- Update GitHub CI (action versions, job parallelization, and matrices)
- Update ESLint 5 => 8
- Update ESLint-related libs (parser, prettier, Jest, Playwright)
- Fix test failures on M1-based Macs
- Fix e2e stability issues by replacing PW $ method calls
- Fix ESLint errors
- Fix incorrect CI flag on Jest runs (-ci => --ci)
- Refactor e2e test runner from Jest to Playwright Test
- Refactor e2e test files for Playwright Test
- Refactor fix-lint script name to lint:fix for consistency
- Refactor npm scripts order for readability
- Remove unnecessary configs and libs
- Remove example image snapshots
2022-01-30 21:40:21 -06:00
i544693
e80238d4fc chore: add changelog 4.12.2 2022-01-06 16:55:27 +08:00
Joe Pea
c90c6a4b74
style: allow devs to test both build and tests at the same time (#1707)
The docker:rebuild script rebuilds the docker image from scratch including the Docsify build, while the new one rebuilds only Docsify code and makes local re-testing faster.
2022-01-04 15:54:37 +08:00
i544693
c454335918 update: commands. 2021-12-10 16:41:41 +08:00
i544693
a5b34c2c3f update: integration. 2021-12-10 02:12:58 +08:00
i544693
ba2127bcfa update: rebuild. 2021-12-10 02:11:12 +08:00
i544693
9200174666 update: remove user. 2021-12-10 02:09:19 +08:00
i544693
1a836c9479 test:docker locally. 2021-12-10 01:55:30 +08:00
Snyk bot
e88c2396e3
[Snyk] Upgrade dompurify from 2.3.0 to 2.3.1 (#1633)
* fix: upgrade dompurify from 2.3.0 to 2.3.1

Snyk has created this PR to upgrade dompurify from 2.3.0 to 2.3.1.

See this package in npm:
https://www.npmjs.com/package/dompurify

See this project in Snyk:
https://app.snyk.io/org/anikethsaha/project/836f877b-b98e-47ed-89fc-554e9b2e146d?utm_source=github&utm_medium=upgrade-pr

* fix: fix dependency.

* fix: fix dependency.

* Update package-lock.json

* Update package-lock.json

Co-authored-by: i544693 <369491420@qq.com>
Co-authored-by: Koy <koy@ko8e24.top>
2021-09-15 10:42:29 +08:00
Snyk bot
b07fa3cc83
fix: upgrade dompurify from 2.2.9 to 2.3.0 (#1616)
* fix: upgrade dompurify from 2.2.9 to 2.3.0

Snyk has created this PR to upgrade dompurify from 2.2.9 to 2.3.0.

See this package in npm:
https://www.npmjs.com/package/dompurify

See this project in Snyk:
https://app.snyk.io/org/anikethsaha/project/836f877b-b98e-47ed-89fc-554e9b2e146d?utm_source=github&utm_medium=upgrade-pr

* fix: missing vue.

* Update package-lock.json

* Update package-lock.json

Co-authored-by: Koy <koy@ko8e24.top>
2021-08-03 18:18:22 +08:00
Koy
baf5a8a496
fix: upgrade dompurify from 2.2.8 to 2.2.9 (#1600)
* fix: upgrade dompurify from 2.2.8 to 2.2.9

Snyk has created this PR to upgrade dompurify from 2.2.8 to 2.2.9.

See this package in npm:
https://www.npmjs.com/package/dompurify

See this project in Snyk:
https://app.snyk.io/org/anikethsaha/project/836f877b-b98e-47ed-89fc-554e9b2e146d?utm_source=github&utm_medium=upgrade-pr

* fix:fix dompurify.

Co-authored-by: snyk-bot <snyk-bot@snyk.io>
2021-06-25 16:35:11 +08:00
沈唁
0dd44cc828
fix: upgrade dompurify from 2.2.7 to 2.2.8 (#1577) 2021-05-25 09:18:53 +08:00
Snyk bot
93c48f3d61
fix: Upgrade dompurify from 2.2.6 to 2.2.7 (#1553)
* fix: upgrade dompurify from 2.2.6 to 2.2.7

Snyk has created this PR to upgrade dompurify from 2.2.6 to 2.2.7.

See this package in npm:
https://www.npmjs.com/package/dompurify

See this project in Snyk:
https://app.snyk.io/org/anikethsaha/project/836f877b-b98e-47ed-89fc-554e9b2e146d?utm_source=github&utm_medium=upgrade-pr

* fix: missing vue

Co-authored-by: sy-records <52o@qq52o.cn>
2021-04-10 13:32:30 +08:00
sy-records
cea7765901 chore: add changelog 4.12.1 2021-03-07 11:00:43 +08:00
sy-records
a2132c89ea chore: add changelog 4.12.0 2021-02-08 09:21:43 +08:00
沈唁
716a7fa777
fix: upgrade marked from 1.2.4 to 1.2.9 (#1486) 2021-02-05 10:41:08 +08:00
John Hildenbiddle
743bb64d0a chore: update playwright to 1.8.0
Required for testing on ARM-based Macs.
2021-02-04 11:11:11 -06:00
沈唁
eee9507d43
fix: upgrade dompurify from 2.2.2 to 2.2.6 (#1483) 2021-02-04 08:30:53 +08:00
Anix
5f29cde84c
fix: upgrade prismjs from 1.22.0 to 1.23.0 (#1481)
* fix: upgrade prismjs from 1.22.0 to 1.23.0

Snyk has created this PR to upgrade prismjs from 1.22.0 to 1.23.0.

See this package in npm:
https://www.npmjs.com/package/prismjs

See this project in Snyk:
https://app.snyk.io/org/anikethsaha/project/836f877b-b98e-47ed-89fc-554e9b2e146d?utm_source=github&utm_medium=upgrade-pr

* fix: vue

Co-authored-by: snyk-bot <snyk-bot@snyk.io>
Co-authored-by: sy-records <52o@qq52o.cn>
2021-01-28 17:33:22 +08:00
dependabot[bot]
e04e268a54
chore(deps-dev): bump axios from 0.20.0 to 0.21.1 (#1471)
Bumps [axios](https://github.com/axios/axios) from 0.20.0 to 0.21.1.
- [Release notes](https://github.com/axios/axios/releases)
- [Changelog](https://github.com/axios/axios/blob/v0.21.1/CHANGELOG.md)
- [Commits](https://github.com/axios/axios/compare/v0.20.0...v0.21.1)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-01-06 18:22:42 +08:00