Skip to content

Commit

Permalink
Remove yoast-components from tooling
Browse files Browse the repository at this point in the history
  • Loading branch information
igorschoester committed Apr 26, 2024
1 parent c2164c9 commit 9c3035b
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 12 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/deprecation-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ name: Deprecation check
on:
pull_request:
paths:
- packages/yoast-components/**
- packages/babel-preset/**
- packages/components/**
- packages/e2e-tests/**
Expand Down Expand Up @@ -32,7 +31,6 @@ jobs:
@${{ github.actor }} Please be aware that following packages have been abandoned and are not actively maintained anymore:
| Package name | Path |
| ------------- | ------------- |
| yoast-components | [packages/yoast-components](https://github.com/Yoast/wordpress-seo/tree/trunk/packages/yoast-components) |
| @yoast/babel-preset | [packages/babel-preset](https://github.com/Yoast/wordpress-seo/tree/trunk/packages/babel-preset) |
| @yoast/components | [packages/components](https://github.com/Yoast/wordpress-seo/tree/trunk/packages/components) |
| @yoast/e2e-tests | [packages/e2e-tests ](https://github.com/Yoast/wordpress-seo/tree/trunk/packages/e2e-tests ) |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/finish-coveralls.yml
Original file line number Diff line number Diff line change
Expand Up @@ -105,5 +105,5 @@ jobs:
COVERALLS_SERVICE_NUMBER: ${{ github.sha }} # Connect all builds together.
with:
github-token: ${{ secrets.COVERALLS_TOKEN }}
carryforward: "unit-php-7.2,unit-php-8.3,php-7.2-wp-6.3,php-7.2-wp-6.3-ms,php-8.3-wp-trunk,php-8.3-wp-trunk-ms,package-analysis-report,package-browserslist-config,package-components,package-feature-flag,package-helpers,package-js,package-replacement-variable-editor,package-search-metadata-previews,package-social-metadata-forms,package-social-metadata-previews,package-yoast-components,package-yoastseo"
carryforward: "unit-php-7.2,unit-php-8.3,php-7.2-wp-6.3,php-7.2-wp-6.3-ms,php-8.3-wp-trunk,php-8.3-wp-trunk-ms,package-analysis-report,package-browserslist-config,package-components,package-feature-flag,package-helpers,package-js,package-replacement-variable-editor,package-search-metadata-previews,package-social-metadata-forms,package-social-metadata-previews,package-yoastseo"
parallel-finished: true
1 change: 0 additions & 1 deletion .github/workflows/jstest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ jobs:
- 'search-metadata-previews'
- 'social-metadata-forms'
- 'social-metadata-previews'
- 'yoast-components'

name: "TestJS - ${{ matrix.package }} (full)"

Expand Down
5 changes: 2 additions & 3 deletions admin/class-admin-asset-manager.php
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,7 @@ protected function scripts_to_be_registered() {
'wp-components',
'wp-element',
'wp-i18n',
self::PREFIX . 'yoast-components',
self::PREFIX . 'components-new-package',
self::PREFIX . 'externals-components',
],
'version' => $scripts['installation-success']['version'],
Expand Down Expand Up @@ -401,7 +401,7 @@ static function ( $dep ) {
self::PREFIX . 'externals-redux',
self::PREFIX . 'analysis',
self::PREFIX . 'react-select',
self::PREFIX . 'yoast-components',
self::PREFIX . 'components-new-package',
],
'version' => $scripts['workouts']['version'],
];
Expand Down Expand Up @@ -502,7 +502,6 @@ protected function load_renamed_scripts() {
'helpers' => 'helpers-package',
'jed' => 'jed-package',
'chart.js' => 'chart.js-package',
'legacy-components' => 'components-package',
'network-admin-script' => 'network-admin',
'redux' => 'redux-package',
'replacement-variable-editor' => 'replacement-variable-editor-package',
Expand Down
5 changes: 1 addition & 4 deletions config/webpack/externals.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const {
* Yoast dependencies, declared as such in the package.json.
*/
const { dependencies } = require( "../../packages/js/package" );
const legacyYoastPackages = [ "yoast-components", "yoastseo" ];
const legacyYoastPackages = [ "yoastseo" ];
const additionalPackages = [
"draft-js",
"styled-components",
Expand Down Expand Up @@ -38,9 +38,6 @@ const yoastExternals = yoastPackages.reduce( ( memo, packageName ) => {
case "components":
useablePackageName = "components-new";
break;
case "yoast-components":
useablePackageName = "components";
break;
case "yoastseo":
useablePackageName = "analysis";
break;
Expand Down
2 changes: 1 addition & 1 deletion packages/components/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ The Yoast/Components package is not pre-build. So if you would like to include `
### Loading Javascript.

1. Install the package by running `yarn add @yoast/components`.
2. Include Yoast/components into the babel-loader of your `webpack.config`. This will look something like this: `include: [ paths.appSrc, /node_modules[/\\](yoast-components|@yoast)[/\\].*/ ]`
2. Include Yoast/components into the babel-loader of your `webpack.config`. This will look something like this: `include: [ paths.appSrc, /node_modules[/\\](@yoast)[/\\].*/ ]`
3. It can be that you will need presets for the `babel-loader`. These are: `presets: [ "@babel/preset-env", "@babel/preset-react" ]`

Note that you will also need to install these presets. Run `yarn add --dev @babel/preset-env @babel/preset-react`
Expand Down

0 comments on commit 9c3035b

Please sign in to comment.