Skip to content
Open
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
9 changes: 5 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,10 @@ jobs:
name: test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
- uses: actions/checkout@v7
- uses: pnpm/action-setup@v6
- uses: actions/setup-node@v7
with:
node-version: '22'
cache: 'yarn'
node-version: '24'
cache: 'pnpm'
- run: make check
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,4 @@
dist/
node_modules/
stats.json
yarn-error.log
pat-*
16 changes: 8 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,16 @@ export

ESLINT ?= npx eslint
PRETTIER ?= npx prettier
YARN ?= npx yarn
PNPM ?= npx pnpm

BUILDABLE := $(shell node -p "Boolean(require('./package.json').scripts?.build)")
PACKAGE_NAME := $(shell node -p "require('./package.json').name")
BUNDLE_NAME := $(subst @patternslib/,,$(subst @plone/,,$(PACKAGE_NAME)))


.PHONY: install
yarn.lock install: .git/hooks/commit-msg
$(YARN) install
pnpm-lock.yaml install: .git/hooks/commit-msg
$(PNPM) install


.git/hooks/commit-msg:
Expand Down Expand Up @@ -52,7 +52,7 @@ prettier: install

.PHONY: check
check: install eslint
$(YARN) run test
$(PNPM) run test


.PHONY: bundle-pre
Expand All @@ -61,8 +61,8 @@ bundle-pre::
@# Please use double-colons `::` so that the base bundle-pre is also run.
@# Example: Unlink any linked dependencies.
@# bundle-pre::
@# -yarn unlink @patternslib/patternslib
@# yarn install --force
@# -pnpm unlink --recursive
@# pnpm install
npx update-browserslist-db@latest


Expand All @@ -72,7 +72,7 @@ bundle-pre::
.PHONY: bundle
bundle: clean-dist bundle-pre install
ifeq ($(BUILDABLE),true)
$(YARN) run build
$(PNPM) run build
endif


Expand Down Expand Up @@ -156,7 +156,7 @@ prerelease-beta:

.PHONY: serve
serve: install
$(YARN) run start
$(PNPM) run start


upgrade:\
Expand Down
12 changes: 5 additions & 7 deletions babel.config.js
Original file line number Diff line number Diff line change
@@ -1,31 +1,29 @@
module.exports = (env) => {
module.exports = (api) => {
let config = {
presets: [
[
"@babel/preset-env",
{
useBuiltIns: "entry",
corejs: 3,
modules: "auto",
},
],
],
};

// passed via NODE_ENV=development environment variable.
if (env.env() === "development") {
if (api.env() === "development") {
// For development, do less transformations for better readability.
config = {
presets: [
[
"@babel/preset-env",
{
modules: false,
debug: true,
useBuiltIns: false,
targets: "last 1 Chrome version, last 1 Firefox version",
modules: false,
},
],
],
targets: "last 1 Chrome version, last 1 Firefox version",
};
}

Expand Down
27 changes: 14 additions & 13 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,39 +3,40 @@
"version": "4.0.2",
"description": "Development base files for working with Patternslib and add-ons.",
"license": "MIT",
"packageManager": "pnpm@12.3.4",
"dependencies": {
"@babel/core": "^7.29.0",
"@babel/preset-env": "^7.29.2",
"@commitlint/cli": "^20.5.0",
"@commitlint/config-conventional": "^20.5.0",
"@babel/core": "^8.0.1",
"@babel/preset-env": "^8.0.2",
"@commitlint/cli": "^21.2.2",
"@commitlint/config-conventional": "^21.2.2",
"@eslint/js": "^10.0.1",
"@release-it/conventional-changelog": "^10.0.6",
"@release-it/conventional-changelog": "^12.0.0",
"babel-loader": "^10.1.1",
"conventional-changelog-conventionalcommits": "^10.4.0",
"css-loader": "^7.1.4",
"eslint": "^10.2.1",
"eslint-config-prettier": "^10.1.8",
"globals": "^17.5.0",
"identity-obj-proxy": "^3.0.0",
"jest": "^30.3.0",
"jest-environment-jsdom": "^30.3.0",
"jest": "^30.5.1",
"jest-environment-jsdom": "^30.5.1",
"jest-watch-typeahead": "^3.0.1",
"prettier": "^3.8.3",
"regenerator-runtime": "^0.14.1",
"release-it": "^20.0.0",
"release-it": "^21.0.2",
"sass": "^1.99.0",
"sass-loader": "^16.0.7",
"sass-loader": "^17.0.1",
"style-loader": "^4.0.0",
"terser-webpack-plugin": "^5.4.0",
"timezone-mock": "^1.4.2",
"webpack": "^5.106.2",
"webpack-bundle-analyzer": "^5.3.0",
"webpack-cli": "^7.0.2",
"webpack-dev-server": "^5.2.3",
"whybundled": "^2.0.0",
"yarn": "^1.22.22"
"webpack-dev-server": "^6.0.0",
"whybundled": "^2.0.0"
},
"engines": {
"node": ">=22"
"node": "^22.18.0 || >=24.11.0"
},
"scripts": {
"postinstall": "cd $INIT_CWD && make upgrade || true",
Expand Down
Loading