Skip to content

Commit

Permalink
Merge branch 'develop' into feature/css-entry-points
Browse files Browse the repository at this point in the history
  • Loading branch information
fabiankaegy committed Jan 29, 2024
2 parents 2e9a99d + abc5afb commit 0598487
Show file tree
Hide file tree
Showing 45 changed files with 1,120 additions and 84 deletions.
5 changes: 5 additions & 0 deletions .changeset/happy-pans-jam.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"10up-toolkit": minor
---

Feature: sourcemap option for production builds
6 changes: 6 additions & 0 deletions .changeset/mean-pens-juggle.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@10up/stylelint-config": major
---

Discourage usage of `@nest` by disallowing the at-rule.
Adding support for new way of doing nesting as per latest Nesting Spec (as implemented by browsers in 2023).
29 changes: 29 additions & 0 deletions .changeset/pre.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"mode": "pre",
"tag": "next",
"initialVersions": {
"@10up/babel-preset-default": "2.1.0",
"@10up/eslint-config": "3.1.1",
"@10up/stylelint-config": "2.0.5",
"10up-toolkit": "5.2.2",
"tenup-theme": "1.1.5-next.7",
"@10up/component-accordion": "2.1.5",
"@10up/library-ts-test": "2.1.5"
},
"changesets": [
"gentle-falcons-shop",
"good-pumas-teach",
"grumpy-experts-wait",
"happy-pans-jam",
"healthy-radios-own",
"hot-crabs-exercise",
"mean-pens-juggle",
"rare-ducks-hang",
"six-crabs-cry",
"smooth-trees-pump",
"stale-impalas-return",
"strong-actors-dream",
"tiny-toes-dream",
"tricky-ties-hang"
]
}
5 changes: 5 additions & 0 deletions .changeset/strong-actors-dream.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@10up/eslint-config": patch
---

Fix peer dep
5 changes: 5 additions & 0 deletions .changeset/tricky-ties-hang.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"10up-toolkit": patch
---

Fix: allow overriding buildfiles.config.js, filenames.config.js and paths.config.js as stated in README
10 changes: 5 additions & 5 deletions .github/workflows/npm-release-latest-version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Setup Node.js 16.x
uses: actions/setup-node@v2
- name: Setup Node.js 18.x
uses: actions/setup-node@v4
with:
node-version: 16.x
node-version: 18.x

- name: Install Dependencies
run: npm ci
Expand All @@ -35,4 +35,4 @@ jobs:
createGithubReleases: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
10 changes: 5 additions & 5 deletions .github/workflows/npm-release-next-version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Setup Node.js 16.x
uses: actions/setup-node@v2
- name: Setup Node.js 18.x
uses: actions/setup-node@v4
with:
node-version: 16.x
node-version: 18.x

- name: Install Dependencies
run: npm ci
Expand All @@ -36,4 +36,4 @@ jobs:
createGithubReleases: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
11 changes: 11 additions & 0 deletions .gitpod.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# This configuration file was automatically generated by Gitpod.
# Please adjust to your needs (see https://www.gitpod.io/docs/introduction/learn-gitpod/gitpod-yaml)
# and commit this file to your remote git repository to share the goodness with others.

# Learn more from ready-to-use templates: https://www.gitpod.io/docs/introduction/getting-started/quickstart

tasks:
- init: npm install && npm run build
command: npm run dev


6 changes: 6 additions & 0 deletions packages/babel-preset-default/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog

## 2.1.1-next.0

### Patch Changes

- 91f266f: Fix HRM (again)

## 2.1.0

### Minor Changes
Expand Down
4 changes: 2 additions & 2 deletions packages/babel-preset-default/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@10up/babel-preset-default",
"version": "2.1.0",
"version": "2.1.1-next.0",
"description": "10up's default babel preset",
"publishConfig": {
"access": "public"
Expand Down Expand Up @@ -38,7 +38,7 @@
"core-js": "^3.35.0"
},
"devDependencies": {
"@10up/eslint-config": "^3.1.1-next.0",
"@10up/eslint-config": "^4.0.0-next.0",
"@wordpress/element": "^4.20.0",
"babel-jest": "^27.5.1",
"eslint": "^8.40.0",
Expand Down
18 changes: 18 additions & 0 deletions packages/eslint-config/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,23 @@
# Changelog

## 4.0.0-next.1

### Patch Changes

- 98298cf: Fix peer dep

## 4.0.0-next.0

### Major Changes

- 47c19c9: - Bump minimum prettier version to v3.
- Removed `jsdoc/newline-after-description` eslint rule since it has been removed from the `eslint-plugin-jsdoc`.

### Patch Changes

- Updated dependencies [91f266f]
- @10up/babel-preset-default@2.1.1-next.0

## 3.1.1

### Patch Changes
Expand Down
6 changes: 3 additions & 3 deletions packages/eslint-config/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@10up/eslint-config",
"version": "3.1.1",
"version": "4.0.0-next.1",
"description": "A shareable ESLint configuration",
"publishConfig": {
"access": "public"
Expand Down Expand Up @@ -38,7 +38,7 @@
"10up"
],
"dependencies": {
"@10up/babel-preset-default": "^2.1.0"
"@10up/babel-preset-default": "^2.1.1-next.0"
},
"devDependencies": {
"@wordpress/eslint-plugin": "^14.9.0",
Expand All @@ -52,7 +52,7 @@
"@babel/core": "^7.23.7",
"@babel/eslint-parser": "^7.23.3",
"@wordpress/eslint-plugin": "^17.5.0",
"eslint": "^>=8.0.0",
"eslint": ">=8.0.0",
"eslint-config-airbnb": "^19.0.4",
"eslint-config-airbnb-base": "^15.0.0",
"eslint-config-prettier": "^9.1.0",
Expand Down
8 changes: 8 additions & 0 deletions packages/stylelint-config/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog

## 3.0.0-next.0

### Major Changes

- ea9ca67: Discourage usage of `@nest` by disallowing the at-rule.
Adding support for new way of doing nesting as per latest Nesting Spec (as implemented by browsers in 2023).
- 3fce625: Upgrading `stylelint` to version `15.0.0` and decouple from `@wordpress/stylelint-config`.

## 2.0.5

### Patch Changes
Expand Down
3 changes: 2 additions & 1 deletion packages/stylelint-config/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ module.exports = {
extends: ['stylelint-config-recommended'],
plugins: ['stylelint-stylistic', 'stylelint-declaration-strict-value', 'stylelint-order'],
rules: {
'at-rule-disallowed-list': ['nest'],
'at-rule-empty-line-before': [
'always',
{
Expand Down Expand Up @@ -77,7 +78,7 @@ module.exports = {
'Selector should use lowercase and separate words with hyphens (selector-id-pattern)',
},
],
'selector-nested-pattern': ['^&'],
'selector-nested-pattern': '^&|\\s&$',
'selector-pseudo-element-colon-notation': 'double',
'selector-type-case': 'lower',
'stylistic/at-rule-name-case': 'lower',
Expand Down
4 changes: 2 additions & 2 deletions packages/stylelint-config/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@10up/stylelint-config",
"version": "2.0.5",
"version": "3.0.0-next.0",
"description": "10up stylelint config for WordPress projects",
"main": "index.js",
"homepage": "https://github.com/10up/10up-toolkit/tree/develop/packages/stylelint-config#readme",
Expand Down Expand Up @@ -41,7 +41,7 @@
"node": "^16.0.0 || ^18.0.0 || ^20.0.0"
},
"devDependencies": {
"@10up/eslint-config": "^3.1.1"
"@10up/eslint-config": "^4.0.0-next.0"
},
"peerDependencies": {
"stylelint": "^15.0.0"
Expand Down
39 changes: 39 additions & 0 deletions packages/toolkit/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,44 @@
# Changelog

## 6.0.0-next.0

### Major Changes

- 71460c9: update default value of `useBlockAssets` to true. If you are not ready for it yet. Set `useBlockAssets` to false in your 10up-toolkit `package.json` config.

```json
{
"name": "your-project",
"10up-toolkit": {
"useBlockAssets": false
}
}
```

- 091bb26: Update postcss-preset-env to ^9.0.0 from ^7.0.0
Swap postcss-editor-styles with postcss-editor-styles-wrapper which is compatible with PostCSS 8
- e6c5140: Update linaria to next major and fix an issue with react-refresh plugin. Also drops support for node 14.

### Minor Changes

- e29ee64: Feature: sourcemap option for production builds
- 0c969ef: Add support to configure Webpack's publicPath

### Patch Changes

- 08f7c78: Add `.local` to the default list of supported domains.
- 6c8dbb5: Update dependencies
- 91f266f: Fix HRM (again)
- 5a8f979: Stop using react fast refresh fork in favor of the upstream package
- 01ade56: Fix: allow overriding buildfiles.config.js, filenames.config.js and paths.config.js as stated in README
- Updated dependencies [91f266f]
- Updated dependencies [ea9ca67]
- Updated dependencies [47c19c9]
- Updated dependencies [3fce625]
- @10up/babel-preset-default@2.1.1-next.0
- @10up/stylelint-config@3.0.0-next.0
- @10up/eslint-config@4.0.0-next.0

## 5.2.2

### Patch Changes
Expand Down
42 changes: 36 additions & 6 deletions packages/toolkit/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -290,15 +290,15 @@ In some setups (such as Laravel Valet), Websocket SSL connections will fail unle

If you aren't already customizing webpack in your project, create a new `webpack.config.js` file in the root of your project/theme. You need to specify the cert, key, and ca properties for the config.devServer.https object.

```
```js
const config = require('10up-toolkit/config/webpack.config.js');
const fs = require('fs')
const fs = require('fs');

// Customize this to the appropriate path to your certificate folder
const certPath = '/Users/youruser/.config/valet'
const certPath = '/Users/youruser/.config/valet';

// Check if devServer is in use and if so, modify the cert files used
if( typeof config.devServer === 'object ) {
if( typeof config.devServer === 'object' ) {
config.devServer.https = {
key: fs.readFileSync(`${certPath}/Certificates/yoursite.test.key`),
cert: fs.readFileSync(`${certPath}/Certificates/yoursite.test.crt`),
Expand Down Expand Up @@ -335,7 +335,7 @@ module.exports = (api) => {
};
```

- If your're getting SSL errors for the Websocket connection, you may need to explicitly tell webpack what certificate files to use. See the above section "HTTPS and Certificates"
- If you're getting SSL errors for the Websocket connection, you may need to explicitly tell webpack what certificate files to use. See the above section "HTTPS and Certificates"

## <a id="linting"></a> Linting

Expand Down Expand Up @@ -692,9 +692,39 @@ See [SVGO Configuration](https://github.com/svg/svgo#configuration) for more inf

10up-toolkit supports several CLI options that can be used to override settings.

### Production Sourcemaps
> This option was added in 10up-toolkit v6.
All development builds ship source maps by default, if you wish to ship source maps to production builds you can use the `--sourcemap` cli flag to force the generation of source maps even in production builds.
Alternatively, you can set this up in `package.json`.

```json
{
"name": "tenup-theme",
"version": "1.0.0",
"scripts": {
"start": "10up-toolkit build --watch",
"build": "10up-toolkit build",
"format-js": "10up-toolkit format-js",
"lint-js": "10up-toolkit lint-js",
"lint-style": "10up-toolkit lint-style",
"test": "10up-toolkit test-unit-jest"
},
"devDependencies": {
"10up-toolkit": "^6.0.0"
},
"10up-toolkit": {
"sourcemap": true,
"entry": {
"admin": "./assets/js/admin/admin.js"
}
}
}
```

### Bundle Analyzer

10up-toolkit ships with `webpack-bundle-analyzer` out of the box, and you can enable it by simple passing the `--analyze` option.
10up-toolkit ships with `webpack-bundle-analyzer` out of the box, and you can enable it by simply passing the `--analyze` option.

`10up-toolkit build --analyze`

Expand Down
Loading

0 comments on commit 0598487

Please sign in to comment.