Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .github/workflows/jslint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,5 +82,8 @@ jobs:
yarn --version
grunt --version

- name: Run Javascript lint
- name: Run plugin and tooling lint
run: yarn lint

- name: Run package lint
run: npx lerna run lint
11 changes: 9 additions & 2 deletions .github/workflows/jstest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,11 @@ jobs:
grunt --version
yarn run jest --version

- name: Install package dependencies
run: npx lerna bootstrap --ignore "@yoast/wordpress-seo"

- name: Build all packages
run: yarn run build --ignore "@yoast/wordpress-seo"
run: npx lerna run build --ignore "@yoast/wordpress-seo"

- name: Show Jest version
run: yarn run jest --version
Expand Down Expand Up @@ -202,9 +205,13 @@ jobs:
grunt --version
yarn run jest --version

- name: Install package dependencies
if: ${{ steps.checks-run.outputs.should == 'true' }}
run: npx lerna bootstrap --ignore "@yoast/wordpress-seo"

- name: Build all packages
if: ${{ steps.checks-run.outputs.should == 'true' }}
run: yarn run build --ignore "@yoast/wordpress-seo"
run: npx lerna run build --ignore "@yoast/wordpress-seo"

- name: Show Jest version
if: ${{ steps.checks-run.outputs.should == 'true' }}
Expand Down
15 changes: 3 additions & 12 deletions config/grunt/task-config/aliases.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,13 @@

# Grunt command to only build CSS and JS
'build:dev':
- 'build:packages'
- 'build:js'
- 'build:css'

# Compile the JavaScript packages that need it.
'build:packages':
- 'shell:yarn:build --ignore @yoast/wordpress-seo'

# Build JavaScript from assets to development
'build:js':
- 'clean:build-assets-js'
- 'shell:yarn:build --scope @yoast/wordpress-seo'
- 'shell:yarn:build'

# Build CSS for development
'build:css':
Expand Down Expand Up @@ -62,7 +57,6 @@ clean:build-assets:

# Get the project ready for beta
'create-beta':
- 'ensure-monorepo-is-unlinked'
- 'ensure-clean-branch'
- 'ensure-pre-release-branch'
- 'update-readme'
Expand Down Expand Up @@ -102,14 +96,11 @@ clean:build-assets:
release:
- 'clean:build-assets'
- 'build:images'
- 'release:packages'
- 'release:js'
- 'release:css'
# Compile the JavaScript packages that need it.
'release:packages':
- 'shell:yarn-prod:build --ignore @yoast/wordpress-seo'

'release:js':
- 'shell:yarn-prod:build --scope @yoast/wordpress-seo'
- 'shell:yarn-prod:build'

# Build CSS for production
'release:css':
Expand Down
15 changes: 2 additions & 13 deletions config/grunt/task-config/watch.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,28 +27,17 @@ module.exports = {
},
js: {
files: [
"packages/**/src/**/*.js",
"packages/js/src/**/*.js",
],
tasks: [
"shell:yarn:build",
"shell:yarn:lint:packages",
],
},
jsTests: {
files: [
"<%= files.jsTests %>",
],
tasks: [
"shell:yarn:lint:packages --scope @yoast/wordpress-seo",
"build:js",
],
},
css: {
files: [
"<%= files.css %>",
"packages/ui-library/src/**/*.css",
],
tasks: [
"build:packages",
"build:css",
],
},
Expand Down
2 changes: 1 addition & 1 deletion config/scripts/sync-wp-dependencies.js
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ const syncPackageDependenciesFor = async( packageFolder, wpDependencies, modifie
return true;
}

const command = `yarn workspace ${ packageJson.name } add ${ dependenciesWithWantedVersions.join( " " ) }`;
const command = `yarn --cwd packages/${ packageFolder } add ${ dependenciesWithWantedVersions.join( " " ) }`;
console.log( "=============================================" );
console.log( command );
try {
Expand Down
4 changes: 2 additions & 2 deletions config/webpack/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const packageJson = require( root + "package.json" );
const baseConfig = require( "./webpack.config.base" );
const { yoastPackages, yoastExternals } = require( "./externals" );

const languages = readdirSync( root + "node_modules/yoastseo/src/languageProcessing/languages" );
const languages = readdirSync( root + "node_modules/yoastseo/build/languageProcessing/languages" );
const pluginVersion = packageJson.yoast.pluginVersion;
const pluginVersionSlug = paths.flattenVersionForFile( pluginVersion );
const outputFilename = "[name].js";
Expand Down Expand Up @@ -63,7 +63,7 @@ module.exports = [
baseConfig( {
entry: languages.reduce( ( memo, language ) => {
const name = ( language === "_default" ) ? "default" : language;
memo[ name ] = "./node_modules/yoastseo/src/languageProcessing/languages/" + language + "/Researcher";
memo[ name ] = "./node_modules/yoastseo/build/languageProcessing/languages/" + language + "/Researcher";
return memo;
}, {} ),
output: {
Expand Down
3 changes: 2 additions & 1 deletion lerna.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"npmClient": "yarn",
"useWorkspaces": true,
"useWorkspaces": false,
"packages": ["packages/*"],
"version": "independent",
"includeMergedTags": true,
"ignoreChanges": [
Expand Down
18 changes: 8 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,20 +18,18 @@
},
"workspaces": {
"packages": [
"packages/*"
],
"nohoist": [
"**/sassdash"
"packages/js",
"packages/e2e-tests",
"packages/dashboard-frontend"
]
},
"scripts": {
"lint": "yarn lint:packages && yarn lint:tooling",
"lint:packages": "lerna run lint",
"lint:tooling": "eslint . --max-warnings=0",
"test": "lerna run test",
"build": "lerna run build",
"build": "yarn workspace @yoast/dashboard-frontend build && wp-scripts build --config config/webpack/webpack.config.js",
"build:css": "postcss css/dist/*.css --verbose --replace",
"webpack-analyze-bundle": "wp-scripts build --config config/webpack/webpack.config.js --webpack-bundle-analyzer",
"lint": "yarn lint:plugin && yarn lint:tooling",
"lint:plugin": "yarn workspace @yoast/wordpress-seo lint",
"lint:tooling": "eslint . --max-warnings=0",
"test": "yarn workspace @yoast/wordpress-seo test",
"start": "wp-scripts start --config config/webpack/webpack.config.js --webpack-src-dir=packages/js/src",
"sync:wp-deps": "node config/scripts/sync-wp-dependencies.js"
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { punctuationRegexString } from "yoastseo/src/languageProcessing/helpers/sanitize/removePunctuation";
import { punctuationRegexString } from "yoastseo/build/languageProcessing/helpers/sanitize/removePunctuation";

const symbols = "#$%&*+/=@^`{|}~\u00a0-\u00bf\u2013-\u204a\u2000-\u206f\u20a0-\u20c0";
/**
Expand Down
2 changes: 1 addition & 1 deletion packages/js/src/components/WincherSEOPerformanceModal.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import { ChartBarIcon } from "@heroicons/react/solid";
import { Fragment, useCallback } from "@wordpress/element";
import { __ } from "@wordpress/i18n";
import { useSvgAria } from "@yoast/ui-library/src";
import { useSvgAria } from "@yoast/ui-library";
import PropTypes from "prop-types";
import styled from "styled-components";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import { SearchIcon } from "@heroicons/react/solid";
import { useSelect } from "@wordpress/data";
import { __ } from "@wordpress/i18n";
import { useSvgAria } from "@yoast/ui-library/src";
import { useSvgAria } from "@yoast/ui-library";
import styled from "styled-components";

/* Internal dependencies */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import FacebookEditor from "../../../containers/FacebookEditor";
import TwitterEditor from "../../../containers/TwitterEditor";
import ModalCollapsible from "../../ModalCollapsible";
import { StyledDescription, StyledDescriptionTop } from "../../../helpers/styledDescription";
import { useSvgAria } from "@yoast/ui-library/src";
import { useSvgAria } from "@yoast/ui-library";


const StyledHeroIcon = styled( ShareIcon )`
Expand Down
2 changes: 1 addition & 1 deletion packages/js/src/insights/components/insights-modal.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { LightBulbIcon } from "@heroicons/react/solid";
import { useSelect } from "@wordpress/data";
import { __ } from "@wordpress/i18n";
import { isFeatureEnabled } from "@yoast/feature-flag";
import { useSvgAria } from "@yoast/ui-library/src";
import { useSvgAria } from "@yoast/ui-library";
import PropTypes from "prop-types";
import styled from "styled-components";
import EditorModal from "../../containers/EditorModal";
Expand Down
Loading
Loading