Skip to content

Commit

Permalink
chore: update deps (#287)
Browse files Browse the repository at this point in the history
  • Loading branch information
nicholasio committed May 16, 2023
1 parent 661b0cf commit f3122e4
Show file tree
Hide file tree
Showing 14 changed files with 4,221 additions and 2,612 deletions.
7 changes: 7 additions & 0 deletions .changeset/new-olives-sniff.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
"@10up/babel-preset-default": minor
"@10up/eslint-config": minor
"10up-toolkit": minor
---

Updating several dependencies
5 changes: 5 additions & 0 deletions .changeset/sixty-steaks-learn.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"10up-toolkit": patch
---

Better error messages when svg parsing fails
6,629 changes: 4,107 additions & 2,522 deletions package-lock.json

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ Object.defineProperty(exports, \\"__esModule\\", {
exports.default = void 0;
var _react = require(\\"react\\");
// eslint-disable-line import/no-extraneous-dependencies
// eslint-disable-line import/no-extraneous-dependencies
const FCComponent = ({
title,
Expand Down Expand Up @@ -121,7 +122,7 @@ Object.defineProperty(exports, \\"__esModule\\", {
exports.default = void 0;
var _react = require(\\"react\\");
var _propTypes = _interopRequireDefault(require(\\"prop-types\\"));
var _jsxFileName = \\"\\";
var _jsxFileName = \\"\\"; // eslint-disable-line import/no-extraneous-dependencies
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
// eslint-disable-line import/no-extraneous-dependencies
Expand Down Expand Up @@ -247,6 +248,7 @@ exports.default = void 0;
var _element = require(\\"@wordpress/element\\");
var _react = require(\\"react\\");
// eslint-disable-line import/no-extraneous-dependencies
// eslint-disable-line import/no-extraneous-dependencies
const FCComponent = ({
title,
Expand Down Expand Up @@ -289,6 +291,7 @@ Object.defineProperty(exports, \\"__esModule\\", {
exports.default = void 0;
var _react = require(\\"react\\");
// eslint-disable-line import/no-extraneous-dependencies
// eslint-disable-line import/no-extraneous-dependencies
const FCComponent = ({
title,
Expand Down Expand Up @@ -332,6 +335,7 @@ exports.default = void 0;
var _element = require(\\"@wordpress/element\\");
var _react = require(\\"react\\");
// eslint-disable-line import/no-extraneous-dependencies
// eslint-disable-line import/no-extraneous-dependencies
const FCComponent = ({
title,
Expand Down
26 changes: 13 additions & 13 deletions packages/babel-preset-default/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,22 +26,22 @@
},
"homepage": "https://github.com/10up/10up-toolkit/tree/develop/packages/babel-preset-default#readme",
"dependencies": {
"@babel/core": "^7.16.0",
"@babel/helper-plugin-utils": "^7.14.5",
"@babel/plugin-transform-react-jsx": "7.16.0",
"@babel/preset-env": "^7.16.4",
"@babel/preset-react": "^7.16.0",
"@babel/preset-typescript": "^7.16.0",
"@babel/runtime": "^7.16.3",
"@wordpress/babel-plugin-import-jsx-pragma": "^3.1.0",
"@babel/core": "^7.21.8",
"@babel/helper-plugin-utils": "^7.21.5",
"@babel/plugin-transform-react-jsx": "^7.21.5",
"@babel/preset-env": "^7.21.5",
"@babel/preset-react": "^7.18.6",
"@babel/preset-typescript": "^7.21.5",
"@babel/runtime": "^7.21.5",
"@wordpress/babel-plugin-import-jsx-pragma": "^4.16.0",
"babel-plugin-transform-react-remove-prop-types": "^0.4.24",
"core-js": "^3.19.1"
"core-js": "^3.30.2"
},
"devDependencies": {
"@10up/eslint-config": "^3.0.0",
"@wordpress/element": "^4.0.4",
"babel-jest": "^27.3.1",
"eslint": "^8.0.0",
"jest": "^27.3.1"
"@wordpress/element": "^4.20.0",
"babel-jest": "^27.5.1",
"eslint": "^8.40.0",
"jest": "^27.5.1"
}
}
8 changes: 4 additions & 4 deletions packages/eslint-config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,23 +41,23 @@
"@10up/babel-preset-default": "^2.0.4"
},
"devDependencies": {
"eslint": "^8.0.0",
"eslint": "^8.40.0",
"prettier": "^2.4.1"
},
"engines": {
"node": "^16 || >=18"
},
"peerDependencies": {
"@babel/core": "^7.20.12",
"@babel/eslint-parser": "^7.19.1",
"@babel/core": "^7.21.4",
"@babel/eslint-parser": "^7.21.3",
"@wordpress/eslint-plugin": "^13.10.0",
"eslint": "^7.32.0 || ^8.0.0",
"eslint-config-airbnb": "^19.0.4",
"eslint-config-airbnb-base": "^15.0.0",
"eslint-config-prettier": "^8.6.0",
"eslint-plugin-import": "^2.27.5",
"eslint-plugin-jest": "^27.2.1",
"eslint-plugin-jsdoc": "^39.8.0",
"eslint-plugin-jsdoc": "^39.9.1",
"eslint-plugin-jsx-a11y": "^6.7.1",
"eslint-plugin-prettier": "^4.2.1",
"eslint-plugin-react": "^7.32.2",
Expand Down
4 changes: 2 additions & 2 deletions packages/stylelint-config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@
"stylelint": "^14.0.0"
},
"dependencies": {
"@wordpress/stylelint-config": "^20.0.2",
"stylelint-declaration-strict-value": "^1.8.0",
"@wordpress/stylelint-config": "^20.0.3",
"stylelint-declaration-strict-value": "^1.9.2",
"stylelint-order": "^5.0.0"
}
}
12 changes: 8 additions & 4 deletions packages/toolkit/__tests__/build-project/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,11 @@ import fs from 'fs';
import path from 'path';

describe('build a project (without useBlockAssets)', () => {
beforeAll(() => {
it('builds and compiles js and css', async () => {
spawn.sync('node', ['../../scripts/build'], {
cwd: __dirname,
});
});

it('builds and compiles js and css', async () => {
expect(fs.existsSync(path.join(__dirname, 'dist', 'js', 'admin.js'))).toBeTruthy();
expect(fs.existsSync(path.join(__dirname, 'dist', 'js', 'admin.asset.php'))).toBeTruthy();
expect(fs.existsSync(path.join(__dirname, 'dist', 'js', 'frontend.js'))).toBeTruthy();
Expand All @@ -24,6 +22,9 @@ describe('build a project (without useBlockAssets)', () => {
});

it('adds react dependencies to .asset.php files', () => {
spawn.sync('node', ['../../scripts/build'], {
cwd: __dirname,
});
const frontendAssetPHP = fs
.readFileSync(path.join(__dirname, 'dist', 'js', 'frontend.asset.php'))
.toString();
Expand All @@ -34,6 +35,9 @@ describe('build a project (without useBlockAssets)', () => {
});

it('extracts css imported in js files', () => {
spawn.sync('node', ['../../scripts/build'], {
cwd: __dirname,
});
// chunk name for css imported in js matches the js entry point
expect(fs.existsSync(path.join(__dirname, 'dist', 'css', 'admin.css'))).toBeTruthy();

Expand All @@ -51,7 +55,7 @@ describe('build a project (without useBlockAssets)', () => {
fs.existsSync(path.join(__dirname, 'dist', 'blocks', 'example-block', 'editor.js')),
).toBeTruthy();

// css is eing imported from editor.js so its name should be editor.css
// css is being imported from editor.js so its name should be editor.css
expect(
fs.existsSync(path.join(__dirname, 'dist', 'blocks', 'example-block', 'editor.css')),
).toBeTruthy();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ exports[`postcss transforms accordion.css properly 1`] = `
padding: 10px 0 10px 20px;
position: relative;
text-align: left;
width: 100%
width: 100%;
}
.accordion-header:before {
content: \\"+\\";
Expand All @@ -217,7 +217,7 @@ exports[`postcss transforms accordion.css properly 1`] = `
}
.js .accordion-content {
display: none;
visibility: hidden
visibility: hidden;
}
.js .accordion-content.is-active {
border-bottom: 1px solid #303030;
Expand All @@ -244,7 +244,7 @@ img::before {

exports[`postcss transforms nesting.css properly 1`] = `
"a, b {
color: red
color: red;
}
a c, b c, a d, b d {
color: white;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -171,9 +171,9 @@ Object {
"maxEntrypointSize": 40960000,
},
"plugins": Array [
ESLintWebpackPlugin: {"extensions":"js","emitError":true,"emitWarning":true,"failOnError":false,"fix":false,"lintDirtyModulesOnly":true},
ESLintWebpackPlugin: {"extensions":"js","emitError":true,"emitWarning":true,"failOnError":false,"resourceQueryExclude":[],"fix":false,"lintDirtyModulesOnly":true},
MiniCssExtractPlugin: {"ignoreOrder":false,"runtime":true,"chunkFilename":"[id].css"},
StylelintWebpackPlugin: {"extensions":["css","scss","sass"],"emitError":true,"emitWarning":true,"failOnError":false,"context":"/assets","files":"**/*.(s(c|a)ss|css)","allowEmptyInput":true,"lintDirtyModulesOnly":true},
StylelintWebpackPlugin: {"cache":true,"cacheLocation":"node_modules/.cache/stylelint-webpack-plugin/.stylelintcache","extensions":["css","scss","sass"],"emitError":true,"emitWarning":true,"failOnError":false,"context":"/assets","files":"**/*.(s(c|a)ss|css)","allowEmptyInput":true,"lintDirtyModulesOnly":true},
WebpackBarPlugin: {"name":"webpack","color":"green","reporters":["basic"],"reporter":null},
CleanExtractedDeps: {},
WebpackRemoveEmptyScriptsPlugin: {"enabled":true,"verbose":false,"extensions":{},"ignore":[],"remove":{}},
Expand Down Expand Up @@ -378,10 +378,10 @@ Object {
"maxEntrypointSize": 40960000,
},
"plugins": Array [
ESLintWebpackPlugin: {"extensions":"js","emitError":true,"emitWarning":true,"failOnError":false,"fix":false,"lintDirtyModulesOnly":true},
ESLintWebpackPlugin: {"extensions":"js","emitError":true,"emitWarning":true,"failOnError":false,"resourceQueryExclude":[],"fix":false,"lintDirtyModulesOnly":true},
MiniCssExtractPlugin: {"ignoreOrder":false,"runtime":true,"chunkFilename":"[id].css"},
CopyPlugin: {},
StylelintWebpackPlugin: {"extensions":["css","scss","sass"],"emitError":true,"emitWarning":true,"failOnError":false,"context":"/assets2","files":"**/*.(s(c|a)ss|css)","allowEmptyInput":true,"lintDirtyModulesOnly":true},
StylelintWebpackPlugin: {"cache":true,"cacheLocation":"node_modules/.cache/stylelint-webpack-plugin/.stylelintcache","extensions":["css","scss","sass"],"emitError":true,"emitWarning":true,"failOnError":false,"context":"/assets2","files":"**/*.(s(c|a)ss|css)","allowEmptyInput":true,"lintDirtyModulesOnly":true},
WebpackBarPlugin: {"name":"webpack","color":"green","reporters":["basic"],"reporter":null},
DependencyExtractionWebpackPlugin: {"combineAssets":false,"combinedOutputFile":null,"externalizedReport":false,"injectPolyfill":false,"outputFormat":"php","outputFilename":null,"useDefaults":true},
CleanExtractedDeps: {},
Expand Down Expand Up @@ -682,9 +682,9 @@ Object {
"maxEntrypointSize": 40960000,
},
"plugins": Array [
ESLintWebpackPlugin: {"extensions":"js","emitError":true,"emitWarning":true,"failOnError":false,"fix":false,"lintDirtyModulesOnly":true},
ESLintWebpackPlugin: {"extensions":"js","emitError":true,"emitWarning":true,"failOnError":false,"resourceQueryExclude":[],"fix":false,"lintDirtyModulesOnly":true},
MiniCssExtractPlugin: {"ignoreOrder":false,"runtime":true,"chunkFilename":"[id].css"},
StylelintWebpackPlugin: {"extensions":["css","scss","sass"],"emitError":true,"emitWarning":true,"failOnError":false,"context":"/assets","files":"**/*.(s(c|a)ss|css)","allowEmptyInput":true,"lintDirtyModulesOnly":true,"configFile":"/config/stylelint.config.js"},
StylelintWebpackPlugin: {"cache":true,"cacheLocation":"node_modules/.cache/stylelint-webpack-plugin/.stylelintcache","extensions":["css","scss","sass"],"emitError":true,"emitWarning":true,"failOnError":false,"context":"/assets","files":"**/*.(s(c|a)ss|css)","allowEmptyInput":true,"lintDirtyModulesOnly":true,"configFile":"/config/stylelint.config.js"},
WebpackBarPlugin: {"name":"webpack","color":"green","reporters":["basic"],"reporter":null},
CleanExtractedDeps: {},
WebpackRemoveEmptyScriptsPlugin: {"enabled":true,"verbose":false,"extensions":{},"ignore":[],"remove":{}},
Expand Down Expand Up @@ -984,9 +984,9 @@ Object {
"maxEntrypointSize": 40960000,
},
"plugins": Array [
ESLintWebpackPlugin: {"extensions":"js","emitError":true,"emitWarning":true,"failOnError":false,"fix":false,"lintDirtyModulesOnly":true},
ESLintWebpackPlugin: {"extensions":"js","emitError":true,"emitWarning":true,"failOnError":false,"resourceQueryExclude":[],"fix":false,"lintDirtyModulesOnly":true},
MiniCssExtractPlugin: {"ignoreOrder":false,"runtime":true,"chunkFilename":"[id].css"},
StylelintWebpackPlugin: {"extensions":["css","scss","sass"],"emitError":true,"emitWarning":true,"failOnError":false,"context":"/assets","files":"**/*.(s(c|a)ss|css)","allowEmptyInput":true,"lintDirtyModulesOnly":true,"configFile":"/config/stylelint.config.js"},
StylelintWebpackPlugin: {"cache":true,"cacheLocation":"node_modules/.cache/stylelint-webpack-plugin/.stylelintcache","extensions":["css","scss","sass"],"emitError":true,"emitWarning":true,"failOnError":false,"context":"/assets","files":"**/*.(s(c|a)ss|css)","allowEmptyInput":true,"lintDirtyModulesOnly":true,"configFile":"/config/stylelint.config.js"},
WebpackBarPlugin: {"name":"webpack","color":"green","reporters":["basic"],"reporter":null},
CleanExtractedDeps: {},
WebpackRemoveEmptyScriptsPlugin: {"enabled":true,"verbose":false,"extensions":{},"ignore":[],"remove":{}},
Expand Down Expand Up @@ -1287,9 +1287,9 @@ Object {
"maxEntrypointSize": 40960000,
},
"plugins": Array [
ESLintWebpackPlugin: {"extensions":"js","emitError":true,"emitWarning":true,"failOnError":false,"fix":false,"lintDirtyModulesOnly":true},
ESLintWebpackPlugin: {"extensions":"js","emitError":true,"emitWarning":true,"failOnError":false,"resourceQueryExclude":[],"fix":false,"lintDirtyModulesOnly":true},
MiniCssExtractPlugin: {"ignoreOrder":false,"runtime":true,"chunkFilename":"[id].css"},
StylelintWebpackPlugin: {"extensions":["css","scss","sass"],"emitError":true,"emitWarning":true,"failOnError":false,"context":"/assets","files":"**/*.(s(c|a)ss|css)","allowEmptyInput":true,"lintDirtyModulesOnly":true,"configFile":"/config/stylelint.config.js"},
StylelintWebpackPlugin: {"cache":true,"cacheLocation":"node_modules/.cache/stylelint-webpack-plugin/.stylelintcache","extensions":["css","scss","sass"],"emitError":true,"emitWarning":true,"failOnError":false,"context":"/assets","files":"**/*.(s(c|a)ss|css)","allowEmptyInput":true,"lintDirtyModulesOnly":true,"configFile":"/config/stylelint.config.js"},
WebpackBarPlugin: {"name":"webpack","color":"green","reporters":["basic"],"reporter":null},
CleanExtractedDeps: {},
WebpackRemoveEmptyScriptsPlugin: {"enabled":true,"verbose":false,"extensions":{},"ignore":[],"remove":{}},
Expand Down Expand Up @@ -1593,11 +1593,11 @@ Object {
"maxEntrypointSize": 40960000,
},
"plugins": Array [
ESLintWebpackPlugin: {"extensions":"js","emitError":true,"emitWarning":true,"failOnError":false,"fix":false,"lintDirtyModulesOnly":true},
ESLintWebpackPlugin: {"extensions":"js","emitError":true,"emitWarning":true,"failOnError":false,"resourceQueryExclude":[],"fix":false,"lintDirtyModulesOnly":true},
MiniCssExtractPlugin: {"ignoreOrder":false,"runtime":true,"chunkFilename":"[id].css"},
CopyPlugin: {},
NoBrowserSyncPlugin: {},
StylelintWebpackPlugin: {"extensions":["css","scss","sass"],"emitError":true,"emitWarning":true,"failOnError":false,"context":"/assets2","files":"**/*.(s(c|a)ss|css)","allowEmptyInput":true,"lintDirtyModulesOnly":true,"configFile":"/config/stylelint.config.js"},
StylelintWebpackPlugin: {"cache":true,"cacheLocation":"node_modules/.cache/stylelint-webpack-plugin/.stylelintcache","extensions":["css","scss","sass"],"emitError":true,"emitWarning":true,"failOnError":false,"context":"/assets2","files":"**/*.(s(c|a)ss|css)","allowEmptyInput":true,"lintDirtyModulesOnly":true,"configFile":"/config/stylelint.config.js"},
WebpackBarPlugin: {"name":"webpack","color":"green","reporters":["basic"],"reporter":null},
DependencyExtractionWebpackPlugin: {"combineAssets":false,"combinedOutputFile":null,"externalizedReport":false,"injectPolyfill":false,"outputFormat":"php","outputFilename":null,"useDefaults":true},
CleanExtractedDeps: {},
Expand Down

0 comments on commit f3122e4

Please sign in to comment.