Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: kentcdodds/kcd-scripts
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v14.0.1
Choose a base ref
...
head repository: kentcdodds/kcd-scripts
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v15.0.0
Choose a head ref
  • 1 commit
  • 5 files changed
  • 1 contributor

Commits on Jan 16, 2024

  1. feat: update dependencies (#239)

    BREAKING CHANGE: Drop Node 14 support. You should hopefully not have to do anything to address this change. If you do it'll be very little.
    mochaaP authored Jan 16, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    74820e3 View commit details
Showing with 29 additions and 20 deletions.
  1. +8 −9 .github/workflows/validate.yml
  2. +7 −7 package.json
  3. +6 −3 src/config/babelrc.js
  4. +1 −1 src/config/rollup.config.js
  5. +7 −0 src/utils.js
17 changes: 8 additions & 9 deletions .github/workflows/validate.yml
Original file line number Diff line number Diff line change
@@ -22,14 +22,14 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
node: [14.17.0, 14, 16.10.0, 16, 18]
node: [lts/-1, lts/*, latest]
runs-on: ${{ matrix.os }}
steps:
- name: ⬇️ Checkout repo
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: ⎔ Setup node
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}

@@ -42,7 +42,7 @@ jobs:
run: npm run validate

- name: ⬆️ Upload coverage report
uses: codecov/codecov-action@v2
uses: codecov/codecov-action@v3

release:
needs: main
@@ -53,12 +53,12 @@ jobs:
github.ref) && github.event_name == 'push' }}
steps:
- name: ⬇️ Checkout repo
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: ⎔ Setup node
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 16
node-version: lts/*

- name: 📥 Download deps
uses: bahmutov/npm-install@v1
@@ -69,9 +69,8 @@ jobs:
run: npm run build

- name: 🚀 Release
uses: cycjimmy/semantic-release-action@v2
uses: cycjimmy/semantic-release-action@v4
with:
semantic_version: 18
branches: |
[
'+([0-9])?(.{+([0-9]),x}).x',
14 changes: 7 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
@@ -58,7 +58,7 @@
"dependencies": {
"@babel/cli": "^7.18.10",
"@babel/core": "^7.18.13",
"@babel/plugin-proposal-class-properties": "^7.18.6",
"@babel/plugin-transform-class-properties": "^7.18.6",
"@babel/plugin-transform-modules-commonjs": "^7.18.6",
"@babel/plugin-transform-runtime": "^7.18.10",
"@babel/preset-env": "^7.18.10",
@@ -70,20 +70,21 @@
"@rollup/plugin-json": "^4.1.0",
"@rollup/plugin-node-resolve": "^13.3.0",
"@rollup/plugin-replace": "^4.0.0",
"@rollup/plugin-terser": "^0.4.4",
"@types/jest": "^29.4.0",
"arrify": "^2.0.1",
"babel-jest": "^29.4.1",
"babel-plugin-macros": "^3.1.0",
"babel-plugin-minify-dead-code-elimination": "^0.5.2",
"babel-plugin-module-resolver": "^4.1.0",
"babel-plugin-module-resolver": "^5.0.0",
"babel-plugin-transform-inline-environment-variables": "^0.4.4",
"babel-plugin-transform-react-remove-prop-types": "^0.4.24",
"browserslist": "4.21.3",
"builtin-modules": "^3.3.0",
"chalk": "^4.1.2",
"concurrently": "^7.3.0",
"cosmiconfig": "^7.0.1",
"cpy": "^8.1.2",
"cpy": "npm:@brickdoc/cpy@8.1.2-patch.1",
"cross-env": "^7.0.3",
"cross-spawn": "^7.0.3",
"doctoc": "^2.2.0",
@@ -102,13 +103,12 @@
"lodash.has": "^4.5.2",
"lodash.omit": "^4.5.0",
"mkdirp": "^1.0.4",
"prettier": "2.7.1",
"prettier": "^3",
"read-pkg-up": "^7.0.1",
"resolve": "^1.22.1",
"rimraf": "^3.0.2",
"rollup": "^2.78.1",
"rollup-plugin-polyfill-node": "^0.10.2",
"rollup-plugin-terser": "^7.0.2",
"rollup-plugin-polyfill-node": "^0.13.0",
"semver": "^7.3.7",
"which": "^2.0.2",
"yargs-parser": "^21.1.1"
@@ -121,7 +121,7 @@
"caniuse-lite": "1.0.30001553"
},
"engines": {
"node": "^14.17.0 || ^16.10.0 || >=17.0.0",
"node": "^16.10.0 || >=17.0.0",
"npm": ">=6"
}
}
9 changes: 6 additions & 3 deletions src/config/babelrc.js
Original file line number Diff line number Diff line change
@@ -48,8 +48,8 @@ const browsersConfig = browserslist.loadConfig({path: appDirectory}) || [
const envTargets = isTest
? {node: 'current'}
: isWebpack || isRollup
? {browsers: browsersConfig}
: {node: getNodeVersion(pkg)}
? {browsers: browsersConfig}
: {node: getNodeVersion(pkg)}
const envOptions = {modules: false, loose: true, targets: envTargets}

module.exports = () => ({
@@ -86,7 +86,10 @@ module.exports = () => ({
isUMD
? require.resolve('babel-plugin-transform-inline-environment-variables')
: null,
[require.resolve('@babel/plugin-proposal-class-properties'), {loose: true}],
[
require.resolve('@babel/plugin-transform-class-properties'),
{loose: true},
],
isMinify
? require.resolve('babel-plugin-minify-dead-code-elimination')
: null,
2 changes: 1 addition & 1 deletion src/config/rollup.config.js
Original file line number Diff line number Diff line change
@@ -11,7 +11,7 @@ const replace = require('@rollup/plugin-replace')
const camelcase = require('lodash.camelcase')
const omit = require('lodash.omit')
const nodePolyfills = require('rollup-plugin-polyfill-node')
const {terser} = require('rollup-plugin-terser')
const terser = require('@rollup/plugin-terser')
const {
pkg,
hasFile,
7 changes: 7 additions & 0 deletions src/utils.js
Original file line number Diff line number Diff line change
@@ -37,6 +37,13 @@ function resolveBin(modName, {executable = modName, cwd = process.cwd()} = {}) {
// ignore _error
}
try {
if (modName === 'rollup') {
// Rollup uses subpath exports without exporting package.json which is problematic
// Convert to absolute path first
const modPkgPathDist = require.resolve('rollup/dist/rollup.js')
const modPkgDirDist = path.dirname(modPkgPathDist)
modName = path.join(modPkgDirDist, '..')
}
const modPkgPath = require.resolve(`${modName}/package.json`)
const modPkgDir = path.dirname(modPkgPath)
const {bin} = require(modPkgPath)