Skip to content
This repository has been archived by the owner on Oct 4, 2022. It is now read-only.

Add missing, but required, dependencies #324

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

Dieterrr
Copy link
Contributor

@Dieterrr Dieterrr commented Jul 9, 2019

Summary

Added two missing dependencies that are required but not included: @yoast/feature-flag to components, wicked-good-xpath to helpers.

  • Package(s) involved:
    -components
    -helpers

  • Should the change be included in the package changelog?

    • No
    • Yes
  • Should the change be included in one or more plugin changelogs?

    • No
    • Free
    • Premium
    • Other (please specify)
  • Package changelog item (if applicable):

  • Plugin changelog item (if applicable):

Test instructions

This PR can be tested by following these steps:

  • The original issue was the following when using the monorepo in myyoast:
Error in ./~/@yoast/components/KeywordSuggestions.js
Module not found: '@yoast/feature-flag' in /Users/dieterschalk/Code/Yoast/my-yoast/client/node_modules/@yoast/components

 @ ./~/@yoast/components/KeywordSuggestions.js 21:19-49

Error in ./~/@yoast/components/~/@yoast/helpers/getFeed.js
Module not found: 'wicked-good-xpath' in /Users/dieterschalk/Code/Yoast/my-yoast/client/node_modules/@yoast/components/node_modules/@yoast/helpers

 @ ./~/@yoast/components/~/@yoast/helpers/getFeed.js 10:23-51

Technically this could be reproduced but it's very specific. In wordpress-seo the error did not appear because it already included the packages itself. The issue can be tested by testing the local components app and make sure everything stays the same. Also make sure there are no build errors. If the changelog entry is included it will also go through the regular testing procedure for release.

Quality assurance

  • I have tested this code to the best of my abilities
  • I have added unittests to verify the code works as intended

Fixes #

@LisanneKluitmans LisanneKluitmans added the 1 Story points label Jul 10, 2019
@Dieterrr
Copy link
Contributor Author

Adding @yoast/feature-flag to @yoast/components breaks the tests. It seems babel related. This is an example of the errors:

@yoast/components: FAIL tests/IconLabelledButtonTest.js
@yoast/components:   ● Test suite failed to run
@yoast/components:     /Users/dieter/Yoast/javascript/packages/components/node_modules/@yoast/feature-flag/index.js:53
@yoast/components:     export {
@yoast/components:     ^^^^^^
@yoast/components:     
@yoast/components:     SyntaxError: Unexpected token export
@yoast/components:       19 |  * @returns {JSX.Element} The translated text including rendered link components.
@yoast/components:       20 |  */
@yoast/components:     > 21 | const getKeywordResearchArticleLink = () => {
@yoast/components:       22 | 	const keywordsResearchLinkTranslation = sprintf(
@yoast/components:       23 | 		__(
@yoast/components:       24 | 			"Read our %1$sultimate guide to keyword research%2$s to learn " +
@yoast/components:       
@yoast/components:       at ScriptTransformer._transformAndBuildScript (../../node_modules/jest-runtime/build/script_transformer.js:316:17)
@yoast/components:       at Object.<anonymous> (src/KeywordSuggestions.js:21:20)
@yoast/components: FAIL tests/CollapsibleTest.js


@Dieterrr Dieterrr removed 1 Story points needs-code-review labels Jul 12, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants