Skip to content

Commit

Permalink
Merge branch 'develop' into PWA-3080
Browse files Browse the repository at this point in the history
  • Loading branch information
glo82145 authored May 16, 2023
2 parents 403d562 + 9f524e8 commit 35e41e2
Show file tree
Hide file tree
Showing 21 changed files with 321 additions and 129 deletions.
10 changes: 10 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"name": "PWA Studio",
"image": "mcr.microsoft.com/devcontainers/javascript-node:0-14",
"forwardPorts": [10000],
"postCreateCommand": "yarn install --frozen-lockfile && yarn build && yarn workspace @magento/venia-concept run watch",
"extensions": [
"larsroettig.vscode-pwa-studio",
"GraphQL.vscode-graphql-syntax"
]
}
163 changes: 74 additions & 89 deletions CHANGELOG.md

Large diffs are not rendered by default.

195 changes: 195 additions & 0 deletions CREATE_RELEASE_NOTES.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,195 @@
# Create release notes for PWA Studio

Here are the steps you need to follow to create PWA Studio release notes. :

**PART 1: Code repo tasks** (`magento/pwa-studio`):

1. Clone the `magento/pwa-studio` repo.
2. Create a `release-notes` branch.
3. Login to the Adobe network using VPN as necessary.
4. Run the JitNotes CLI.
5. Update the `magento-compatibility.js` file.
6. Create a PR.
7. Generate and copy the source-code docs.

**PART 2: Docs repo tasks** (`AdobeDocs/commerce-pwa-studio`):

1. Clone the `AdobeDocs/commerce-pwa-studio` repo.
2. Create a `release` branch from `main`.
3. Replace auto-generated docs.
4. Verify changes.
5. Create a PR.
6. Fix markdown linting errors.
7. Merge PR to `main`.

**PART 3: Deploy docs to production**

1. From the GitHub AdobeDocs/commerce-pwa-studio repo, access the **Deployment** workflow from the **Actions** tab.

2. Run the workflow with a production configuration.

## PART 1: Code repo tasks (`magento/pwa-studio`)

1. Clone the `magento/pwa-studio` repo:

```bash
git clone [email protected]:magento/pwa-studio.git
```

2. CD into the project and run `yarn` to install the dependencies:

```bash
cd pwa-studio
yarn
```

3. Add a new `release-notes` branch based off the `release/xx.x` branch. Example: `release-notes/13.1`.

4. Login to the Adobe network or access it using the GlobalProtect VPN.

**NOTE**: You must be logged in to the Adobe network to run the JitNotes CLI.

5. Run the [JitNotes CLI](https://github.com/AdobeDocs/jitnotes) from the `pwa-studio` root:

```bash
npx jitnotes
```

This command generates a new `CHANGELOG.md` in the project's root to replace the existing one.
6. Add relevant content to the following sections of the `CHANGELOG.md`:
- **Documentation changes**
- **Known issues**
- **Updated package dependencies** table.
**NOTE**: You may also need to add release note entries to the Jira ticket's **Release note** field if they are shown as missing in the CHANGELOG.

7. From your `magento/pwa-studio` project root, update the `magento-compatibility.js` file.

This file is used by the docs script to create the `markdown-compatibility.md` table for the PWA Studio documentation.

````diff
module.exports = {
+ '13.1.0': '2.4.6',
'13.0.0': '2.4.5',
'12.7.0': '2.4.5',
````

8. Commit and push your changes, then create a PR for approval. Example PR: https://github.com/magento/pwa-studio/pull/4080.

9. CD into the `pwa-studio/pwa-devdocs` directory and run the following command:

```bash
yarn build:docs
```

This command generates the following markdown files:

- `magento-compatibility.md`
- JSDoc source-code markdown from the following directories:

```tree
root
└── packages
├── buildpack
├── pagebuilder
├── peregrine
├── pwa-buildpack
└── venia-ui
```

10. Open the `auto-generated` directory to verify the generated files:

```tree
pwa-devdocs
└── src
└── _includes
└── auto-generated
├── pagebuilder
├── peregrine
├── pwa-buildpack
├── venia-ui
└── magento-compatibility.md
```

11. Copy the `auto-generated` directory, with all its subdirectories and files.

## PART 2: Docs repo tasks (`AdobeDocs/commerce-pwa-studio`)

1. Clone the `AdobeDocs/commerce-pwa-studio` repo:

```
git clone [email protected]:AdobeDocs/commerce-pwa-studio.git
```

2. CD into the project and run `yarn` to install the dependencies:

```bash
cd commerce-pwa-studio
yarn
```

3. Add a new `release` branch based off the `main` branch. Example: `release-13.1.0`.

4. Replace the existing `src/data/auto-generated` directory with the `auto-generated` directory you copied from the `magento/pwa-studio` output.

This replacement should result in one or more changes to existing files. Example:

```diff
7_Docs-Repos/commerce-pwa-studio [release-13.1.0●] » git status
On branch release-13.1.0
Changes to be committed:
(use "git restore --staged <file>..." to unstage)
+ modified: src/data/auto-generated/magento-compatibility.md
+ modified: src/data/auto-generated/peregrine/lib/talons/CartPage/PriceSummary/usePriceSummary.md
```

5. Run `yarn dev` to build the docs locally and verify the changed files:

- http://localhost:8000/integrations/adobe-commerce/version-compatibility/.
- http://localhost:8000/api/peregrine/talons/CartPage/PriceSummary/

6. Commit and push your release branch to the repo.

7. Create a PR to merge the source-code changes into `main`:

```markdown
## Purpose of this pull request
This pull request (PR) updates the docs based on the source-code JSDoc changes made for PWA Studio 13.1.0.
## Affected pages
- src/data/auto-generated/magento-compatibility.md
- src/data/auto-generated/peregrine/lib/talons/CartPage/PriceSummary/usePriceSummary.md
```

8. Fix all markdown linting errors.

**NOTE:** You WILL have markdown linting errors that you will need to correct. These errors are created by the auto-generated markdown from the `magento/pwa-studio` code base. If you want to fix this at the source, you can adjust the `.hbs` files here: `magento/pwa-devdocs/scripts/create-reference-docs/templates/handlebars`.

Otherwise, the linting issues you will encounter are described in the logs. Here are two examples:

- https://github.com/AdobeDocs/commerce-pwa-studio/actions/runs/4702475698/jobs/8339784257#step:6:119
- https://github.com/AdobeDocs/commerce-pwa-studio/actions/runs/4702475698/jobs/8339784257#step:6:126

![image-20230414135520471](/Users/case/Library/Application Support/typora-user-images/image-20230414135520471.png)

9. After all CI/CD tests (markdown linters, etc.) pass and your reviewers have approved, merge your PR into `main`.

## PART 3: Deploy docs to Production

After the merge tests to `main` have completed successfully, it's time to deploy the documentation changes to the public. Follow these steps.
1. Navigate to the Deployment UI on GitHub: https://github.com/AdobeDocs/commerce-pwa-studio/actions/workflows/deploy.yml
2. Click the **Run Workflow** button and configure the dialog as follows:
- Use workflow from: `Branch: main`.
- Deploy to: `prod`.
- Clean cache: `yes`.
![image-20230414141355699](/Users/case/Library/Application Support/typora-user-images/image-20230414141355699.png)
3. After Deployment is successful, check the live site to make sure the changes are displayed. It may take up to 10 minutes for Fastly to update the site after deployment.
1 change: 1 addition & 0 deletions magento-compatibility.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

// PWA Studio version -> Magento version.
module.exports = {
'13.1.0': '2.4.6',
'13.0.0': '2.4.5',
'12.7.0': '2.4.5',
'12.6.0': '2.4.5',
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@magento/pwa-studio",
"version": "13.0.0",
"version": "13.1.0",
"private": true,
"workspaces": [
"packages/babel-preset-peregrine",
Expand Down
4 changes: 2 additions & 2 deletions packages/create-pwa/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@magento/create-pwa",
"version": "2.3.4",
"version": "2.3.5",
"publishConfig": {
"access": "public"
},
Expand Down Expand Up @@ -30,7 +30,7 @@
"homepage": "https://github.com/magento/pwa-studio/tree/main/packages/create-pwa#readme",
"dependencies": {
"@magento/pwa-buildpack": "~11.4.1",
"@magento/venia-concept": "~13.0.0",
"@magento/venia-concept": "~13.1.0",
"chalk": "^2.4.2",
"change-case": "^3.1.0",
"compression": "~1.7.4",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@magento/experience-platform-connector",
"version": "1.0.3",
"version": "1.0.4",
"publishConfig": {
"access": "public"
},
Expand All @@ -18,7 +18,7 @@
"devDependencies": {},
"peerDependencies": {
"@apollo/client": "~3.5.0",
"@magento/peregrine": "~13.0.0",
"@magento/peregrine": "~13.0.1",
"@magento/pwa-buildpack": "~11.4.1",
"react": "~17.0.1"
},
Expand Down
4 changes: 2 additions & 2 deletions packages/extensions/upward-security-headers/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@magento/upward-security-headers",
"version": "1.0.12",
"version": "1.0.13",
"publishConfig": {
"access": "public"
},
Expand All @@ -14,7 +14,7 @@
"license": "(OSL-3.0 OR AFL-3.0)",
"peerDependencies": {
"@magento/pwa-buildpack": "~11.4.1",
"@magento/venia-ui": "~10.0.0",
"@magento/venia-ui": "~10.1.0",
"webpack": "~4.46.0"
},
"pwa-studio": {
Expand Down
4 changes: 2 additions & 2 deletions packages/extensions/venia-sample-eventing/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@magento/venia-sample-eventing",
"version": "0.0.4",
"version": "0.0.5",
"publishConfig": {
"access": "public"
},
Expand All @@ -12,7 +12,7 @@
"repository": "github:magento/pwa-studio",
"license": "(OSL-3.0 OR AFL-3.0)",
"peerDependencies": {
"@magento/peregrine": "~13.0.0",
"@magento/peregrine": "~13.0.1",
"@magento/pwa-buildpack": "~11.4.1",
"react": "~17.0.1"
},
Expand Down
4 changes: 2 additions & 2 deletions packages/extensions/venia-sample-language-packs/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@magento/venia-sample-language-packs",
"version": "0.0.12",
"version": "0.0.13",
"publishConfig": {
"access": "public"
},
Expand All @@ -13,7 +13,7 @@
"license": "(OSL-3.0 OR AFL-3.0)",
"peerDependencies": {
"@magento/pwa-buildpack": "~11.4.1",
"@magento/venia-ui": "~10.0.0"
"@magento/venia-ui": "~10.1.0"
},
"pwa-studio": {
"targets": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@magento/venia-sample-payments-checkmo",
"version": "0.0.10",
"version": "0.0.11",
"publishConfig": {
"access": "public"
},
Expand All @@ -12,9 +12,9 @@
"repository": "github:magento/pwa-studio",
"license": "(OSL-3.0 OR AFL-3.0)",
"peerDependencies": {
"@magento/peregrine": "~13.0.0",
"@magento/peregrine": "~13.0.1",
"@magento/pwa-buildpack": "~11.4.1",
"@magento/venia-ui": "~10.0.0",
"@magento/venia-ui": "~10.1.0",
"react": "~17.0.1",
"react-intl": "~5.20.0",
"react-router-dom": "~5.2.0"
Expand Down
10 changes: 5 additions & 5 deletions packages/pagebuilder/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@magento/pagebuilder",
"version": "8.0.0",
"version": "8.1.0",
"publishConfig": {
"access": "public"
},
Expand Down Expand Up @@ -34,9 +34,9 @@
"homepage": "https://github.com/magento/pwa-studio/tree/main/packages/pagebuilder#readme",
"dependencies": {},
"devDependencies": {
"@magento/peregrine": "~13.0.0",
"@magento/peregrine": "~13.0.1",
"@magento/pwa-buildpack": "~11.4.1",
"@magento/venia-ui": "~10.0.0",
"@magento/venia-ui": "~10.1.0",
"@storybook/react": "~6.3.7",
"jarallax": "~1.11.1",
"load-google-maps-api": "~2.0.1",
Expand All @@ -50,9 +50,9 @@
"peerDependencies": {
"@apollo/client": "~3.5.0",
"@magento/babel-preset-peregrine": "~1.2.2",
"@magento/peregrine": "~13.0.0",
"@magento/peregrine": "~13.0.1",
"@magento/pwa-buildpack": "~11.4.1",
"@magento/venia-ui": "~10.0.0",
"@magento/venia-ui": "~10.1.0",
"jarallax": "~1.11.1",
"load-google-maps-api": "~2.0.1",
"lodash.escape": "~4.0.1",
Expand Down
2 changes: 1 addition & 1 deletion packages/peregrine/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@magento/peregrine",
"version": "13.0.0",
"version": "13.0.1",
"publishConfig": {
"access": "public"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/pwa-buildpack/envVarDefinitions.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
{
"name": "MAGENTO_BACKEND_URL",
"type": "url",
"desc": "Connect to an instance of Magento 2.3 by specifying its public domain name.",
"desc": "Connect to an instance of Magento by specifying its public domain name.",
"example": "https://master-7rqtwti-mfwmkrjfqvbjk.us-4.magentosite.cloud/"
}
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ exports[`returns valid dotenv file if env is valid 1`] = `
#### Connecting to a Magento store #############################################
#
# Connect to an instance of Magento 2.3 by specifying its public domain name.
# Connect to an instance of Magento by specifying its public domain name.
MAGENTO_BACKEND_URL=https://master-7rqtwti-mfwmkrjfqvbjk.us-4.magentosite.cloud/
#
################################################################################
Expand Down
Loading

0 comments on commit 35e41e2

Please sign in to comment.