Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove yoast-components #21344

Merged
merged 3 commits into from
Apr 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
23 changes: 0 additions & 23 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -48,29 +48,6 @@ overrides:
- "packages/social-metadata-previews/**/*.js"
rules:
import/no-unresolved: [ "error", { ignore: [ "^@yoast/(components|replacement-variable-editor|social-metadata-forms|style-guide)" ] } ]
- files:
- "packages/yoast-components/**/*.js"
rules:
complexity: [ 1, 6 ]
# A wrapping label is not necessary when there already is an htmlFor attribute.
jsx-a11y/label-has-for: [ "error", { required: "id" } ]
require-jsdoc: 1
react/button-has-type: 1
react/default-props-match-prop-types: 1
react/no-unused-prop-types: 1
react/no-access-state-in-setstate: 1
react/no-unused-state: 1
react/no-deprecated: 0
react/jsx-no-bind: 1
react/jsx-no-target-blank: 1
react/require-default-props: 1
react/forbid-foreign-prop-types: 1
import/no-duplicates: 0
import/named: 0
import/no-extraneous-dependencies: 0
import/no-unresolved: [ "error", { ignore: [ "^@yoast/(analysis-report|components|helpers|replacement-variable-editor|search-metadata-previews|style-guide)" ] } ]
env:
jest: true
- files:
- "packages/**/tests/**/*Test.js"
rules:
Expand Down
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: 0 additions & 2 deletions packages/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@ This monorepo includes reusable packages:
- A combination of style constants and functions that can be used to conform to the Yoast corporate identity.
- [eslint-config-yoast](eslint)
- ESLint configuration for Yoast projects.
- [yoast-components](yoast-components) *[deprecated. replaced by [@yoast/components](packages/components)]*
- All-purpose React components.
- [yoastseo](yoastseo) *[Replaces [YoastSEO.js](https://github.com/yoast//yoastseo.js)]*
- Text analysis and assessment library in JavaScript. This library can generate interesting metrics about a text and assess these metrics to give you an assessment which can be used to improve the text.

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
1 change: 0 additions & 1 deletion packages/js/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@
"redux": "^3.7.2",
"redux-thunk": "^2.2.0",
"styled-components": "^5.3.6",
"yoast-components": "^5.24.0",
"yoastseo": "^1.91.1",
"yup": "^0.32.11"
},
Expand Down
22 changes: 0 additions & 22 deletions packages/yoast-components/.babelrc

This file was deleted.

20 changes: 0 additions & 20 deletions packages/yoast-components/.codeclimate.yml

This file was deleted.

2 changes: 0 additions & 2 deletions packages/yoast-components/.csslintrc

This file was deleted.

21 changes: 0 additions & 21 deletions packages/yoast-components/.editorconfig

This file was deleted.

24 changes: 0 additions & 24 deletions packages/yoast-components/.github/ISSUE_TEMPLATE.md

This file was deleted.

20 changes: 0 additions & 20 deletions packages/yoast-components/.github/PULL_REQUEST_TEMPLATE.md

This file was deleted.

5 changes: 0 additions & 5 deletions packages/yoast-components/.gitignore

This file was deleted.