Skip to content

Commit

Permalink
🩹 fix: browserslist updates (#1920)
Browse files Browse the repository at this point in the history
- adds a [postinstall script to `@roots/bud` which downloads latest updates](https://github.com/roots/bud/blob/50732296c4bada8dc281e48dd4245dbab0bd4234/sources/%40roots/bud/scripts/postinstall.mjs)
- this script does not run when the `process.env.npm_package_version` is `0.0.0` so it *hopefully* won't mess up CI
- removes unneeded scripts from `@roots/browserslist-config`
- bumps a bunch of deps (minor)
- cleans up a bunch of npm nags about dependencies
- adds `@roots/browserslist-config/wordpress` which is just a straight copy of wp defaults
- adds `@roots/browserslist-config/next`, which is just a straight copy of next.js defaults
 
refers:

- none

## Type of change

**PATCH: backwards compatible change**



This PR includes breaking changes to the following core packages:

- none

This PR includes breaking changes to the follow extensions:

- none

## Dependencies

### Adds

- none

### Removes

- none
  • Loading branch information
kellymears committed Dec 6, 2022
1 parent b9f1d3a commit 3fbb7bc
Show file tree
Hide file tree
Showing 75 changed files with 1,038 additions and 1,022 deletions.
2 changes: 0 additions & 2 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@ npmPublishRegistry: "https://registry.npmjs.org"
npmRegistryServer: "https://registry.npmjs.org"

plugins:
- path: .yarn/plugins/@yarnpkg/plugin-typescript.cjs
spec: "@yarnpkg/plugin-typescript"
- path: .yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs
spec: "@yarnpkg/plugin-interactive-tools"
- path: .yarn/plugins/@yarnpkg/plugin-workspace-tools.cjs
Expand Down
17 changes: 9 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,16 @@
"@repo/constants": "workspace:sources/@repo/constants",
"@repo/logger": "workspace:sources/@repo/logger",
"@repo/test-kit": "workspace:sources/@repo/test-kit",
"@roots/bud-support": "workspace:sources/@roots/bud-support",
"@skypack/package-check": "0.2.2",
"@types/express": "4.17.14",
"@types/fs-extra": "9.0.13",
"@types/node": "16.18.4",
"@typescript-eslint/eslint-plugin": "5.45.0",
"@typescript-eslint/parser": "5.45.0",
"@vitest/coverage-istanbul": "0.25.3",
"@vitest/ui": "0.25.3",
"eslint": "8.28.0",
"@types/node": "16.18.6",
"@typescript-eslint/eslint-plugin": "5.45.1",
"@typescript-eslint/parser": "5.45.1",
"@vitest/coverage-istanbul": "0.25.4",
"@vitest/ui": "0.25.4",
"eslint": "8.29.0",
"eslint-plugin-import": "2.26.0",
"eslint-plugin-react": "7.31.11",
"eslint-plugin-react-hooks": "4.6.0",
Expand All @@ -53,11 +54,11 @@
"ts-node": "10.9.1",
"tslib": "2.4.1",
"typescript": "4.9.3",
"vitest": "0.25.3",
"vitest": "0.25.4",
"webpack": "5.75.0"
},
"devDependencies": {
"@types/lodash": "^4.14.191",
"eslint-plugin-n": "15.5.1"
"eslint-plugin-n": "15.6.0"
}
}
4 changes: 2 additions & 2 deletions sources/@repo/compile-kit/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,14 @@
"@repo/logger": "workspace:sources/@repo/logger",
"@types/fs-extra": "9.0.13",
"@types/lodash-es": "4.17.6",
"@types/node": "16.18.4",
"@types/node": "16.18.6",
"@vercel/ncc": "0.34.0",
"download-package-tarball": "1.0.7",
"fs-extra": "10.1.0",
"get-package-json-from-registry": "2.2.2",
"lodash-es": "4.17.21",
"npm-package-arg": "10.1.0",
"registry-info": "1.0.0",
"vitest": "0.25.3"
"vitest": "0.25.4"
}
}
4 changes: 2 additions & 2 deletions sources/@repo/constants/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
}
},
"devDependencies": {
"@types/node": "16.18.4",
"vitest": "0.25.3"
"@types/node": "16.18.6",
"vitest": "0.25.4"
},
"volta": {
"extends": "../../../package.json"
Expand Down
4 changes: 2 additions & 2 deletions sources/@repo/docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"@repo/constants": "workspace:sources/@repo/constants",
"@svgr/webpack": "6.5.1",
"@tsconfig/docusaurus": "1.0.6",
"@types/node": "16.18.4",
"@types/node": "16.18.6",
"@types/react": "17.0.52",
"@types/react-dom": "17.0.18",
"@types/react-helmet": "6.1.6",
Expand All @@ -42,7 +42,7 @@
"dependencies": {
"@docusaurus/theme-classic": "2.2.0",
"@docusaurus/theme-common": "2.2.0",
"axios": "1.2.0",
"axios": "1.2.1",
"clsx": "1.2.1",
"docusaurus-lunr-search": "2.3.2",
"react": "17.0.2",
Expand Down
4 changes: 2 additions & 2 deletions sources/@repo/logger/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
},
"dependencies": {
"@repo/constants": "workspace:sources/@repo/constants",
"@types/node": "16.18.4",
"@types/node": "16.18.6",
"signale": "1.4.0",
"vitest": "0.25.3"
"vitest": "0.25.4"
},
"volta": {
"extends": "../../../package.json"
Expand Down
4 changes: 2 additions & 2 deletions sources/@repo/markdown-kit/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
"build": "yarn tsc -b"
},
"devDependencies": {
"@types/node": "16.18.4",
"@types/node": "16.18.6",
"@types/prettier": "2.7.1",
"vitest": "0.25.3"
"vitest": "0.25.4"
},
"dependencies": {
"@repo/constants": "workspace:sources/@repo/constants",
Expand Down
4 changes: 2 additions & 2 deletions sources/@repo/notifier/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
"name": "@repo/notifier",
"private": true,
"devDependencies": {
"@types/node": "16.18.4",
"vitest": "0.25.3"
"@types/node": "16.18.6",
"vitest": "0.25.4"
},
"volta": {
"extends": "../../../package.json"
Expand Down
4 changes: 2 additions & 2 deletions sources/@repo/test-kit/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,15 @@
"@roots/bud": "workspace:sources/@roots/bud",
"@roots/bud-support": "workspace:sources/@roots/bud-support",
"@types/fs-extra": "9.0.13",
"@types/node": "16.18.4",
"@types/node": "16.18.6",
"chalk": "5.1.2",
"execa": "6.1.0",
"fs-extra": "10.1.0",
"globby": "13.1.2",
"helpful-decorators": "2.1.0",
"json5": "2.2.1",
"tslib": "2.4.1",
"vitest": "0.25.3"
"vitest": "0.25.4"
},
"volta": {
"extends": "../../../package.json"
Expand Down
2 changes: 1 addition & 1 deletion sources/@repo/yarn-plugin-bud/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
},
"devDependencies": {
"@types/fs-extra": "9.0.13",
"@types/node": "16.18.4",
"@types/node": "16.18.6",
"@yarnpkg/builder": "3.2.6"
},
"dependencies": {
Expand Down
4 changes: 2 additions & 2 deletions sources/@repo/yarn-plugin-package/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
},
"dependencies": {
"@types/fs-extra": "9.0.13",
"@types/node": "16.18.4",
"@types/node": "16.18.6",
"@yarnpkg/builder": "3.2.6",
"@yarnpkg/cli": "3.3.0",
"@yarnpkg/core": "3.3.0",
Expand All @@ -19,7 +19,7 @@
"lodash-es": "4.17.21",
"tslib": "2.4.1",
"typescript": "4.9.3",
"vitest": "0.25.3"
"vitest": "0.25.4"
},
"volta": {
"extends": "../../../package.json"
Expand Down
25 changes: 0 additions & 25 deletions sources/@roots/browserslist-config/broad.cjs

This file was deleted.

17 changes: 0 additions & 17 deletions sources/@roots/browserslist-config/current.cjs

This file was deleted.

4 changes: 4 additions & 0 deletions sources/@roots/browserslist-config/default.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/**
* Browserslist defaults
*/
module.exports = [`defaults and supports es6-module`]
21 changes: 0 additions & 21 deletions sources/@roots/browserslist-config/index.cjs

This file was deleted.

13 changes: 13 additions & 0 deletions sources/@roots/browserslist-config/last-2-versions.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
/**
* Last 2 versions
*/
module.exports = [
`> 1%`,
`last 2 Chrome versions`,
`last 2 ChromeAndroid versions`,
`last 2 Safari versions`,
`last 2 Edge versions`,
`last 2 Opera versions`,
`last 2 Firefox versions`,
`not dead`,
]
13 changes: 13 additions & 0 deletions sources/@roots/browserslist-config/last-3-versions.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
/**
* Last 3 versions
*/
module.exports = [
`> 2%`,
`last 3 Chrome versions`,
`last 3 ChromeAndroid versions`,
`last 3 Safari versions`,
`last 3 Edge versions`,
`last 3 Opera versions`,
`last 3 Firefox versions`,
`not dead`,
]
10 changes: 10 additions & 0 deletions sources/@roots/browserslist-config/next.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
/**
* nextjs defaults
*/
module.exports = [
`chrome 64`,
`edge 79`,
`firefox 67`,
`opera 51`,
`safari 12`,
]
33 changes: 13 additions & 20 deletions sources/@roots/browserslist-config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,17 +29,23 @@
"node": ">=16"
},
"files": [
"index.cjs",
"broad.cjs",
"current.cjs"
"default.cjs",
"next.cjs",
"wordpress.cjs",
"last-2-versions.cjs",
"last-3-versions.cjs",
"scripts/"
],
"main": "./index.cjs",
"module": "./index.cjs",
"types": "./types.d.ts",
"exports": {
".": "./index.cjs",
"./broad": "./broad.cjs",
"./current": "./current.cjs"
".": "./default.cjs",
"./default": "./default.cjs",
"./broad": "./last-3-versions.cjs",
"./current": "./last-2-versions.cjs",
"./next": "./next.cjs",
"./wordpress": "./wordpress.cjs"
},
"devDependencies": {
"@roots/bud-support": "workspace:sources/@roots/bud-support",
Expand All @@ -48,20 +54,7 @@
"fs-jetpack": "5.1.0"
},
"dependencies": {
"browserslist": "4.21.4",
"caniuse-lite": "1.0.30001435"
},
"peerDependencies": {
"browserslist": ">=4.21.4",
"caniuse-lite": ">=1.0.30001435"
},
"peerDependenciesMeta": {
"browserslist": {
"optional": true
},
"caniuse-lite": {
"optional": true
}
"browserslist": "4.21.4"
},
"volta": {
"extends": "../../../package.json"
Expand Down
32 changes: 0 additions & 32 deletions sources/@roots/browserslist-config/scripts/generate.mjs

This file was deleted.

23 changes: 3 additions & 20 deletions sources/@roots/browserslist-config/scripts/index.mjs
Original file line number Diff line number Diff line change
@@ -1,20 +1,3 @@
import {generate} from './generate.mjs'

await generate(`broad.cjs`, [
`last 4 chrome major versions`,
`last 4 safari major versions`,
`last 4 firefox major versions`,
`not dead`,
])
await generate(`current.cjs`, [
`last 2 chrome major versions`,
`last 2 safari major versions`,
`last 2 firefox major versions`,
`not dead`,
])
await generate(`index.cjs`, [
`last 3 chrome major versions`,
`last 3 safari major versions`,
`last 3 firefox major versions`,
`not dead`,
])
/**
* dead
*/
Loading

0 comments on commit 3fbb7bc

Please sign in to comment.