Skip to content

Commit

Permalink
Merge branch 'develop' into magento#3038-react-hooks
Browse files Browse the repository at this point in the history
  • Loading branch information
sta1r authored Mar 3, 2021
2 parents 037bf1b + b414cd0 commit 2f9b7e2
Show file tree
Hide file tree
Showing 169 changed files with 5,856 additions and 1,532 deletions.
331 changes: 20 additions & 311 deletions CHANGELOG.md

Large diffs are not rendered by default.

51 changes: 24 additions & 27 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,36 +81,33 @@ The following members are the community maintainers for this project:
### Top Community Contributors

The PWA Studio project welcomes all codebase and documentation contributions.
We would like to recognize the following community members for their efforts on improving the PWA Studio project in 2020.

| Author | Commits | Added Lines | Removed Lines | Avg. Files |
| -------------------- | ------- | ----------- | ------------- | ---------- |
| Lars Roettig | 17 | 1430 | 1101 | 5.824 |
| Ross McHugh | 12 | 1089 | 11 | 2 |
| Lucas Calazans | 5 | 378 | 194 | 3.2 |
| Luke Denton | 5 | 85 | 39 | 1.4 |
| Jordan Eisenburger | 4 | 334 | 39 | 3 |
| Kristof, Fooman | 4 | 103 | 74 | 3 |
| Adam | 3 | 328 | 16 | 2.667 |
| Harald Deiser | 3 | 150 | 123 | 12.667 |
| Brendan Falkowski | 2 | 1168 | 416 | 12.5 |
| Huy Kon | 2 | 991 | 39 | 10 |
| Miguel Balparda | 2 | 8 | 6 | 1 |
| Shikha Mishra | 2 | 16 | 12 | 2 |
| christopher daniel | 2 | 163 | 106 | 6.5 |
| sivakumarkoduru | 2 | 7 | 4 | 1.5 |
| Alexander Taranovsky | 1 | 4 | 1 | 2 |
| Andrii Beziazychnyi | 1 | 4 | 0 | 1 |
| Cody Nguyễn | 1 | 1 | 1 | 1 |
| Davide | 1 | 9 | 7 | 1 |
| Dominic Fernando | 1 | 0 | 1 | 1 |
| Evan Burrell | 1 | 92 | 29 | 11 |

<small>_Last Updated: September 3, 2020_</small>
We would like to recognize the following community members for their efforts on improving the PWA Studio project in our latest release.

| Author | Commits | Added Lines | Removed Lines | Avg. Files |
| ------------------- | ------- | ----------- | ------------- | ---------- |
| Huy Kon | 11 | 2939 | 848 | 9.091 |
| Brendan Falkowski | 2 | 3 | 13 | 1 |
| Abrar Pathan | 1 | 7 | 0 | 1 |
| Adam | 1 | 12 | 6 | 3 |
| Ankur Raiyani | 1 | 89 | 30 | 5 |
| Hiren Patel | 1 | 1 | 1 | 1 |
| James Murphy | 1 | 53 | 0 | 1 |
| Jon Vaughan | 1 | 1 | 1 | 1 |
| Kristof, Fooman | 1 | 4 | 4 | 3 |
| Lars Roettig | 1 | 211 | 16 | 7 |
| Marcin Kwiatkowski | 1 | 985 | 689 | 17 |
| Max Chadwick | 1 | 3 | 1 | 1 |
| Papilion Dániel | 1 | 68 | 2 | 2 |
| Sathiya Prakash | 1 | 2 | 2 | 1 |
| Sergey Kolodyazhnyy | 1 | 4 | 1 | 2 |
| Shankar Konar | 1 | 6 | 0 | 2 |
| Treiberg, Artur | 1 | 202 | 79 | 25 |

<small>_Last Updated: January 11, 2021_</small>

**Source:** [statistic.magento.engineering][]

[statistic.magento.engineering]: <https://statistic.magento.engineering/app/kibana#/dashboard/fe6a4960-8adf-11ea-b035-e1712195ddd1?_g=(refreshInterval:(pause:!t,value:0),time:(from:now%2Fy,mode:quick,to:now))&_a=(description:'Custom%20Overview%20Panel%20by%20Magento',filters:!(('$state':(store:appState),meta:(alias:'Empty%20Commits',disabled:!f,index:git,key:files,negate:!t,params:(query:'0',type:phrase),type:phrase,value:'0'),query:(match:(files:(query:'0',type:phrase)))),('$state':(store:appState),meta:(alias:Bots,disabled:!f,index:github_issues,key:author_bot,negate:!t,params:(query:!t,type:phrase),type:phrase,value:true),query:(match:(author_bot:(query:!t,type:phrase)))),('$state':(store:appState),meta:(alias:!n,disabled:!f,index:git,key:author_name,negate:!t,params:!('Revanth%20Kumar%20Annavarapu','Revanth%20Kumar',Devagouda,dependabot%5Bbot%5D),type:phrases,value:'Revanth%20Kumar%20Annavarapu,%20Revanth%20Kumar,%20Devagouda,%20dependabot%5Bbot%5D'),query:(bool:(minimum_should_match:1,should:!((match_phrase:(author_name:'Revanth%20Kumar%20Annavarapu')),(match_phrase:(author_name:'Revanth%20Kumar')),(match_phrase:(author_name:Devagouda)),(match_phrase:(author_name:dependabot%5Bbot%5D)))))),('$state':(store:appState),meta:(alias:!n,disabled:!f,index:git,key:author_org_name,negate:!t,params:(query:Employee,type:phrase),type:phrase,value:Employee),query:(match:(author_org_name:(query:Employee,type:phrase))))),fullScreenMode:!f,options:(darkTheme:!f,useMargins:!t),panels:!((embeddableConfig:(title:Commits,vis:(legendOpen:!f)),gridData:(h:8,i:'2',w:16,x:0,y:36),id:git_evolution_commits,panelIndex:'2',title:'Git%20Commits',type:visualization,version:'6.8.6'),(embeddableConfig:(title:'Github%20Issues'),gridData:(h:8,i:'31',w:24,x:0,y:28),id:github_issues_main_metrics,panelIndex:'31',title:'Github%20Issues',type:visualization,version:'6.8.6'),(embeddableConfig:(title:'GitHub%20Issues',vis:(legendOpen:!f)),gridData:(h:8,i:'32',w:24,x:0,y:20),id:github_issues_evolutionary,panelIndex:'32',title:'GitHub%20Issues',type:visualization,version:'6.8.6'),(embeddableConfig:(title:'GitHub%20Issues%20Submitters'),gridData:(h:8,i:'33',w:16,x:32,y:36),id:github_issues_evolutionary_submitters,panelIndex:'33',title:'GitHub%20Issues%20Submitters',type:visualization,version:'6.8.6'),(embeddableConfig:(title:'GitHub%20Pull%20Requests'),gridData:(h:8,i:'34',w:24,x:24,y:28),id:github_pullrequests_main_metrics,panelIndex:'34',title:'GitHub%20Pull%20Requests',type:visualization,version:'6.8.6'),(embeddableConfig:(title:'Pull%20Requests',vis:(legendOpen:!f)),gridData:(h:8,i:'35',w:24,x:24,y:20),id:github_pullrequests_pullrequests,panelIndex:'35',title:'GitHub%20Pull%20Requests',type:visualization,version:'6.8.6'),(embeddableConfig:(title:'Pull%20Request%20Submitters',vis:(legendOpen:!f)),gridData:(h:8,i:'36',w:16,x:16,y:36),id:github_pullrequests_submitters_evolutionary,panelIndex:'36',title:'GitHub%20Pull%20Request%20Submitters',type:visualization,version:'6.8.6'),(embeddableConfig:(title:'Git%20Top%20Authors',vis:(params:(config:(searchKeyword:''),sort:(columnIndex:!n,direction:!n)))),gridData:(h:20,i:'111',w:24,x:0,y:0),id:git_overview_top_authors,panelIndex:'111',title:'Top%20Code%20Contributors',type:visualization,version:'6.8.6'),(embeddableConfig:(title:'-',vis:(params:(config:(searchKeyword:''),sort:(columnIndex:1,direction:desc)))),gridData:(h:20,i:'114',w:24,x:24,y:0),id:f747c010-9041-11ea-b035-e1712195ddd1,panelIndex:'114',title:'Magento%20Projects',type:visualization,version:'6.8.6')),query:(language:lucene,query:'*pwa-studio'),timeRestore:!f,title:Overview,viewMode:view)>
[statistic.magento.engineering]: <https://statistic.magento.engineering/app/kibana#/dashboard/fe6a4960-8adf-11ea-b035-e1712195ddd1?_g=(filters:!(),refreshInterval:(pause:!t,value:0),time:(from:'2020-09-15T05:00:00.000Z',mode:absolute,to:'2021-01-06T05:59:59.999Z'))&_a=(description:'Custom%20Overview%20Panel%20by%20Magento',filters:!(('$state':(store:appState),meta:(alias:'Empty%20Commits',disabled:!f,index:git,key:files,negate:!t,params:(query:'0',type:phrase),type:phrase,value:'0'),query:(match:(files:(query:'0',type:phrase)))),('$state':(store:appState),meta:(alias:Bots,disabled:!f,index:github_issues,key:author_bot,negate:!t,params:(query:!t,type:phrase),type:phrase,value:true),query:(match:(author_bot:(query:!t,type:phrase)))),('$state':(store:appState),meta:(alias:!n,disabled:!f,index:'0211efb0-14ca-11e9-8aac-ef7fd4d8cbad',key:Author_domain,negate:!t,params:!(magento.com,adobe.com),type:phrases,value:'magento.com,%20adobe.com'),query:(bool:(minimum_should_match:1,should:!((match_phrase:(Author_domain:magento.com)),(match_phrase:(Author_domain:adobe.com)))))),('$state':(store:appState),meta:(alias:!n,disabled:!f,index:git,key:author_name,negate:!t,params:!('Revanth%20Kumar%20Annavarapu','Revanth%20Kumar',Devagouda,dependabot%5Bbot%5D,jimbo,'Tommy%20Wiebell','Stephen%20Rugh','Anthoula%20Wojczak','James%20Calcaben','Andy%20Terranova'),type:phrases,value:'Revanth%20Kumar%20Annavarapu,%20Revanth%20Kumar,%20Devagouda,%20dependabot%5Bbot%5D,%20jimbo,%20Tommy%20Wiebell,%20Stephen%20Rugh,%20Anthoula%20Wojczak,%20James%20Calcaben,%20Andy%20Terranova'),query:(bool:(minimum_should_match:1,should:!((match_phrase:(author_name:'Revanth%20Kumar%20Annavarapu')),(match_phrase:(author_name:'Revanth%20Kumar')),(match_phrase:(author_name:Devagouda)),(match_phrase:(author_name:dependabot%5Bbot%5D)),(match_phrase:(author_name:jimbo)),(match_phrase:(author_name:'Tommy%20Wiebell')),(match_phrase:(author_name:'Stephen%20Rugh')),(match_phrase:(author_name:'Anthoula%20Wojczak')),(match_phrase:(author_name:'James%20Calcaben')),(match_phrase:(author_name:'Andy%20Terranova'))))))),fullScreenMode:!f,options:(darkTheme:!f,useMargins:!t),panels:!((embeddableConfig:(title:Commits,vis:(legendOpen:!f)),gridData:(h:8,i:'2',w:16,x:0,y:36),id:git_evolution_commits,panelIndex:'2',title:'Git%20Commits',type:visualization,version:'6.8.6'),(embeddableConfig:(title:'Github%20Issues'),gridData:(h:8,i:'31',w:24,x:0,y:28),id:github_issues_main_metrics,panelIndex:'31',title:'Github%20Issues',type:visualization,version:'6.8.6'),(embeddableConfig:(title:'GitHub%20Issues',vis:(legendOpen:!f)),gridData:(h:8,i:'32',w:24,x:0,y:20),id:github_issues_evolutionary,panelIndex:'32',title:'GitHub%20Issues',type:visualization,version:'6.8.6'),(embeddableConfig:(title:'GitHub%20Issues%20Submitters'),gridData:(h:8,i:'33',w:16,x:32,y:36),id:github_issues_evolutionary_submitters,panelIndex:'33',title:'GitHub%20Issues%20Submitters',type:visualization,version:'6.8.6'),(embeddableConfig:(title:'GitHub%20Pull%20Requests'),gridData:(h:8,i:'34',w:24,x:24,y:28),id:github_pullrequests_main_metrics,panelIndex:'34',title:'GitHub%20Pull%20Requests',type:visualization,version:'6.8.6'),(embeddableConfig:(title:'Pull%20Requests',vis:(legendOpen:!f)),gridData:(h:8,i:'35',w:24,x:24,y:20),id:github_pullrequests_pullrequests,panelIndex:'35',title:'GitHub%20Pull%20Requests',type:visualization,version:'6.8.6'),(embeddableConfig:(title:'Pull%20Request%20Submitters',vis:(legendOpen:!f)),gridData:(h:8,i:'36',w:16,x:16,y:36),id:github_pullrequests_submitters_evolutionary,panelIndex:'36',title:'GitHub%20Pull%20Request%20Submitters',type:visualization,version:'6.8.6'),(embeddableConfig:(title:'Git%20Top%20Authors',vis:(params:(config:(searchKeyword:''),sort:(columnIndex:!n,direction:!n)))),gridData:(h:20,i:'111',w:24,x:0,y:0),id:git_overview_top_authors,panelIndex:'111',title:'Top%20Code%20Contributors',type:visualization,version:'6.8.6'),(embeddableConfig:(title:'-',vis:(params:(config:(searchKeyword:''),sort:(columnIndex:1,direction:desc)))),gridData:(h:20,i:'114',w:24,x:24,y:0),id:f747c010-9041-11ea-b035-e1712195ddd1,panelIndex:'114',title:'Magento%20Projects',type:visualization,version:'6.8.6')),query:(language:lucene,query:'*pwa-studio'),timeRestore:!f,title:Overview,viewMode:view)>

[Contribution guide]: .github/CONTRIBUTING.md
[Coverage Status]: https://coveralls.io/repos/github/magento/pwa-studio/badge.svg?branch=master
Expand Down
1 change: 0 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ services:
- ./packages/venia-concept/static:/usr/src/app/packages/venia-concept/static:rw
- ./packages/venia-ui/.storybook:/usr/src/app/packages/venia-ui/.storybook:rw
- ./packages/venia-ui/lib:/usr/src/app/packages/venia-ui/lib:rw
- ./packages/venia-ui/templates:/usr/src/app/packages/venia-ui/templates:rw
environment:
# environment variables consumed by the nginx-proxy service
VIRTUAL_HOST: ${DEV_SERVER_HOST}
Expand Down
13 changes: 12 additions & 1 deletion jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,15 @@ const jestConfig = {
})),
configureProject('pagebuilder', 'Pagebuilder', testReactComponents),
configureProject('peregrine', 'Peregrine', inPackage => ({
// Make sure we can test extension files.
moduleFileExtensions: [
'ee.js',
'ce.js',
'js',
'json',
'jsx',
'node'
],
// Define global variables.
globals,
// Expose jsdom to tests.
Expand Down Expand Up @@ -299,7 +308,9 @@ const jestConfig = {
'!**/__[[:alpha:]]*__/**',
'!**/.*/__[[:alpha:]]*__/**',
// Not this file itself
'!jest.config.js'
'!jest.config.js',
// Exclude deprecated components from coverage report
'!**/venia-ui/lib/components/Checkout/**'
],
// Don't look for test files in these directories.
testPathIgnorePatterns: [
Expand Down
2 changes: 2 additions & 0 deletions magento-compatibility.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

// PWA Studio version -> Magento version.
module.exports = {
'9.0.1': '2.4.2',
'9.0.0': '2.4.2',
'8.0.0': '2.4.0 - 2.4.1',
'7.0.0': '2.3.5 - 2.4.0',
'6.0.1': '2.3.4 - 2.3.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": "8.0.0",
"version": "9.0.1",
"private": true,
"workspaces": [
"packages/babel-preset-peregrine",
Expand Down
18 changes: 13 additions & 5 deletions packages/create-pwa/lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,20 @@ const chalk = require('chalk');
const gitUserInfo = require('git-user-info');
const isInvalidPath = require('is-invalid-path');
const isValidNpmName = require('is-valid-npm-name');
const { uniqBy } = require('lodash');

const pkg = require('../package.json');
const {
sampleBackends: defaultSampleBackends
} = require('@magento/pwa-buildpack/lib/cli/create-project');
const defaultSampleBackends = require('@magento/pwa-buildpack/sampleBackends.json');

const uniqBy = (array, property) => {
const map = new Map();

for (const element of array) {
if (element && element.hasOwnProperty(property)) {
map.set(element[property], element);
}
}

return Array.from(map.values());
};

const removeDuplicateBackends = backendEnvironments =>
uniqBy(backendEnvironments, 'url');
Expand Down
6 changes: 3 additions & 3 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": "1.1.2",
"version": "1.2.1",
"publishConfig": {
"access": "public"
},
Expand Down Expand Up @@ -29,15 +29,15 @@
},
"homepage": "https://github.com/magento/pwa-studio/tree/master/packages/create-pwa#readme",
"dependencies": {
"@magento/pwa-buildpack": "~7.0.0",
"@magento/pwa-buildpack": "~8.0.1",
"@magento/venia-concept": "~9.0.1",
"chalk": "^2.4.2",
"change-case": "^3.1.0",
"execa": "^1.0.0",
"git-user-info": "^1.0.1",
"inquirer": "^6.3.1",
"is-invalid-path": "^1.0.2",
"is-valid-npm-name": "^0.0.4",
"lodash": "~4.17.11",
"node-fetch": "~2.3.0",
"webpack": "~4.46.0"
}
Expand Down
6 changes: 3 additions & 3 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.0",
"version": "1.0.2",
"publishConfig": {
"access": "public"
},
Expand All @@ -13,8 +13,8 @@
"author": "Magento Commerce",
"license": "(OSL-3.0 OR AFL-3.0)",
"peerDependencies": {
"@magento/pwa-buildpack": "~7.0.0",
"@magento/venia-ui": "~5.0.0",
"@magento/pwa-buildpack": "~8.0.1",
"@magento/venia-ui": "~6.0.1",
"webpack": "~4.46.0"
},
"pwa-studio": {
Expand Down
2 changes: 1 addition & 1 deletion packages/extensions/venia-adobe-data-layer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"@adobe/adobe-client-data-layer": "~1.1.3"
},
"peerDependencies": {
"@magento/peregrine": "~8.0.0",
"@magento/peregrine": "~9.0.0",
"react": "~17.0.1"
},
"pwa-studio": {
Expand Down
4 changes: 2 additions & 2 deletions packages/extensions/venia-sample-backends/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@magento/venia-sample-backends",
"version": "0.0.1",
"version": "0.0.2",
"publishConfig": {
"access": "public"
},
Expand All @@ -13,7 +13,7 @@
"repository": "github:magento/pwa-studio",
"license": "(OSL-3.0 OR AFL-3.0)",
"peerDependencies": {
"@magento/pwa-buildpack": "~7.0.0",
"@magento/pwa-buildpack": "~8.0.1",
"node-fetch": "~2.3.0"
},
"pwa-studio": {
Expand Down
6 changes: 3 additions & 3 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.1",
"version": "0.0.2",
"publishConfig": {
"access": "public"
},
Expand All @@ -12,8 +12,8 @@
"repository": "github:magento/pwa-studio",
"license": "(OSL-3.0 OR AFL-3.0)",
"peerDependencies": {
"@magento/pwa-buildpack": "~7.0.0",
"@magento/venia-ui": "~5.0.0"
"@magento/pwa-buildpack": "~8.0.1",
"@magento/venia-ui": "~6.0.1"
},
"pwa-studio": {
"targets": {
Expand Down
14 changes: 7 additions & 7 deletions packages/pagebuilder/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@magento/pagebuilder",
"version": "3.0.0",
"version": "4.0.1",
"publishConfig": {
"access": "public"
},
Expand Down Expand Up @@ -34,9 +34,9 @@
"homepage": "https://github.com/magento/pwa-studio/tree/master/packages/pagebuilder#readme",
"dependencies": {},
"devDependencies": {
"@magento/peregrine": "~8.0.0",
"@magento/pwa-buildpack": "~7.0.0",
"@magento/venia-ui": "~5.0.0",
"@magento/peregrine": "~9.0.0",
"@magento/pwa-buildpack": "~8.0.1",
"@magento/venia-ui": "~6.0.1",
"@storybook/react": "~6.1.14",
"jarallax": "~1.11.1",
"load-google-maps-api": "~2.0.1",
Expand All @@ -50,9 +50,9 @@
"peerDependencies": {
"@apollo/client": "~3.1.2",
"@magento/babel-preset-peregrine": "~1.1.0",
"@magento/peregrine": "~8.0.0",
"@magento/pwa-buildpack": "~7.0.0",
"@magento/venia-ui": "~5.0.0",
"@magento/peregrine": "~9.0.0",
"@magento/pwa-buildpack": "~8.0.1",
"@magento/venia-ui": "~6.0.1",
"jarallax": "~1.11.1",
"load-google-maps-api": "~2.0.1",
"lodash.escape": "~4.0.1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,20 @@ import typePolicies from '../policies';

import { clearCartDataFromCache } from '../clearCartDataFromCache';

const persistor = {
persistor: {
storage: {
key: 'unit test key'
}
},
persist: jest.fn()
};

const log = jest.fn();

const Component = () => {
const client = useApolloClient();
client.persistor = persistor;

const initialCacheData = Object.assign({}, client.cache.data.data);
log(initialCacheData);
Expand Down
Loading

0 comments on commit 2f9b7e2

Please sign in to comment.