diff --git a/.changeset/perfect-cats-cheat.md b/.changeset/perfect-cats-cheat.md new file mode 100644 index 00000000..5c3467fc --- /dev/null +++ b/.changeset/perfect-cats-cheat.md @@ -0,0 +1,5 @@ +--- +"10up-toolkit": patch +--- + +Fix peer deps diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index cd9b29ea..1888ba04 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -79,7 +79,7 @@ Here's a summary of the process 3. Optionally merge more PRs into `develop` if you want to include other changes in the same release. Doing so will update the `Release (next)` PR automatically. 4. Merge the PR opened by `changeset` into `develop`. 5. A new release under the `next` tag will be pushed to npm. -6. A new Github Release with the changelog will be created automatically. +6. A new GitHub Release with the changelog will be created automatically. ### Stable releases @@ -96,4 +96,4 @@ Here's a summary of the process 4. Merge the PR opened by `changeset` into `trunk`. 5. A new release under the `latest` tag will be pushed to npm. 6. Merge `trunk` back into `develop`. -7. A new Github Release with the changelog will be created automatically. \ No newline at end of file +7. A new GitHub Release with the changelog will be created automatically. \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 442baffc..dff7da64 100644 --- a/package-lock.json +++ b/package-lock.json @@ -12779,14 +12779,15 @@ } }, "node_modules/follow-redirects": { - "version": "1.15.4", + "version": "1.15.6", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.6.tgz", + "integrity": "sha512-wWN62YITEaOpSK584EZXJafH1AGpO8RVgElfkuXbTOrPX4fIfOyEpW/CsiNd8JdYrAoOvafRTOEnvsO++qCqFA==", "funding": [ { "type": "individual", "url": "https://github.com/sponsors/RubenVerborgh" } ], - "license": "MIT", "engines": { "node": ">=4.0" }, @@ -24725,8 +24726,9 @@ } }, "node_modules/webpack-dev-middleware": { - "version": "5.3.3", - "license": "MIT", + "version": "5.3.4", + "resolved": "https://registry.npmjs.org/webpack-dev-middleware/-/webpack-dev-middleware-5.3.4.tgz", + "integrity": "sha512-BVdTqhhs+0IfoeAf7EoH5WE+exCmqGerHfDM0IL096Px60Tq2Mn9MAbnaGUe6HiMa41KMCYF19gyzZmBcq/o4Q==", "dependencies": { "colorette": "^2.0.10", "memfs": "^3.4.3", @@ -25386,7 +25388,7 @@ }, "packages/babel-preset-default": { "name": "@10up/babel-preset-default", - "version": "2.1.1-next.0", + "version": "2.1.1", "dependencies": { "@babel/core": "^7.23.7", "@babel/helper-plugin-utils": "^7.22.5", @@ -25400,7 +25402,7 @@ "core-js": "^3.35.0" }, "devDependencies": { - "@10up/eslint-config": "^4.0.0-next.0", + "@10up/eslint-config": "^4.0.0", "@wordpress/element": "^4.20.0", "babel-jest": "^27.5.1", "eslint": "^8.40.0", @@ -25409,10 +25411,10 @@ }, "packages/eslint-config": { "name": "@10up/eslint-config", - "version": "4.0.0-next.1", + "version": "4.0.0", "license": "GPL-2.0-or-later", "dependencies": { - "@10up/babel-preset-default": "^2.1.1-next.0" + "@10up/babel-preset-default": "^2.1.1" }, "devDependencies": { "@wordpress/eslint-plugin": "^17.5.0", @@ -25447,7 +25449,7 @@ }, "packages/stylelint-config": { "name": "@10up/stylelint-config", - "version": "3.0.0-next.1", + "version": "3.0.0", "license": "GPL-2.0-or-later", "dependencies": { "stylelint-config-recommended": "^13.0.0", @@ -25456,7 +25458,7 @@ "stylelint-stylistic": "^0.4.3" }, "devDependencies": { - "@10up/eslint-config": "^4.0.0-next.0", + "@10up/eslint-config": "^4.0.0", "jest": "^29.7.0" }, "engines": { @@ -26678,7 +26680,7 @@ }, "packages/toolkit": { "name": "10up-toolkit", - "version": "6.0.0-next.0", + "version": "6.0.0", "license": "GPL-2.0-or-later", "dependencies": { "@babel/eslint-parser": "^7.23.3", @@ -26734,18 +26736,18 @@ "10up-toolkit": "bin/10up-toolkit.js" }, "devDependencies": { - "@10up/babel-preset-default": "^2.1.1-next.0", - "@10up/eslint-config": "^4.0.0-next.0", - "@10up/stylelint-config": "^3.0.0-next.0" + "@10up/babel-preset-default": "^2.1.1", + "@10up/eslint-config": "^4.0.0", + "@10up/stylelint-config": "^3.0.0" }, "engines": { "node": ">=16", "npm": ">=6.9" }, "peerDependencies": { - "@10up/babel-preset-default": "^2.1.1-next.0", - "@10up/eslint-config": "^4.0.0-next.0", - "@10up/stylelint-config": ">=3.0.0-next.0", + "@10up/babel-preset-default": "^2.1.1", + "@10up/eslint-config": "^4.0.0", + "@10up/stylelint-config": "^3.0.0", "@linaria/babel-preset": ">=4.3.3", "@linaria/webpack-loader": ">=4.1.11", "typescript": ">=5.0.0" @@ -28147,7 +28149,7 @@ "@linaria/babel-preset": "^5.0.3", "@linaria/webpack-loader": "^5.0.3", "@wordpress/env": "^5.0.0", - "10up-toolkit": "^6.0.0-next.0" + "10up-toolkit": "^6.0.0" }, "engines": { "node": ">=12.0.0" @@ -28164,7 +28166,7 @@ "@testing-library/dom": "9.3.3", "@testing-library/jest-dom": "^6.2.0", "@testing-library/user-event": "^14.5.2", - "10up-toolkit": "^6.0.0-next.0", + "10up-toolkit": "^6.0.0", "jest-axe": "^8.0.0", "jest-environment-jsdom": "~29.7.0" } @@ -28177,7 +28179,7 @@ "xss": "^1.0.11" }, "devDependencies": { - "10up-toolkit": "^6.0.0-next.0" + "10up-toolkit": "^6.0.0" } }, "projects/library/node_modules/@jest/console": { diff --git a/packages/babel-preset-default/CHANGELOG.md b/packages/babel-preset-default/CHANGELOG.md index 379e2cc0..0b9b4406 100644 --- a/packages/babel-preset-default/CHANGELOG.md +++ b/packages/babel-preset-default/CHANGELOG.md @@ -53,7 +53,7 @@ All notable changes to this project will be documented in this file, per [the Ke ## [1.1.0] -- Adds support to the new [JSX transform](https://reactjs.org/blog/2020/09/22/introducing-the-new-jsx-transform.html). The new JSX transform is going to be used by default if avaliable. If `wordpress` option is set to true, it won't be used. +- Adds support to the new [JSX transform](https://reactjs.org/blog/2020/09/22/introducing-the-new-jsx-transform.html). The new JSX transform is going to be used by default if available. If `wordpress` option is set to true, it won't be used. ## [1.0.0] - Initial Release diff --git a/packages/babel-preset-default/README.md b/packages/babel-preset-default/README.md index f07048c9..91a1296b 100644 --- a/packages/babel-preset-default/README.md +++ b/packages/babel-preset-default/README.md @@ -3,7 +3,7 @@ Babel preset for transforming JavaScript at 10up. [![Support Level](https://img.shields.io/badge/support-active-green.svg)](#support-level) -## Instalation +## Installation ```sh npm install --save-dev @10up/babel-preset-default @@ -51,12 +51,12 @@ It's the `@babel/preset-env` [modules](https://babeljs.io/docs/en/babel-preset-e When enabled will load `@wordpress/babel-preset-default`. Required when building WordPress Gutenberg blocks. #### options.debug -Enables debug messages. Usefull to review which presets and plugins babel is using. +Enables debug messages. Useful to review which presets and plugins babel is using. #### options.removePropTypes By default this babel preset will remove any prop-types declarations when building for production. -You rarelly will need to change this setting, but in case you do, this option let's you specify any of the [babel-plugin-transform-react-remove-prop-types](https://github.com/oliviertassinari/babel-plugin-transform-react-remove-prop-types) options. +You rarely will need to change this setting, but in case you do, this option let's you specify any of the [babel-plugin-transform-react-remove-prop-types](https://github.com/oliviertassinari/babel-plugin-transform-react-remove-prop-types) options. #### options.targets diff --git a/packages/toolkit/CHANGELOG.md b/packages/toolkit/CHANGELOG.md index c5eef971..896aa71e 100644 --- a/packages/toolkit/CHANGELOG.md +++ b/packages/toolkit/CHANGELOG.md @@ -300,7 +300,7 @@ All notable changes to this project will be documented in this file, per [the Ke ## 4.0.0 - Changed: 10up-toolkit no longer transpiles `@10up/block-components`. Make sure to use the latest version of `@10up/block-components` that already ships transpiled code. [#181](https://github.com/10up/10up-toolkit/pull/181) -- Changed [BREAKING CHANGE]: Stop injecting `wp-polyfill` as dependecy of scripts built by 10up-toolkit. [#193](https://github.com/10up/10up-toolkit/pull/193). +- Changed [BREAKING CHANGE]: Stop injecting `wp-polyfill` as dependency of scripts built by 10up-toolkit. [#193](https://github.com/10up/10up-toolkit/pull/193). - Updated: Dependencies [#182](https://github.com/10up/10up-toolkit/pull/182) - Changed [BREAKING CHANGE]: Stylelint and eslint are now peerDependencies. This is a breaking change only for those not using npm >= 7. [#179](https://github.com/10up/10up-toolkit/pull/179) @@ -325,7 +325,7 @@ All notable changes to this project will be documented in this file, per [the Ke - Added - Introduced `TenUpToolkitTscPlugin` that runs tsc both on build and watch if tsconfig.json is present. [#151](https://github.com/10up/10up-toolkit/pull/161) - Changed - Eslint and stylelint now only lint changed files when building with webpack (lintDirtyModulesOnly) [#146](https://github.com/10up/10up-toolkit/pull/146) - Changed - Replaced `imagemin-webpack-plugin` with `image-minimizer-webpack-plugin` [#147](https://github.com/10up/10up-toolkit/pull/147) -- Changed - Droped `imagemin` in favor of `squoosh` [#157](https://github.com/10up/10up-toolkit/pull/157) +- Changed - Dropped `imagemin` in favor of `squoosh` [#157](https://github.com/10up/10up-toolkit/pull/157) - Changed - Updated `@svgr/webpack` to 6.2.1 and removed `postcss-object-fit-image` as it's not necessary. - Deprecated - BrowserSync [#159](https://github.com/10up/10up-toolkit/pull/159) @@ -370,7 +370,7 @@ All notable changes to this project will be documented in this file, per [the Ke ## 1.0.8 - Fixed PostCSS nested plugin. props @rdimascio -- Fixed: Typo in HtmlWebpackPlugin where it was looking for the template in pulic folder instead of folder. Additionally, it now only defines a custom template if it is defined in the project. +- Fixed: Typo in HtmlWebpackPlugin where it was looking for the template in public folder instead of folder. Additionally, it now only defines a custom template if it is defined in the project. ## 1.0.7 diff --git a/packages/toolkit/README.md b/packages/toolkit/README.md index 0b975ca3..8d66c234 100644 --- a/packages/toolkit/README.md +++ b/packages/toolkit/README.md @@ -526,7 +526,7 @@ import "core-js/es/array/from"; import "core-js/web/dom-collections"; ``` -The second difference is that 10up-toolkit **wil not** include the dependencies (or peer dependencies) in the final bundle. +The second difference is that 10up-toolkit **will not** include the dependencies (or peer dependencies) in the final bundle. The reason for this is that, it's responsibility of the consumer bundle to resolve and include dependencies in the final bundle. Doing otherwise could lead to duplication of packages in the application final bundle. This behavior is inspired in [how microbundle](https://github.com/developit/microbundle/wiki/How-Microbundle-decides-which-dependencies-to-bundle) handle bundling packages. diff --git a/packages/toolkit/UPGRADING.md b/packages/toolkit/UPGRADING.md index 3842e2cb..562bd7ec 100644 --- a/packages/toolkit/UPGRADING.md +++ b/packages/toolkit/UPGRADING.md @@ -49,15 +49,15 @@ See the [postcss-preset-env changelog](https://github.com/csstools/postcss-plugi ### Eslint The rule `jsdoc/newline-after-description` has been removed in the latest `eslint-plugin-jsdoc` and thus has been removed in the latest version of toolkit. If you have this rule in your own eslint config file you will need to remove it. -When upgrading toolkit, ensure you also update `@10up/eslint-config` to 4, in case you are specifying it in your package.json. If you're not npm should resolve the peer depedency automatically. +When upgrading toolkit, ensure you also update `@10up/eslint-config` to 4, in case you are specifying it in your package.json. If you're not npm should resolve the peer dependency automatically. ### Prettier -Prettier have been upgraded to v3. We also recommend that you specify a [prettier exact version](https://prettier.io/docs/en/install#summary) in your own package.json going forward. If you haven't, add prettier v3 to your package.json and if you already have prettier listed as a dependecy, update it to v3. Updating prettier will now be responsibility of the project since updating prettier often requires other code changes to adhere to new formatting rules. +Prettier have been upgraded to v3. We also recommend that you specify a [prettier exact version](https://prettier.io/docs/en/install#summary) in your own package.json going forward. If you haven't, add prettier v3 to your package.json and if you already have prettier listed as a dependency, update it to v3. Updating prettier will now be responsibility of the project since updating prettier often requires other code changes to adhere to new formatting rules. ### Jest -The jest packages have been updated, if you're using `10up-toolkit test-unit-jest` and using `testEnvironment: jsdom`, add `jest-environment-jsdom` as a dependecy to your project. +The jest packages have been updated, if you're using `10up-toolkit test-unit-jest` and using `testEnvironment: jsdom`, add `jest-environment-jsdom` as a dependency to your project. ## Upgrading from 3 to 4 diff --git a/packages/toolkit/config/__tests__/__fixtures__/styleguide.css b/packages/toolkit/config/__tests__/__fixtures__/styleguide.css index 0a2aede0..86ce1a91 100644 --- a/packages/toolkit/config/__tests__/__fixtures__/styleguide.css +++ b/packages/toolkit/config/__tests__/__fixtures__/styleguide.css @@ -1,7 +1,7 @@ :root { --c-uikit-base: #fff; --c-uikit-accent: #767676; - --c-uikit-hightlight: #f6f6f6; + --c-uikit-highlight: #f6f6f6; --c-uikit-border: #ccc; --c-uikit-primary: #000; @@ -81,7 +81,7 @@ .uikit__icon { align-items: center; - background: var(--c-uikit-hightlight); + background: var(--c-uikit-highlight); display: flex; float: left; height: 62px; diff --git a/packages/toolkit/config/__tests__/__snapshots__/postscss.config.js.snap b/packages/toolkit/config/__tests__/__snapshots__/postscss.config.js.snap index 379368fb..a502127d 100644 --- a/packages/toolkit/config/__tests__/__snapshots__/postscss.config.js.snap +++ b/packages/toolkit/config/__tests__/__snapshots__/postscss.config.js.snap @@ -4,7 +4,7 @@ exports[`postcss properly transforms css 1`] = ` ":root { --c-uikit-base: #fff; --c-uikit-accent: #767676; - --c-uikit-hightlight: #f6f6f6; + --c-uikit-highlight: #f6f6f6; --c-uikit-border: #ccc; --c-uikit-primary: #000; @@ -82,7 +82,7 @@ exports[`postcss properly transforms css 1`] = ` .uikit__icon { align-items: center; - background: var(--c-uikit-hightlight); + background: var(--c-uikit-highlight); display: flex; float: left; height: 62px; diff --git a/packages/toolkit/config/fast-refresh.php b/packages/toolkit/config/fast-refresh.php index 024353d5..ce220069 100644 --- a/packages/toolkit/config/fast-refresh.php +++ b/packages/toolkit/config/fast-refresh.php @@ -53,7 +53,7 @@ function() { $dist_url = $vars['dist_url']; if ( ! $dist_url || ! $dist_path ) { - wp_die( '10up-toolkit error: you must defined call TenUpToolkit\set_dist_url_path with the URL and path to dist folfer to get fast refresh to work' ); + wp_die( '10up-toolkit error: you must defined call TenUpToolkit\set_dist_url_path with the URL and path to dist folder to get fast refresh to work' ); } $react_fast_refresh_entry = $dist_url . 'fast-refresh/react-refresh-entry/index.min.js'; diff --git a/packages/toolkit/config/webpack/__tests__/output.js b/packages/toolkit/config/webpack/__tests__/output.js index 6283e3dd..53b5c34a 100644 --- a/packages/toolkit/config/webpack/__tests__/output.js +++ b/packages/toolkit/config/webpack/__tests__/output.js @@ -2,7 +2,7 @@ const path = require('path'); const output = require('../output'); describe('output module function', () => { - it('return package output config when isPacakge is true', () => { + it('return package output config when isPackage is true', () => { let o = output({ isPackage: true, packageConfig: { main: 'index.js', packageType: 'all' }, @@ -22,7 +22,7 @@ describe('output module function', () => { expect(o.path).toBe(path.resolve(process.cwd(), 'dist')); }); - it('return project output config when isPacakge is false', () => { + it('return project output config when isPackage is false', () => { expect( output({ isPackage: false, diff --git a/packages/toolkit/config/webpack/optimization.js b/packages/toolkit/config/webpack/optimization.js index 5fff1463..9216ac8f 100644 --- a/packages/toolkit/config/webpack/optimization.js +++ b/packages/toolkit/config/webpack/optimization.js @@ -31,7 +31,7 @@ module.exports = ({ isProduction, projectConfig: { hot, analyze } }) => { comparisons: false, // Disabled because of an issue with Terser breaking valid code: // https://github.com/facebook/create-react-app/issues/5250 - // Pending futher investigation: + // Pending further investigation: // https://github.com/terser-js/terser/issues/120 inline: 2, }, diff --git a/packages/toolkit/config/webpack/plugins.js b/packages/toolkit/config/webpack/plugins.js index 3567ac11..edc87ab5 100644 --- a/packages/toolkit/config/webpack/plugins.js +++ b/packages/toolkit/config/webpack/plugins.js @@ -107,7 +107,7 @@ module.exports = ({ try { // with the react fast refresh plugin // we cannot always assume there's a single entry module - // so we need to check if any of the entry modules are relative to blocksSourceDiretory + // so we need to check if any of the entry modules are relative to blocksSourceDirectory entryModules = options.chunk.getModules().filter((module) => { return module.isEntryModule(); }); diff --git a/packages/toolkit/config/webpack/plugins/no-browser-sync.js b/packages/toolkit/config/webpack/plugins/no-browser-sync.js index 37b7d06b..63122b07 100644 --- a/packages/toolkit/config/webpack/plugins/no-browser-sync.js +++ b/packages/toolkit/config/webpack/plugins/no-browser-sync.js @@ -10,7 +10,7 @@ class NoBrowserSyncPlugin { this.displayed = true; const logger = compilation.getLogger('10upToolkitBrowserSyncDeprecationNotice'); logger.warn( - 'BrowserSync suppport has been deprecated in 10up-toolkit in favor of the `--hot` option and will be completely removed in the next major release!', + 'BrowserSync support has been deprecated in 10up-toolkit in favor of the `--hot` option and will be completely removed in the next major release!', ); logger.warn( 'If you still wish to use BrowserSync you must manually install the `browser-sync` and `browser-sync-webpack-plugin` packages.', diff --git a/packages/toolkit/package.json b/packages/toolkit/package.json index ee92d40f..1c999b37 100644 --- a/packages/toolkit/package.json +++ b/packages/toolkit/package.json @@ -68,15 +68,15 @@ "core-js-pure": "^3.35.0" }, "devDependencies": { - "@10up/babel-preset-default": "^2.1.1", - "@10up/eslint-config": "^4.0.0", - "@10up/stylelint-config": "^3.0.0" + "@10up/babel-preset-default": ">=2.1.1", + "@10up/eslint-config": ">=4.0.0", + "@10up/stylelint-config": ">=3.0.0" }, "peerDependencies": { "typescript": ">=5.0.0", - "@10up/babel-preset-default": "^2.1.1-next.0", - "@10up/eslint-config": "^4.0.0-next.0", - "@10up/stylelint-config": ">=3.0.0-next.0", + "@10up/babel-preset-default": "^2.1.1", + "@10up/eslint-config": "^4.0.0", + "@10up/stylelint-config": "^3.0.0", "@linaria/webpack-loader": ">=4.1.11", "@linaria/babel-preset": ">=4.3.3" }, diff --git a/projects/10up-theme/assets/css/frontend/style.css b/projects/10up-theme/assets/css/frontend/style.css index 017b6e22..779be8e2 100755 --- a/projects/10up-theme/assets/css/frontend/style.css +++ b/projects/10up-theme/assets/css/frontend/style.css @@ -7,7 +7,7 @@ /* Resets - installed via NPM */ @import url("normalize.css"); -/* Global - global pieces like media queries, mixins and placholders */ +/* Global - global pieces like media queries, mixins and placeholders */ @import url("global/index.css"); /* Base - base styles such as fonts, typography, and wordpress overrides */ diff --git a/projects/10up-theme/assets/css/styleguide/styleguide.css b/projects/10up-theme/assets/css/styleguide/styleguide.css index a0988a3f..479a9df9 100644 --- a/projects/10up-theme/assets/css/styleguide/styleguide.css +++ b/projects/10up-theme/assets/css/styleguide/styleguide.css @@ -1,7 +1,7 @@ :root { --c-uikit-base: #fff; --c-uikit-accent: #767676; - --c-uikit-hightlight: #f6f6f6; + --c-uikit-highlight: #f6f6f6; --c-uikit-border: #ccc; --c-uikit-primary: #000; @@ -80,7 +80,7 @@ .uikit__icon { align-items: center; - background: var(--c-uikit-hightlight); + background: var(--c-uikit-highlight); display: flex; float: left; height: 62px; diff --git a/projects/10up-theme/includes/overrides.php b/projects/10up-theme/includes/overrides.php index 0edf9970..806b1db7 100644 --- a/projects/10up-theme/includes/overrides.php +++ b/projects/10up-theme/includes/overrides.php @@ -71,7 +71,7 @@ function disable_emojis_tinymce( $plugins ) { * * @param array $urls URLs to print for resource hints. * @param string $relation_type The relation type the URLs are printed for. - * @return array Difference betwen the two arrays. + * @return array Difference between the two arrays. */ function disable_emoji_dns_prefetch( $urls, $relation_type ) { if ( 'dns-prefetch' === $relation_type ) {