@tryghost/comments-ui 0.12.4 → 0.13.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2013-2022 Ghost Foundation
3
+ Copyright (c) 2013-2023 Ghost Foundation
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
package/README.md CHANGED
@@ -1,79 +1,17 @@
1
- # Comments Ui
1
+ # Comments UI
2
2
 
3
- # Getting Started with Create React App
3
+ Comments widget that is embedded at the bottom of posts in Ghost.
4
4
 
5
- This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app).
5
+ ## Development
6
6
 
7
- ## Basic Setup
7
+ ### Pre-requisites
8
8
 
9
- This section is mostly relevant for core team only for active Comments development.
9
+ - Run `yarn` in Ghost monorepo root
10
10
 
11
- - Run `yarn start:dev` to start Comments in development mode
12
- - Open [http://localhost:3000](http://localhost:3000) to view it in the browser.
13
- - To use the local Comments script in a local Ghost site
14
- - Update `config.local.json` in Ghost repo to add "comments" config pointing to local dev server url as instructed on terminal.
15
- - By default, this uses port `5368` for loading local Comments script on Ghost site. It's also possible to specify a custom port when running the script using - `--port=xxxx`.
16
-
17
- ## Available Scripts
18
-
19
- In the project directory, you can run:
20
-
21
- ### `yarn test`
22
-
23
- Launches the test runner in the interactive watch mode.\
24
- See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information.
25
-
26
- ### `yarn build`
27
-
28
- Builds the app for production to the `build` folder.\
29
- It correctly bundles React in production mode and optimizes the build for the best performance.
30
-
31
- The build is minified and the filenames include the hashes.\
32
- Your app is ready to be deployed!
33
-
34
- See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information.
35
-
36
- ### `yarn eject`
37
-
38
- **Note: this is a one-way operation. Once you `eject`, you can't go back!**
39
-
40
- If you aren't satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project.
41
-
42
- Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you're on your own.
43
-
44
- You don't have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn't feel obligated to use this feature. However we understand that this tool wouldn't be useful if you couldn't customize it when you are ready for it.
45
-
46
- ## Learn More
47
-
48
- You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started).
49
-
50
- To learn React, check out the [React documentation](https://reactjs.org/).
51
-
52
- ### Code Splitting
53
-
54
- This section has moved here: [https://facebook.github.io/create-react-app/docs/code-splitting](https://facebook.github.io/create-react-app/docs/code-splitting)
55
-
56
- ### Analyzing the Bundle Size
57
-
58
- This section has moved here: [https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size](https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size)
59
-
60
- ### Making a Progressive Web App
61
-
62
- This section has moved here: [https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app](https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app)
63
-
64
- ### Advanced Configuration
65
-
66
- This section has moved here: [https://facebook.github.io/create-react-app/docs/advanced-configuration](https://facebook.github.io/create-react-app/docs/advanced-configuration)
67
-
68
- ### Deployment
69
-
70
- This section has moved here: [https://facebook.github.io/create-react-app/docs/deployment](https://facebook.github.io/create-react-app/docs/deployment)
71
-
72
- ### `yarn build` fails to minify
73
-
74
- This section has moved here: [https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify](https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify)
11
+ ### Running via Ghost `yarn dev` in root folder
75
12
 
13
+ You can automatically start the comments dev server when developing Ghost by running Ghost (in root folder) via `yarn dev --all` or `yarn dev --comments`. This will host the comments JavaScript files, and makes sure that Ghost uses these locally hosted assets instead of the ones from the CDN.
76
14
 
77
15
  # Copyright & License
78
16
 
79
- Copyright (c) 2013-2022 Ghost Foundation - Released under the [MIT license](LICENSE).
17
+ Copyright (c) 2013-2023 Ghost Foundation - Released under the [MIT license](LICENSE).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tryghost/comments-ui",
3
- "version": "0.12.4",
3
+ "version": "0.13.0",
4
4
  "license": "MIT",
5
5
  "repository": "git@github.com:TryGhost/comments-ui.git",
6
6
  "author": "Ghost Foundation",
@@ -14,43 +14,21 @@
14
14
  "access": "public",
15
15
  "registry": "https://registry.npmjs.org/"
16
16
  },
17
- "dependencies": {
18
- "@headlessui/react": "^1.6.6",
19
- "@sentry/react": "^7.5.0",
20
- "@tiptap/core": "^2.0.0-beta.182",
21
- "@tiptap/extension-blockquote": "^2.0.0-beta.29",
22
- "@tiptap/extension-document": "^2.0.0-beta.17",
23
- "@tiptap/extension-hard-break": "^2.0.0-beta.33",
24
- "@tiptap/extension-link": "^2.0.0-beta.43",
25
- "@tiptap/extension-paragraph": "^2.0.0-beta.26",
26
- "@tiptap/extension-placeholder": "^2.0.0-beta.53",
27
- "@tiptap/extension-text": "^2.0.0-beta.17",
28
- "@tiptap/react": "^2.0.0-beta.114",
29
- "react": "17.0.2",
30
- "react-dom": "17.0.2",
31
- "react-scripts": "4.0.3"
32
- },
33
17
  "scripts": {
34
- "start": "PORT=4000 BROWSER=none react-scripts start",
35
- "start:combined": "PORT=4000 BROWSER=none node ./scripts/start-combined.js",
36
- "start:dev": "NODE_OPTIONS=--openssl-legacy-provider PORT=4000 node ./scripts/start-mode.js",
37
- "dev": "node ./scripts/dev-mode.js",
38
- "build": "NODE_OPTIONS=--openssl-legacy-provider npm run build:combined",
39
- "build:original": "react-scripts build",
40
- "build:combined": "node ./scripts/build-combined.js",
41
- "build:bundle": "webpack --config webpack.config.js",
42
- "test:ui": "react-scripts test",
43
- "test": "yarn test:ui --watchAll=false --coverage",
44
- "eject": "react-scripts eject",
45
- "lint": "eslint src --ext .js --cache",
18
+ "dev": "concurrently \"yarn preview --host -l silent\" \"yarn build:watch\"",
19
+ "dev:test": "vite build && vite preview --port 7175",
20
+ "build": "vite build",
21
+ "build:watch": "vite build --watch",
22
+ "preview": "vite preview",
23
+ "test": "vitest run --coverage && yarn test:e2e",
24
+ "test:e2e": "NODE_OPTIONS='--experimental-specifier-resolution=node --no-warnings' VITE_TEST=true playwright test",
25
+ "test:slowmo": "TIMEOUT=100000 PLAYWRIGHT_SLOWMO=1000 yarn test:e2e --headed",
26
+ "test:e2e:full": "ALL_BROWSERS=1 yarn test:e2e",
27
+ "lint": "eslint src --ext .js,.ts,.jsx,.tsx --cache",
46
28
  "preship": "yarn lint",
47
- "ship": "STATUS=$(git status --porcelain); echo $STATUS; if [ -z \"$STATUS\" ]; then yarn publish && git push ${GHOST_UPSTREAM:-upstream} main --follow-tags; fi",
48
- "posttest": "yarn lint",
49
- "analyze": "source-map-explorer 'umd/*.js'",
50
- "prepublishOnly": "yarn build",
51
- "tailwind": "npx tailwindcss -i ./src/index.css -o ./public/main.css --watch --minify",
52
- "cypress:open": "cypress open",
53
- "cypress": "cypress run"
29
+ "ship": "STATUS=$(git status --porcelain); echo $STATUS; if [ -z \"$STATUS\" ]; then yarn version; fi",
30
+ "postship": "git push ${GHOST_UPSTREAM:-origin} --follow-tags && npm publish",
31
+ "prepublishOnly": "yarn build"
54
32
  },
55
33
  "browserslist": {
56
34
  "production": [
@@ -64,31 +42,43 @@
64
42
  "last 1 safari version"
65
43
  ]
66
44
  },
67
- "devDependencies": {
68
- "@testing-library/jest-dom": "5.16.2",
69
- "@testing-library/react": "12.1.2",
70
- "@testing-library/user-event": "^14.4.3",
71
- "autoprefixer": "^10.4.7",
72
- "bson-objectid": "^2.0.3",
73
- "chalk": "4.1.2",
74
- "chokidar": "3.5.2",
75
- "copy-webpack-plugin": "6.4.1",
76
- "cypress": "^10.7.0",
77
- "eslint-config-react-app": "^7.0.1",
78
- "eslint-plugin-cypress": "^2.12.1",
79
- "eslint-plugin-ghost": "2.12.0",
80
- "eslint-plugin-tailwindcss": "^3.6.0",
81
- "minimist": "1.2.5",
82
- "ora": "5.4.1",
83
- "postcss": "^8.4.14",
84
- "rewire": "6.0.0",
85
- "serve-handler": "6.1.3",
86
- "source-map-explorer": "2.5.2",
87
- "tailwindcss": "^3.1.4",
88
- "webpack-cli": "3.3.12"
45
+ "dependencies": {
46
+ "@headlessui/react": "1.7.15",
47
+ "@tiptap/core": "2.0.4",
48
+ "@tiptap/extension-blockquote": "2.0.4",
49
+ "@tiptap/extension-document": "2.0.4",
50
+ "@tiptap/extension-hard-break": "2.0.4",
51
+ "@tiptap/extension-link": "2.0.4",
52
+ "@tiptap/extension-paragraph": "2.0.4",
53
+ "@tiptap/extension-placeholder": "2.0.4",
54
+ "@tiptap/extension-text": "2.0.4",
55
+ "@tiptap/pm": "2.0.4",
56
+ "@tiptap/react": "2.0.4",
57
+ "react": "17.0.2",
58
+ "react-dom": "17.0.2",
59
+ "react-string-replace": "1.1.1"
89
60
  },
90
- "resolutions": {
91
- "//": "See https://github.com/facebook/create-react-app/issues/11773",
92
- "react-error-overlay": "6.0.9"
61
+ "devDependencies": {
62
+ "@playwright/test": "1.37.0",
63
+ "@testing-library/jest-dom": "5.16.5",
64
+ "@testing-library/react": "12.1.5",
65
+ "@testing-library/user-event": "14.4.3",
66
+ "@tryghost/i18n": "0.0.0",
67
+ "@vitejs/plugin-react": "4.0.4",
68
+ "@vitest/coverage-v8": "0.33.0",
69
+ "autoprefixer": "10.4.15",
70
+ "bson-objectid": "2.0.4",
71
+ "concurrently": "8.2.1",
72
+ "eslint-plugin-i18next": "6.0.3",
73
+ "eslint-plugin-react-hooks": "4.6.0",
74
+ "eslint-plugin-react-refresh": "0.4.3",
75
+ "eslint-plugin-tailwindcss": "3.13.0",
76
+ "jsdom": "22.1.0",
77
+ "postcss": "8.4.28",
78
+ "tailwindcss": "3.3.3",
79
+ "vite": "4.4.9",
80
+ "vite-plugin-css-injected-by-js": "3.3.0",
81
+ "vite-plugin-svgr": "3.2.0",
82
+ "vitest": "0.34.2"
93
83
  }
94
84
  }