Skip to content

Commit 6f7d229

Browse files
authored
Merge branch 'master' into fix/swPathNormalization
2 parents e9abbf4 + 0d59077 commit 6f7d229

File tree

17 files changed

+5317
-4927
lines changed

17 files changed

+5317
-4927
lines changed

.github/workflows/release.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,11 @@ jobs:
2424
- name: Install Dependencies
2525
run: yarn
2626

27-
- name: Create Release Pull Request
27+
- name: Create Release Pull Request or Publish to npm
2828
uses: changesets/action@master
29+
with:
30+
# This expects you to have a script called release which does a build for your packages and calls changeset publish
31+
publish: yarn release
2932
env:
3033
GITHUB_TOKEN: ${{ secrets.REPO_SCOPED_TOKEN }}
34+
NPM_TOKEN: ${{ secrets.PREACT_NPM_TOKEN }}

.husky/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
_

.husky/pre-commit

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/bin/sh
2+
. "$(dirname "$0")/_/husky.sh"
3+
4+
npx --no-install lint-staged

.prettierignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@
22
**/tests/output
33
**/package.json
44
**/*.ejs
5+
.changeset/*.md

package.json

Lines changed: 13 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -9,29 +9,26 @@
99
"prettier": "prettier --write **/*.{js,ts,tsx,json,css,scss,md,yml}",
1010
"lint": "eslint .",
1111
"changeset": "changeset",
12-
"release": "ncp README.md packages/cli/README.md && changeset publish && rimraf packages/cli/README.md"
12+
"release": "ncp README.md packages/cli/README.md && changeset publish && rimraf packages/cli/README.md",
13+
"prepare": "husky install"
1314
},
15+
"dependencies": {},
1416
"devDependencies": {
15-
"@changesets/changelog-github": "^0.2.7",
16-
"@changesets/cli": "^2.10.2",
17+
"@changesets/changelog-github": "^0.4.0",
18+
"@changesets/cli": "^2.16.0",
1719
"babel-eslint": "^10.0.1",
18-
"eslint": "^7.12.1",
19-
"eslint-config-prettier": "^6.15.0",
20+
"eslint": "^7.24.0",
21+
"eslint-config-prettier": "^8.2.0",
2022
"eslint-plugin-babel": "^5.3.0",
21-
"eslint-plugin-prettier": "^3.1.0",
22-
"eslint-plugin-react": "^7.21.5",
23-
"husky": "^4.3.0",
24-
"lerna": "^3.16.4",
25-
"lint-staged": "^10.5.0",
23+
"eslint-plugin-prettier": "^3.4.0",
24+
"eslint-plugin-react": "^7.23.2",
25+
"husky": "^6.0.0",
26+
"lerna": "^4.0.0",
27+
"lint-staged": "^11.0.0",
2628
"ncp": "^2.0.0",
27-
"prettier": "^2.1.2",
29+
"prettier": "^2.2.1",
2830
"rimraf": "^3.0.2"
2931
},
30-
"husky": {
31-
"hooks": {
32-
"pre-commit": "lint-staged"
33-
}
34-
},
3532
"lint-staged": {
3633
"*.js": [
3734
"eslint --fix",

packages/async-loader/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"node": ">=8"
1414
},
1515
"dependencies": {
16-
"kleur": "^4.0.2",
16+
"kleur": "^4.1.4",
1717
"loader-utils": "^2.0.0"
1818
},
1919
"peerDependencies": {

packages/cli/CHANGELOG.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,23 @@
11
# preact-cli
22

3+
## 3.2.2
4+
5+
### Patch Changes
6+
7+
- [#1568](https://github.com/preactjs/preact-cli/pull/1568) [`bc6d5f6`](https://github.com/preactjs/preact-cli/commit/bc6d5f6e87e9cd5dc652d7e294fff150b7068c4d) Thanks [@rschristian](https://github.com/rschristian)! - Fixes breaking change to the getLoadersByName config helper
8+
9+
## 3.2.1
10+
11+
### Patch Changes
12+
13+
- [#1567](https://github.com/preactjs/preact-cli/pull/1567) [`971e633`](https://github.com/preactjs/preact-cli/commit/971e6335ddd20e8cc0233607c47942831e31f4cb) Thanks [@rschristian](https://github.com/rschristian)! - Reverts update to fork-ts-checker-webpack-plugin
14+
15+
## 3.2.0
16+
17+
### Minor Changes
18+
19+
- [#1465](https://github.com/preactjs/preact-cli/pull/1465) [`3a11043`](https://github.com/preactjs/preact-cli/commit/3a11043f89deee09bc41947677e1a3a58b4ee1bf) Thanks [@ForsakenHarmony](https://github.com/ForsakenHarmony)! - chore: update dependencies
20+
321
## 3.1.0
422

523
### Minor Changes

packages/cli/jest.config.js

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
/*
2+
* For a detailed explanation regarding each configuration property, visit:
3+
* https://jestjs.io/docs/configuration
4+
*/
5+
6+
module.exports = {
7+
// All imported modules in your tests should be mocked automatically
8+
automock: false,
9+
10+
// Stop running tests after `n` failures
11+
bail: 0,
12+
13+
// Automatically clear mock calls and instances between every test
14+
clearMocks: true,
15+
16+
// An array of regexp pattern strings, matched against all module paths before considered 'visible' to the module loader
17+
modulePathIgnorePatterns: [
18+
'<rootDir>/tests/output',
19+
'<rootDir>/tests/subjects',
20+
],
21+
22+
// A list of paths to modules that run some code to configure or set up the testing framework before each test
23+
setupFilesAfterEnv: ['<rootDir>/tests/setup.js'],
24+
25+
// An array of regexp pattern strings that are matched against all test paths, matched tests are skipped
26+
testPathIgnorePatterns: [
27+
'\\\\node_modules\\\\',
28+
'<rootDir>/tests/output',
29+
'<rootDir>/tests/subjects',
30+
],
31+
32+
// This option allows use of a custom test runner
33+
// testRunner: "jest-circus/runner",
34+
};

packages/cli/lib/lib/webpack/transform-config.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,9 @@ class WebpackConfigHelpers {
235235
)
236236
.reduce((arr, loaders) => arr.concat(loaders), [])
237237
.filter(
238-
({ loader }) => loader === name || (loader && loader.loader === name)
238+
({ loader }) =>
239+
(typeof loader === 'string' && loader.includes(name)) ||
240+
(typeof loader.loader === 'string' && loader.loader.includes(name))
239241
);
240242
}
241243

packages/cli/lib/lib/webpack/webpack-base-config.js

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ function getSassConfiguration(...includePaths) {
7070
return config;
7171
}
7272

73-
module.exports = function (env) {
73+
module.exports = function createBaseConfig(env) {
7474
const { cwd, isProd, isWatch, src, source } = env;
7575
const babelConfigFile = env.babelConfig || '.babelrc';
7676
const IS_SOURCE_PREACT_X_OR_ABOVE = isInstalledVersionPreactXOrAbove(cwd);
@@ -260,9 +260,10 @@ module.exports = function (env) {
260260
{
261261
loader: require.resolve('postcss-loader'),
262262
options: {
263-
ident: 'postcss',
264263
sourceMap: true,
265-
plugins: postcssPlugins,
264+
postcssOptions: {
265+
plugins: postcssPlugins,
266+
},
266267
},
267268
},
268269
],
@@ -284,9 +285,10 @@ module.exports = function (env) {
284285
{
285286
loader: require.resolve('postcss-loader'),
286287
options: {
287-
ident: 'postcss',
288288
sourceMap: true,
289-
plugins: postcssPlugins,
289+
postcssOptions: {
290+
plugins: postcssPlugins,
291+
},
290292
},
291293
},
292294
],

0 commit comments

Comments
 (0)