-
Notifications
You must be signed in to change notification settings - Fork 802
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/trunk' into renovate/mediawiki-m…
…ediawiki-codesniffer-44.x
- Loading branch information
Showing
59 changed files
with
501 additions
and
458 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
/vendor | ||
/node_modules | ||
/build-node | ||
/build-browser | ||
/build | ||
/tests/build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 0 additions & 4 deletions
4
projects/js-packages/critical-css-gen/changelog/fix-xss-vulnerability
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
{ | ||
"type": "module", | ||
"name": "@automattic/jetpack-critical-css-gen", | ||
"version": "0.1.0", | ||
"version": "1.0.0", | ||
"description": "A flexible Critical CSS Generator that supports multiple URLs and viewports, with both server-side and client-side generation capabilities.", | ||
"homepage": "https://github.com/Automattic/jetpack/tree/HEAD/projects/js-packages/critical-css-gen/#readme", | ||
"bugs": { | ||
|
@@ -15,48 +15,46 @@ | |
"license": "GPL-2.0-or-later", | ||
"author": "Automattic", | ||
"scripts": { | ||
"build:browser": "rollup -c", | ||
"build:node": "tsc", | ||
"build": "pnpm run clean && pnpm run build:browser && pnpm run build:node", | ||
"clean": "rm -rf build-node/ && rm -rf build-browser/", | ||
"test": "pnpm build && NODE_ENV=test NODE_PATH=./node_modules jest --forceExit --config=tests/config/jest.config.js" | ||
"build": "pnpm run clean && tsc", | ||
"build:test": "pnpm run clean:test && webpack --config tests/data/webpack.config.cjs", | ||
"clean": "rm -rf build/", | ||
"clean:test": "rm -rf tests/build/", | ||
"test": "pnpm build && pnpm build:test && NODE_ENV=test NODE_PATH=./node_modules jest --forceExit --config=tests/config/jest.config.js" | ||
}, | ||
"main": "./build-node/node.js", | ||
"browser": "./build-browser/bundle.js", | ||
"main": "./build/browser.js", | ||
"devDependencies": { | ||
"@automattic/jetpack-webpack-config": "workspace:*", | ||
"@babel/core": "7.24.7", | ||
"@babel/preset-env": "7.24.7", | ||
"@babel/preset-typescript": "7.24.7", | ||
"@rollup/plugin-commonjs": "26.0.1", | ||
"@rollup/plugin-json": "6.1.0", | ||
"@rollup/plugin-node-resolve": "15.3.0", | ||
"@rollup/plugin-terser": "0.4.3", | ||
"@rollup/plugin-typescript": "12.1.0", | ||
"@types/clean-css": "4.2.11", | ||
"@types/css-tree": "2.3.8", | ||
"@types/node": "^20.4.2", | ||
"express": "4.20.0", | ||
"jest": "29.7.0", | ||
"path-browserify": "1.0.1", | ||
"playwright": "1.45.1", | ||
"playwright-core": "^1.45.1", | ||
"prettier": "npm:[email protected]", | ||
"rollup": "3.29.5", | ||
"rollup-plugin-polyfill-node": "0.13.0", | ||
"process": "0.11.10", | ||
"source-map": "0.7.4", | ||
"source-map-js": "1.2.0", | ||
"tslib": "2.5.0", | ||
"typescript": "5.0.4", | ||
"webpack": "5.94.0", | ||
"webpack-cli": "4.9.1", | ||
"webpack-dev-middleware": "5.3.4" | ||
}, | ||
"exports": { | ||
".": { | ||
"jetpack:src": "./src/node.ts", | ||
"types": "./build-node/node.d.ts", | ||
"browser": "./build-browser/bundle.js", | ||
"import": "./build-node/node.js", | ||
"require": "./build-node/node.js", | ||
"default": "./build-node/node.js" | ||
"jetpack:src": "./src/browser.ts", | ||
"types": "./build/browser.d.ts", | ||
"default": "./build/browser.js" | ||
}, | ||
"./playwright": { | ||
"jetpack:src": "./src/playwright.ts", | ||
"types": "./build/playwright.d.ts", | ||
"default": "./build/playwright.js" | ||
} | ||
}, | ||
"dependencies": { | ||
|
This file was deleted.
Oops, something went wrong.
File renamed without changes.
50 changes: 50 additions & 0 deletions
50
projects/js-packages/critical-css-gen/tests/data/webpack.config.cjs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
const path = require( 'path' ); | ||
const jetpackWebpackConfig = require( '@automattic/jetpack-webpack-config/webpack' ); | ||
const webpack = require( 'webpack' ); | ||
|
||
module.exports = { | ||
entry: path.join( __dirname, '../../src/browser.ts' ), | ||
mode: 'development', | ||
devtool: false, | ||
output: { | ||
...jetpackWebpackConfig.output, | ||
path: path.join( __dirname, '../build' ), | ||
filename: 'bundle.js', | ||
library: 'CriticalCSSGenerator', | ||
}, | ||
resolve: { | ||
...jetpackWebpackConfig.resolve, | ||
// These are needed for the build to work, | ||
// otherwise it errors out because of the clean-css dependency. | ||
fallback: { | ||
...jetpackWebpackConfig.resolve.fallback, | ||
path: require.resolve( 'path-browserify' ), | ||
process: require.resolve( 'process/browser' ), | ||
url: false, | ||
https: false, | ||
http: false, | ||
fs: false, | ||
os: false, | ||
}, | ||
}, | ||
node: false, | ||
plugins: [ | ||
new webpack.ProvidePlugin( { | ||
process: require.resolve( 'process/browser' ), | ||
} ), | ||
], | ||
module: { | ||
strictExportPresence: true, | ||
rules: [ | ||
// Transpile JavaScript | ||
jetpackWebpackConfig.TranspileRule( { | ||
exclude: /node_modules\//, | ||
} ), | ||
|
||
// Transpile @automattic/jetpack-* in node_modules too. | ||
jetpackWebpackConfig.TranspileRule( { | ||
includeNodeModules: [ '@automattic/jetpack-' ], | ||
} ), | ||
], | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
projects/js-packages/critical-css-gen/tests/unit/generate-critical-css.test.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 0 additions & 4 deletions
4
projects/js-packages/i18n-loader-webpack-plugin/changelog/renovate-wordpress-monorepo
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 0 additions & 4 deletions
4
projects/js-packages/webpack-config/changelog/renovate-wordpress-monorepo
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
4 changes: 4 additions & 0 deletions
4
projects/packages/connection/changelog/update-optimize-connection-admin-notice-hook
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
Significance: patch | ||
Type: changed | ||
|
||
Adjust conditions to optimize admin notices callback. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 5 additions & 0 deletions
5
projects/packages/forms/changelog/fix-phpcompatibility-new-dev-sniff
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
Significance: patch | ||
Type: changed | ||
Comment: Explicitly pass `$escape` for `fputcsv` to fix new phpcompatibility-dev sniff. Note we may want to change it once we drop PHP <7.4 compat. | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.