Skip to content

Commit

Permalink
Merge branch 'develop' into trunk
Browse files Browse the repository at this point in the history
  • Loading branch information
nicholasio committed Mar 25, 2024
2 parents f5d900c + 73a9d57 commit 283bade
Show file tree
Hide file tree
Showing 19 changed files with 60 additions and 53 deletions.
5 changes: 5 additions & 0 deletions .changeset/perfect-cats-cheat.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"10up-toolkit": patch
---

Fix peer deps
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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.
7. A new GitHub Release with the changelog will be created automatically.
42 changes: 22 additions & 20 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/babel-preset-default/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
6 changes: 3 additions & 3 deletions packages/babel-preset-default/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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

Expand Down
6 changes: 3 additions & 3 deletions packages/toolkit/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand All @@ -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)

Expand Down Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion packages/toolkit/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
6 changes: 3 additions & 3 deletions packages/toolkit/UPGRADING.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
4 changes: 2 additions & 2 deletions packages/toolkit/config/__tests__/__fixtures__/styleguide.css
Original file line number Diff line number Diff line change
@@ -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;

Expand Down Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion packages/toolkit/config/fast-refresh.php
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down
4 changes: 2 additions & 2 deletions packages/toolkit/config/webpack/__tests__/output.js
Original file line number Diff line number Diff line change
Expand Up @@ -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' },
Expand 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,
Expand Down
2 changes: 1 addition & 1 deletion packages/toolkit/config/webpack/optimization.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
},
Expand Down
2 changes: 1 addition & 1 deletion packages/toolkit/config/webpack/plugins.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
});
Expand Down
2 changes: 1 addition & 1 deletion packages/toolkit/config/webpack/plugins/no-browser-sync.js
Original file line number Diff line number Diff line change
Expand Up @@ -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.',
Expand Down
12 changes: 6 additions & 6 deletions packages/toolkit/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
},
Expand Down
2 changes: 1 addition & 1 deletion projects/10up-theme/assets/css/frontend/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down
4 changes: 2 additions & 2 deletions projects/10up-theme/assets/css/styleguide/styleguide.css
Original file line number Diff line number Diff line change
@@ -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;

Expand Down Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion projects/10up-theme/includes/overrides.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 ) {
Expand Down

0 comments on commit 283bade

Please sign in to comment.