Skip to content

Commit

Permalink
Rewrites docusaurus plugin (V3) (supersede #565) (#577)
Browse files Browse the repository at this point in the history
  • Loading branch information
micheleriva authored Dec 13, 2023
1 parent 091b3ca commit 9418fa6
Show file tree
Hide file tree
Showing 96 changed files with 3,313 additions and 4,035 deletions.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
"version": "2.0.0-beta.9",
"description": "Next generation full-text and vector search engine, written in TypeScript",
"workspaces": [
"packages/*"
"packages/*",
"sandboxes/*"
],
"scripts": {
"build": "turbo build",
Expand Down
1 change: 1 addition & 0 deletions packages/plugin-data-persistence/test/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -521,6 +521,7 @@ t.test('dpack persistence', (t) => {
})

t.test('should persist data in-memory', async (t) => {
t.plan(4)
const db = await generateTestDBInstance()

const q1 = await search(db, {
Expand Down
6 changes: 0 additions & 6 deletions packages/plugin-docusaurus-v3/.editorconfig

This file was deleted.

45 changes: 0 additions & 45 deletions packages/plugin-docusaurus-v3/.eslintrc.cjs

This file was deleted.

59 changes: 0 additions & 59 deletions packages/plugin-docusaurus-v3/.swcrc

This file was deleted.

19 changes: 0 additions & 19 deletions packages/plugin-docusaurus-v3/CONTRIBUTING.md

This file was deleted.

13 changes: 0 additions & 13 deletions packages/plugin-docusaurus-v3/LICENSE.md

This file was deleted.

31 changes: 0 additions & 31 deletions packages/plugin-docusaurus-v3/README.md

This file was deleted.

90 changes: 18 additions & 72 deletions packages/plugin-docusaurus-v3/package.json
Original file line number Diff line number Diff line change
@@ -1,100 +1,46 @@
{
"name": "@orama/plugin-docusaurus-v3",
"version": "2.0.0-beta.9",
"description": "Docusaurus v3 plugin for local search powered by orama",
"description": "Docusaurus plugin for local search powered by orama",
"keywords": [
"orama",
"docusaurus"
],
"license": "Apache-2.0",
"bugs": {
"url": "https://github.com/orama/plugin-docusaurus/issues"
"url": "https://github.com/orama/orama/issues"
},
"homepage": "https://github.com/orama/plugin-docusaurus#readme",
"homepage": "https://docs.oramasearch.com/open-source/plugins/plugin-docusaurus.html",
"repository": {
"type": "git",
"url": "git+https://github.com/orama/plugin-docusaurus.git"
"url": "git+https://github.com/orama/orama.git"
},
"type": "module",
"sideEffects": false,
"exports": {
".": {
"types": "./dist/server/index.d.ts",
"import": "./dist/server/index.js",
"require": "./dist/server/commonjs.cjs"
},
"./types": {
"types": "./dist/server/types.d.ts",
"import": "./dist/server/types.js",
"require": "./dist/server/types.cjs"
}
},
"types": "./dist/server/index.d.ts",
"files": [
"dist"
],
"scripts": {
"dev": "swc --delete-dir-on-start -s -w --extensions .ts,.tsx,.cts -d dist src",
"prebuild": "npm run lint",
"build": "swc --delete-dir-on-start --extensions .ts,.tsx,.cts -d dist src",
"postbuild": "sh scripts/postbuild.sh",
"pretest": "node ../../scripts/test-pack.mjs plugin-docusaurus",
"test": "node --loader=tsx --no-warnings=loader --test ./test/integration.ts | tap-mocha-reporter spec",
"format": "prettier -w src",
"lint": "eslint src --ext .js,.ts,.tsx,.cts",
"changelog": "auto-changelog -p"
},
"main": "src/server/index.js",
"scripts": {},
"dependencies": {
"@algolia/autocomplete-js": "^1.7.2",
"@algolia/autocomplete-theme-classic": "^1.7.3",
"@docusaurus/theme-common": "^3.0.0",
"@docusaurus/plugin-content-docs": "^3.0.1",
"@docusaurus/theme-common": "^3.0.1",
"@orama/highlight": "^0.1.2",
"@orama/orama": "^2.0.0-beta.6",
"@orama/plugin-parsedoc": "^2.0.0-beta.6",
"@orama/orama": "workspace:*",
"@orama/plugin-parsedoc": "workspace:*",
"@orama/searchbox": "1.0.0-beta.11",
"github-slugger": "^2.0.0",
"gray-matter": "^4.0.3",
"jsdom": "^23.0.1",
"markdown-it": "^13.0.2",
"pako": "^2.1.0",
"vfile-message": "^3.1.3"
"vfile-message": "^3.1.4"
},
"devDependencies": {
"@commitlint/cli": "^17.4.0",
"@commitlint/config-conventional": "^17.4.0",
"@docusaurus/module-type-aliases": "^3.0.0",
"@docusaurus/types": "^3.0.0",
"@swc/cli": "^0.1.59",
"@swc/core": "^1.3.27",
"@types/node": "^18.11.17",
"@types/pako": "^2.0.0",
"@types/react": "^18.0.26",
"@types/react-dom": "^18.0.9",
"@typescript-eslint/eslint-plugin": "^6.4.1",
"@typescript-eslint/parser": "^6.4.1",
"eslint": "^8.48.0",
"eslint-config-react": "^1.1.7",
"eslint-config-react-app": "^7.0.1",
"eslint-config-standard": "^17.0.0",
"eslint-config-standard-with-typescript": "^39.0.0",
"eslint-plugin-import": "^2.28.1",
"eslint-plugin-n": "^16.0.2",
"eslint-plugin-promise": "^6.1.1",
"eslint-plugin-react": "^7.33.2",
"husky": "^8.0.3",
"lint-staged": "^13.1.0",
"prettier": "^2.8.1",
"react": "^18.0.0",
"react-dom": "^18.0.0",
"tap-mocha-reporter": "^5.0.3",
"tsx": "^3.12.2",
"typescript": "^5.0.0",
"webpack": "^5.75.0"
"react": "^18.2.0",
"react-dom": "^18.2.0"
},
"peerDependencies": {
"react": "^18.0.0",
"react-dom": "^18.0.0"
},
"publishConfig": {
"access": "public"
},
"lint-staged": {
"*.{ts, tsx}": "eslint ./src --cache --fix"
}
}
}
8 changes: 0 additions & 8 deletions packages/plugin-docusaurus-v3/prettier.config.cjs

This file was deleted.

6 changes: 1 addition & 5 deletions packages/plugin-docusaurus-v3/scripts/postbuild.sh
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,4 @@ tsc --module CommonJS --outDir dist/server/cjs/ src/server/types.ts

mv dist/server/commonjs.js dist/server/commonjs.cjs
mv dist/server/commonjs.js.map dist/server/commonjs.cjs.map
mv dist/server/cjs/types.js dist/server/types.cjs && rm -r dist/server/cjs

cp -a src/translationMessages dist/translationMessages
cp src/client/theme/SearchBar/*.css dist/client/theme/SearchBar
cp src/client/theme/SearchBarFooter/*.css dist/client/theme/SearchBarFooter
mv dist/server/cjs/types.js dist/server/types.cjs && rm -r dist/server/cjs
Loading

0 comments on commit 9418fa6

Please sign in to comment.