Allow transpiling all js files inside yoastseo/src and allow import with asterisk *#21971
Merged
Allow transpiling all js files inside yoastseo/src and allow import with asterisk *#21971
Conversation
…ed. This stemmer is used inside src
Pull Request Test Coverage Report for Build 75a29d53d44690cb47e44379c65b7a6ed8486c90Warning: This coverage report may be inaccurate.This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.
Details
💛 - Coveralls |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Context
Summary
This PR can be summarized in the following changelog entry:
srcandvendorinto TypeScript and allows importing modules with an asterisk*.Relevant technical choices:
moduleResolutionoption in the config allows using import statement with an asterisk*. For example,import * as assessments from "./scoring/assessments";. Reference: moduleResolution"src/**.js"to"src/**/*.js"inincludeallows the transpiling of all Javascript files inside thesrcfolder. Previously, not all JS files were transpiled. By using**/now we should be able to match nested directory to any level. Reference: includevendoris added to theincludearray insidetsconfig.json. This is because the Turkish external stemmer is stored in this folder. We also need to transpile the stemmer since we also use it insidesrcfolderyarn cleanscript has also been changed to clean the generatedtypesfolder.Test instructions
Test instructions for the acceptance test before the PR gets merged
This PR can be acceptance tested by following these steps:
checkJsoption insidepackages/yoastseo/tsconfig.jsontotrueto be able to build types (yarn build:typesinsideyoastseopackageAllows transpiling all JavaScript files inside
srcandvendorinto TypeScripttypesfolder inside the root ofyoastseodirectorytypesfolder, you see bothsrcandvendorfolderssrcare transpiledAllows importing modules with an asterisk
*packages/yoastseo/src/index.js. This file previously had errors in the import syntax with an asteriskpackages/yoastseo/types/src/index.d.tsand confirm that the following modules are imported correctly:Removes
typesfolder whenyarn cleanis executedtypesfolder insideyoastseowithrm -rf typesyoastseopackage, runyarn buildbuildandtypesfolder insideyoastseoyarn cleanbuildandtypesfolder insideyoastseoare removedRelevant test scenarios
Test instructions for QA when the code is in the RC
QA can test this PR by following these steps:
Impact check
This PR affects the following parts of the plugin, which may require extra testing:
UI changes
Other environments
[shopify-seo], added test instructions for Shopify and attached theShopifylabel to this PR.Documentation
Quality assurance
Innovation
innovationlabel.Fixes https://github.com/Yoast/lingo-other-tasks/issues/510