@tryghost/portal 2.37.8 → 2.37.10

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/README.md CHANGED
@@ -26,45 +26,49 @@ The script also adds custom class names to this element for open and close state
26
26
 
27
27
  Refer the [docs](https://ghost.org/help/setup-members/#customize-portal-settings) to read about ways in which Portal can be customized for your site.
28
28
 
29
- ## Basic Setup
29
+ ## Develop
30
30
 
31
- This section is mostly relevant for core team only for active Portal development. Always use the unpkg link for testing/using latest released portal script.
32
-
33
- - Run `yarn start:dev` to start Portal in development mode
34
- - Open [http://localhost:3000](http://localhost:3000) to view it in the browser.
35
- - To use the local Portal script in a local Ghost site
36
- - Update `config.local.json` in Ghost repo to add "portal" config pointing to local dev server url as instructed on terminal.
37
- - By default, this uses port `5368` for loading local Portal script on Ghost site. It's also possible to specify a custom port when running the script using - `--port=xxxx`.
31
+ Run Portal within the Ghost monorepo with:
32
+ ```
33
+ yarn dev --portal
34
+ ```
38
35
 
39
- ## Available Scripts
36
+ Alternatively, use `yarn dev --all` to load Portal and other supported apps/services, see [dev.js](https://github.com/TryGhost/Ghost/blob/main/.github/scripts/dev.js) for more information.
40
37
 
41
- In the project directory, you can also run:
38
+ ---
42
39
 
43
- ### `yarn start`
40
+ To run Portal in a standalone fashion, use `yarn start` and open [http://localhost:3000](http://localhost:3000).
44
41
 
45
- Runs the app in the development mode.<br />
46
- Open [http://localhost:3000](http://localhost:3000) to view it in the browser.
42
+ ## Build
47
43
 
48
- The page will reload if you make edits.<br />
49
- You will also see any lint errors in the console.
44
+ To create a production minified bundle in `umd/portal.min.js`:
45
+ ```
46
+ yarn build
47
+ ```
50
48
 
51
- Start the portal server when developing Ghost by running Ghost (in root folder) via `yarn dev --all` or `yarn dev --portal`. This will host the portal JavaScript files, and makes sure that Ghost uses these locally hosted assets instead of the ones from the CDN.
49
+ ## Test
52
50
 
53
- ### `yarn build`
51
+ To run tests in watch mode:
52
+ ```
53
+ yarn test
54
+ ```
54
55
 
55
- Creates the production single minified bundle for external use in `umd/portal.min.js`. <br />
56
+ ## Release
56
57
 
57
- ### `yarn test`
58
+ A patch release can be rolled out instantly in production, whereas a minor/major release requires the Ghost monorepo to be updated and released. In either case, you need sufficient permissions to release `@tryghost` packages on NPM.
58
59
 
59
- Launches the test runner in the interactive watch mode.<br />
60
+ ### Patch release
60
61
 
61
- ## Publish
62
+ 1. Run `yarn ship` and select a patch version when prompted
63
+ 2. (Optional) Clear JsDelivr cache to get the new version out instantly ([docs](https://www.notion.so/ghost/How-to-clear-jsDelivr-CDN-cache-2930bdbac02946eca07ac23ab3199bfa?pvs=4)). Typically, you'll need to open `https://purge.jsdelivr.net/ghost/portal@~${PORTAL_VERSION}/umd/portal.min.js` and
64
+ `https://purge.jsdelivr.net/ghost/portal@~${PORTAL_VERSION}/umd/main.css` in your browser, where `PORTAL_VERSION` is the latest minor version in `ghost/core/core/shared/config/defaults.json` ([code](https://github.com/TryGhost/Ghost/blob/0aef3d3beeebcd79a4bfd3ad27e0ac67554b5744/ghost/core/core/shared/config/defaults.json#L185))
62
65
 
63
- Run `yarn ship` to publish new version of script.
66
+ ### Minor / major release
64
67
 
65
- `yarn ship` is an alias for `npm publish`
68
+ 1. Run `yarn ship` and select a minor or major version when prompted
69
+ 2. Update the Portal version in `ghost/core/core/shared/config/defaults.json` to the new minor or major version ([code](https://github.com/TryGhost/Ghost/blob/0aef3d3beeebcd79a4bfd3ad27e0ac67554b5744/ghost/core/core/shared/config/defaults.json#L198))
70
+ 3. Wait until a new version of Ghost is released
66
71
 
67
- - Builds the script with latest code using `yarn build` (prePublish)
68
- - Publishes package on npm as `@tryghost/portal` and creates an unpkg link for script at https://unpkg.com/@tryghost/portal@VERSION
72
+ # Copyright & License
69
73
 
70
- (Core team only)
74
+ Copyright (c) 2013-2024 Ghost Foundation - Released under the [MIT license](LICENSE).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tryghost/portal",
3
- "version": "2.37.8",
3
+ "version": "2.37.10",
4
4
  "license": "MIT",
5
5
  "repository": {
6
6
  "type": "git",
@@ -79,8 +79,8 @@
79
79
  },
80
80
  "devDependencies": {
81
81
  "@babel/eslint-parser": "7.23.3",
82
- "@doist/react-interpolate": "1.0.0",
83
- "@sentry/react": "7.116.0",
82
+ "@doist/react-interpolate": "1.1.1",
83
+ "@sentry/react": "7.118.0",
84
84
  "@sentry/tracing": "7.114.0",
85
85
  "@testing-library/jest-dom": "5.17.0",
86
86
  "@testing-library/react": "12.1.5",