Skip to content

Commit

Permalink
9.0.1 (#1)
Browse files Browse the repository at this point in the history
* [PWA-893] My Account: Order History - Remove @client directive (magento#2786)

* Remove client directive and work through errors from using live data

* Fixup region display so its not rendering ids

* Fix payment method display and remove extra comma in addresses

* Additional tweaks from UX feedback

* Fixup failing tests

* Fix couple tests failing after gql move

* Fix bug where tracking information doesn't exist for shipped order

* Updated Intl FormattedMessage component mock. (magento#2792)

* Updated FormattedMessage component mock.

* div -> mock-FormattedMessage

* div -> mock-FormattedMessage

* Resetting price mock.

* Price component snap rollback.

* - Adjust item grid based on UX feedback
- Add context for providing product url suffix that is missing from graphql response

* Fixup failing tests

* Address PR feedback

* Cover new context with tests

* Address QA feedback

* Fixup tests and hide incomplete features

* Address additional edges found in QA

* Dependently render discount row

* Update snaps with new mock

* Allow empty string as quantity value to support backspace

Co-authored-by: Revanth Kumar Annavarapu <[email protected]>

* fix: Service Worker caching for home page routes w/ store code (magento#2856)

* Fix regex for html file type. Previous regex matched incorrect

* Use available store views in SW home route check

Signed-off-by: sirugh <[email protected]>

* Update tests

Signed-off-by: sirugh <[email protected]>

Co-authored-by: Devagouda <[email protected]>

* issue-2743-function-retreiveAvailableShippingMethods-spelling-change- changed the function name in both the occurences (magento#2807)

Co-authored-by: Stephen <[email protected]>

* Update index.md (magento#2865)

Co-authored-by: Stephen <[email protected]>

* [docs]: Add info about RAIL model (magento#2761)

* Update index.md

* Update pwa-devdocs/src/technologies/overview/index.md

Co-authored-by: Stephen <[email protected]>

Co-authored-by: Stephen <[email protected]>
Co-authored-by: James Calcaben <[email protected]>

* [Doc] extensibility framework overview (magento#2863)

* Add TOC entry

* Add new topic file and outline

* Add how it works section

* Add interceptor pattern section and image

* Add content for Targets section

* Add content for Intercept files

* Finish Declare file content

* Add content for Targets in PWA Studio packages

* Add list of extension examples

* Add extensibility overview diagram

* Apply suggestions from code review

Co-authored-by: Andy Terranova <[email protected]>

* Fix links

* Fix linting issues

* Add example intercept file content

Co-authored-by: Andy Terranova <[email protected]>
Co-authored-by: Devagouda <[email protected]>

* [feature]: Display "no payment method available" message if no allowed or configured payment methods are present (magento#2855)

* Filtered payment method radios.

Filtered payment method radios array because it was coming like [undefined, undefined]

* Showing "No Payment method available." message

Showing "No Payment method available." message when there are no supported payment methods available.

* Created class to add padding to no payment method message

Created class to add padding to no payment method message

* Fixed formatting using prettier

* Formatted with prettier

* Fixed typo suggested by @sirugh

* Added plain string to i18n

* Added string to translations

* Fixed Typo

* Fixed typo

* Update packages/venia-ui/lib/components/CheckoutPage/PaymentInformation/paymentMethods.js

Co-authored-by: Stephen <[email protected]>

* Update packages/venia-ui/i18n/en_US.json

Co-authored-by: Stephen <[email protected]>

* Fixed suggested changes given by sirugh

* Added missing dep react-intl

* Updated error messages and added global error color to it.

* Added error test.

Co-authored-by: Stephen <[email protected]>
Co-authored-by: Devagouda <[email protected]>
Co-authored-by: Revanth Kumar <[email protected]>

* [PWA-633] My Account: Address Book: Main View (magento#2857)

* Stub out address card functionality based on new mocks

* - Address some missed AC and hide dead links
- Cover changes in tests

* Update snaps and cleanup

* - Sort addresses so default comes first
- Add full page loading indicator on cold cache render
- Add phone number
- Add full country name display

* Use country data from backend until DisplayNames is more widely supported

Co-authored-by: Devagouda <[email protected]>

* Move product detail GraphQl fields to fragment (magento#2868)

* move product detail graphql fields to fragment

* move gql from venia-ui to peregrine

* update test case

* Use ApolloClient for MagentoRoute (magento#2859)

* Use Apollo for MagentoRoute

* Move queries to the talon

* Adjust category page loading

* Refactor to avoid repeat calls

* Fixup

* Remove getRouteComponent

* Start tests

* Rewrite unit tests

* Lift state up to context

* @brendanfalkowski

* Remove old query

* Inline response objects

* Update snapshots

* Update category snapshots

Co-authored-by: Devagouda <[email protected]>

* Fix apiBase URL in resolveUnknownRoute.js (magento#2877)

* Fix apiBase URL in resolveUnknownRoute.js

Fix URL used by `resolveUnknownRoute.js` so it takes `apiBase` into account when constructing URL to GraphQL server

* Add test for store base

Signed-off-by: sirugh <[email protected]>

Co-authored-by: sirugh <[email protected]>
Co-authored-by: Devagouda <[email protected]>

* Use async version of act() (magento#2880)

* Added feature to pick from multiple sample backends. (magento#2853)

* Initial work

* Added magento backend validation.

* Updated intercept to fetch backends.

* Fetching sample backends while creating a pwa app.

* Minor.

* Added try catches.

* Updated docs.

* Minor.

* Added node-fetch peer dep.

* Minor pretty print stuff.

* Added lodash and node-fetch deps.

* Updated extension desc.

* Updated tests.

* Minor.

* Updated remaining tests.

* Added runEnvValidators.js tests.

* Fixed linter issues.

* Minor.

* Added intercept tests.

* Using debug instead of console.error.

* Moving backend related code to run after configureWebpack.

* Updated the skipped test.

* Update ENV error reporting message.

* Minor.

* Minor.

* Updated error snapshot test.

* Minor.

* Minor.

* Added or condition for path variable in tests.

* Minor.

* Updated tests to use snapshots.

* Mock everything, lets get this working.

* Removed unecessary mocks.

* Updated tests.

* Using try catch to avoid prj creations.

* Reporting different message if otherBackends is empty.

* Updated tests.

* Prettier fix.

* Added console warning for production deployment.

* Updated production launch checklist docs.

Co-authored-by: Devagouda <[email protected]>

* [PWA-1128] fix(buildpack): Stop apicache from overriding good cache headers. (magento#2870)

* fix(buildpack): Stop apicache from overriding good cache headers. Fixes PWA-1128.

* fix(venia-ui): add cache headers to upward.yml staticFromRoot resolver

* fix: add simple max-age behavior to upward DirectoryResolver

Co-authored-by: Devagouda <[email protected]>

* magento/magento2-page-builder/magento#637: Form field/field group viewport scope (magento#2881)

- collect only desktop styles

Co-authored-by: Devagouda <[email protected]>

* [doc] update cloud deployment topic (magento#2871)

* Add new sections in the beginning

* Revise steps and adding required extensions step

* Add section about setting environment variables

* Remove optional and unneeded steps

* Add build, commit, and deploy sections

* Add more details on finding the correct UPWARD path value

* Update based on feedback

* Minor content update

* Changes based on review feedback

* Clarify env variables section

* Minor fixes

Co-authored-by: Devagouda <[email protected]>

* Handle array of paths as route pattern (magento#2893)

* Handle array of paths as route pattern

* JSON.parse route pattern when applying to Route path prop

* Add tests to makeRoutesTarget

* Fix missing projectConfig in create-custom-origin (magento#2897)

* Fix missing projectConfig in create-custom-origin

* Update examples in docs

Co-authored-by: Devagouda <[email protected]>

* Improve RootComponents talons test coverage (magento#2896)

* Refactor useCategory tests

* Refactor useCategory test file

* Add test to useCategory.spec.js

* Add location search filter test to useCategory.spec.js

* Add test for error on useCategory.spec.js

* Finish test coverage for useCategory

* Write tests for useNoProductsFound() talon

* Add tests for useCategoryContent() talon

Co-authored-by: Devagouda <[email protected]>

* Address Book - Add & Edit (magento#2879)

* Initial layout of add / edit form

* Adds unit tests

* Adding address full flow. Stubs out edit address.

* Country field to use country_code

* Properly formats FormErrors

* Absolute imports

* Seeds and sets the form properly

* Implements edit flow end to end

* Disable dialog buttons while saving

* Updates unit tests and snapshots

* Implements default address checkbox

* Smoothing out edges around default addresses

* Attempt to fix broken test

* Determinant sorting for default addresses

* Update packages/venia-ui/lib/components/AddressBookPage/addressBookPage.js

Co-authored-by: Jimmy Sanford <[email protected]>

* Remove auto-defaulting of addresses

* Remove query result fields from add mutation

* Adds query result fields to upadte mutation

* Adds AddEditDialog classes to propTypes

* Simplify passing parameter to edit callback function

* Adds address fragments

* Wait for refetchQueries to complete before finishing mutation

* Waits for refetchQueries before closing dialog. Renames props.

* Updates unit tests based on prop rename

* Binds edit address function at creation time

* Updates unit tests

* Adds middle name to AddressCard display

* Dialog to properly unmount on hide

* Updates unit tests

* Fixes new address bug

* Simplifies seeding the form in useAddressBookPage talon

* Adds JSDocs

Co-authored-by: Jimmy Sanford <[email protected]>
Co-authored-by: Devagouda <[email protected]>

* [feature] Use root category id from gql (magento#2902)

* Use storeConfig query to obtain root category id instead of hardcoding.

* Update tests

* Lint

Signed-off-by: sirugh <[email protected]>

* Set the root category once it resolves

Signed-off-by: sirugh <[email protected]>

* prettier

Signed-off-by: sirugh <[email protected]>

* Query for root category id for fallback on cms

* Protect against null id

* fix tests

Signed-off-by: sirugh <[email protected]>

* Use id in storeConfig query

Signed-off-by: sirugh <[email protected]>

* magento#2797. Re-factor Edit Product to use Dialog (magento#2824)

* Re-factor Edit Product to use Dialog (magento#2797)

* Re-factor Edit Product to use Dialog - CR fixes

* Fixed QTY update on cart editing

Co-authored-by: Devagouda <[email protected]>

* [PWA-458] Checkout - Sign In View (magento#2889)

* Remove sign-in link from CartPage

* Apply new style and positioning to sign in container

* - Implement view switcher similar to how the account menu works
- Tweak some styles in mobile view

* - Order imports consistently
- Add/remove changes to language file

* - Reset view state when you return to checkout
- Add heading to Create Account form
- Made cancel buttons low priority per UX guidance
- Fixed button layout of Create Account form so it uses rows on mobile
- Move SignIn container above Guest Checkout header on mobile

* Update existing tests

* Cover new component with tests

* Add propTypes to new component

* Make callback optional and remove noop function prop

Co-authored-by: Devagouda <[email protected]>

* Allow self signed certs for backend validation and only attach to scaffold sample (magento#2891)

* Allow self signed certs for backend validation

Signed-off-by: sirugh <[email protected]>

* remove log

Signed-off-by: sirugh <[email protected]>

* Only copy the extension to scaffolded apps

Signed-off-by: sirugh <[email protected]>

* Only include sample backend validator if scaffold selection is sample

Signed-off-by: sirugh <[email protected]>

* Add lodash as dependency to venia-concept

Signed-off-by: sirugh <[email protected]>

* update lockfile

Signed-off-by: sirugh <[email protected]>

* Make createProjectFromVenia async

Signed-off-by: sirugh <[email protected]>

* Update test

Signed-off-by: sirugh <[email protected]>

Co-authored-by: Devagouda <[email protected]>

* Wait to render confirmation until details return (magento#2850)

* Add Adobe client data layer (magento#2852)

* Add Adobe client data layer

* Clean up

* Update package description

Co-authored-by: deloreyj <[email protected]>

* Move definition to the effect

* Don't parse acdl minified code

* Include react as peerDep

* Bump peregrine peerdep to a caret

* Revert eb59d1c

Revert to tilde. Release script doesn't handle carets well, and this isn't significant.

Co-authored-by: deloreyj <[email protected]>
Co-authored-by: Devagouda <[email protected]>
Co-authored-by: Dev Patil <[email protected]>

* Saved payment methods main view. (magento#2882)

* Enabled saved payments link.

* Added payment skeleton.

* Moved stuff around.

* Snapshot update.

* Added other card types.

* Cleaned up some css.

* Using INTL.

* Minor.

* Minor css change.

* Changed name of payments target to checkoutPagePaymentTypes.

* Added savedPaymentTypes target.

* Updated target docs.

* Minor.

* Hide delete text in mobile view.

* Address PR feedback

* Snapshot updates.

* Updated snapshots.

* Updated tests.

* Added new tests.

* Minor

* Hiding delete button till PWA-638 comes in.

* Added new tests.

* Minor.

* Rendering no payments message.

* Clear CustomerPaymentTokens on signout.

* Rendering fullpageindicator when data is loading.

* Snapshot update.

* Removing unnecessary piece of code.

Co-authored-by: Tommy Wiebell <[email protected]>
Co-authored-by: Devagouda <[email protected]>

* [Doc] Refactor tutorials section (magento#2907)

* Archive css modules topic in tutorials

* Archived Using Component Props topic

* Archive Manage State topic

* Archive Work with GraphQL topic

* Remove links to archived pages in overview topic

* Archive Hello UPWARD tutorials

* Various updates

* Add Next Steps to project structure

Co-authored-by: Devagouda <[email protected]>

* Add props to nav query to render root category links (magento#2911)

Signed-off-by: sirugh <[email protected]>

Co-authored-by: Devagouda <[email protected]>

* Relative import for local custom loader (magento#2912)

Signed-off-by: sirugh <[email protected]>

Co-authored-by: Devagouda <[email protected]>

* Delete Address from Address Book (magento#2888)

* Initial delete implementation

* * Binds delete function
* Waits to dismiss overlay
* Cancel button is low priority styled

* * Stabilizes sorting
* Consistent spacing between confirm buttons
* Updates unit tests and snapshots

* Fixes confirmation button spacing for mobile

* Remove max-width on confirmation buttons

* Responsive delete confirm buttons

* Updates unit tests to include new output properties

* Address UX feedback

* Added addressCard tests.

* Added addressBookPage tests.

Co-authored-by: Revanth Kumar <[email protected]>
Co-authored-by: Devagouda <[email protected]>

* Hide links (magento#2918)

* v9.0.0-alpha.1

* v9.0.0-alpha.2

* Order History Page Search (magento#2916)

* Initial work.

* Lil better with loading states.

* Using debounce to fetch order number.

* Re arranging useEffects.

* Updated CSS.

* Order search useEffect logic change.

* Using onCompleted instead.

* Final touchups.

* Minor.

* Addressed UX review.

* Using submit button to search for orders.

* Minor.

* Minor.

* Added orderHistoryPage tests.

* Using fragments.

* Using fuzzy search.

* Added useOrderHistory tests.

* Using single query for order and orders data.

* Fetch all orders if search text is empty.

* Allowing button submit even if the search field is empty to fetch all orders.

* Test update.

* [PWA-887] My Account: Order History - Pagination (magento#2928)

* Working PoC of moving form context to just wrap search inputs

* Add simple pagination logic

* - Fix rendering of reset button
- Add Load More button and wire up to orders query

* Increase page size to UX requirement and remove unnecessary currentPage argument

* Add page info label to top of page

* Cover changes with tests

* - Use token for font size
- Make callback optional and document

* [fix] offline cached search and category pages (magento#2929)

* Moves getPageSize query to talon default operation

Signed-off-by: sirugh <[email protected]>

* Only show search page error if there is no data.

Signed-off-by: sirugh <[email protected]>

* Only render errors when error AND no data

Signed-off-by: sirugh <[email protected]>

* Update tests

Signed-off-by: sirugh <[email protected]>

* Make sure we only do the page reset if there is no data

Signed-off-by: sirugh <[email protected]>

* Test page setting effect

Signed-off-by: sirugh <[email protected]>

Co-authored-by: Devagouda <[email protected]>

* v9.0.0-beta.1

* [doc] release notes 9.0.0 (magento#2935)

* Clear out old 8.0.0 content

* Add link references

* Add page 1 PR entries

* Add page 2 entries

* Add page 3 entries

* Add page 4 and 5 entries

* Add details to highlights

* Update compatibility table

* Update highlight and known issue

* Update Top Community Contributors

* Update content based on feedback

* Fix capitalization

* Add missing entries

Co-authored-by: Devagouda <[email protected]>

* Bump hastily dependency (magento#2963)

* v9.0.0-beta.2

* v9.0.0-rc.1

* Add known issue about watcher running out of memory (magento#2977)

* Add known issue about watcher running out of memory

* Add link

* Update note about watcher duration

* v9.0.0

* Remove lodash from create-pwa

* Fix bug

* Extend fix to venia-concept

* Using map instead of set.

Co-authored-by: Tommy Wiebell <[email protected]>
Co-authored-by: Stephen <[email protected]>
Co-authored-by: Devagouda <[email protected]>
Co-authored-by: Sathiya Prakash <[email protected]>
Co-authored-by: Hiren Patel <[email protected]>
Co-authored-by: Abrar Pathan <[email protected]>
Co-authored-by: James Calcaben <[email protected]>
Co-authored-by: Andy Terranova <[email protected]>
Co-authored-by: Ankur Raiyani <[email protected]>
Co-authored-by: Huy Kon <[email protected]>
Co-authored-by: Jimmy Sanford <[email protected]>
Co-authored-by: Sergey Kolodyazhnyy <[email protected]>
Co-authored-by: sirugh <[email protected]>
Co-authored-by: James Zetlen <[email protected]>
Co-authored-by: Oleksandr Miroshnichenko <[email protected]>
Co-authored-by: Papilion Dániel <[email protected]>
Co-authored-by: Kristof, Fooman <[email protected]>
Co-authored-by: Marcin Kwiatkowski <[email protected]>
Co-authored-by: deloreyj <[email protected]>
Co-authored-by: Dev Patil <[email protected]>
Co-authored-by: devops-pwa-codebuild <[email protected]>
  • Loading branch information
22 people authored Feb 9, 2021
1 parent 49a0cd5 commit 53c2fe6
Show file tree
Hide file tree
Showing 344 changed files with 14,033 additions and 4,290 deletions.
562 changes: 284 additions & 278 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 @@ -79,36 +79,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
8 changes: 8 additions & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,14 @@ const testReactComponents = inPackage => ({
id: 1,
locale: 'en_US',
store_name: 'Default Store View'
},
{
base_currency_code: 'EUR',
code: 'fr',
default_display_currency_code: 'EUR',
id: 2,
locale: 'fr_FR',
store_name: 'French Store View'
}
]
}
Expand Down
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 = {
'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.0",
"private": true,
"workspaces": [
"packages/babel-preset-peregrine",
Expand Down
41 changes: 40 additions & 1 deletion packages/create-pwa/lib/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
const { basename, resolve } = require('path');
const os = require('os');
const fetch = require('node-fetch');
const changeCase = require('change-case');
const inquirer = require('inquirer');
const execa = require('execa');
Expand All @@ -9,9 +10,37 @@ const isInvalidPath = require('is-invalid-path');
const isValidNpmName = require('is-valid-npm-name');
const pkg = require('../package.json');
const {
sampleBackends
sampleBackends: defaultSampleBackends
} = require('@magento/pwa-buildpack/lib/cli/create-project');

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');

const fetchSampleBackends = async () => {
try {
const res = await fetch(
'https://fvp0esmt8f.execute-api.us-east-1.amazonaws.com/default/getSampleBackends'
);
const { sampleBackends } = await res.json();

return sampleBackends.environments;
} catch {
return [];
}
};

module.exports = async () => {
console.log(chalk.greenBright(`${pkg.name} v${pkg.version}`));
console.log(
Expand All @@ -20,6 +49,16 @@ module.exports = async () => {
const userAgent = process.env.npm_config_user_agent || '';
const isYarn = userAgent.includes('yarn');

const sampleBackendEnvironments = await fetchSampleBackends();
const filteredBackendEnvironments = removeDuplicateBackends([
...sampleBackendEnvironments,
...defaultSampleBackends.environments
]);
const sampleBackends = {
...defaultSampleBackends,
environments: filteredBackendEnvironments
};

const questions = [
{
name: 'directory',
Expand Down
5 changes: 3 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": "1.1.2",
"version": "1.2.0",
"publishConfig": {
"access": "public"
},
Expand Down Expand Up @@ -29,14 +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.0",
"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",
"node-fetch": "~2.3.0",
"webpack": "^4.29.5"
}
}
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.1",
"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.0",
"@magento/venia-ui": "~6.0.0",
"webpack": "~4.38.0"
},
"pwa-studio": {
Expand Down
16 changes: 16 additions & 0 deletions packages/extensions/venia-adobe-data-layer/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
const { useEffect } = require('react');

module.exports = original => props => {
useEffect(() => {
// define the global as soon as possible
globalThis.adobeDataLayer = globalThis.adobeDataLayer || [];

// import the library as late as possible
import(/* webpackChunkName: "acdl" */
/* webpackMode: "lazy" */
/* webpackPrefetch: true */
'@adobe/adobe-client-data-layer');
}, []);

return original(props);
};
7 changes: 7 additions & 0 deletions packages/extensions/venia-adobe-data-layer/intercept.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
module.exports = targets => {
const { talons } = targets.of('@magento/peregrine');

talons.tap(({ App }) => {
App.useApp.wrapWith('@magento/venia-adobe-data-layer');
});
};
26 changes: 26 additions & 0 deletions packages/extensions/venia-adobe-data-layer/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"name": "@magento/venia-adobe-data-layer",
"version": "0.0.1",
"publishConfig": {
"access": "public"
},
"description": "Provides Adobe Client Data Layer support in PWA Studio",
"main": "./index.js",
"scripts": {
"clean": " "
},
"repository": "github:magento/pwa-studio",
"license": "(OSL-3.0 OR AFL-3.0)",
"dependencies": {
"@adobe/adobe-client-data-layer": "~1.1.3"
},
"peerDependencies": {
"@magento/peregrine": "~9.0.0",
"react": "~16.9.0"
},
"pwa-studio": {
"targets": {
"intercept": "./intercept"
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`should call onFail if backend is inactive 1`] = `
"https://www.magento-backend-2.3.4.com/ is inactive. Please consider using one of these other backends:
[{\\"name\\":\\"2.3.3-venia-cloud\\",\\"description\\":\\"Magento 2.3.3 with Venia sample data installed\\",\\"url\\":\\"https://master-7rqtwti-mfwmkrjfqvbjk.us-4.magentosite.cloud/\\"}]
"
`;

exports[`should call onFail with a different error message if environments is empty 1`] = `
"https://www.magento-backend-2.3.4.com/ is inactive. Please consider using one of these other backends:
[{\\"name\\":\\"2.3.3-venia-cloud\\",\\"description\\":\\"Magento 2.3.3 with Venia sample data installed\\",\\"url\\":\\"https://master-7rqtwti-mfwmkrjfqvbjk.us-4.magentosite.cloud/\\"}]
"
`;

exports[`should log warning message in the console 1`] = `
"
venia-sample-backends is a \\"development-only\\" extension, please remove it from your project's package.json before going to production.
"
`;
Loading

0 comments on commit 53c2fe6

Please sign in to comment.