Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: update dependencies #239

Merged
merged 3 commits into from
Jan 16, 2024
Merged
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
17 changes: 8 additions & 9 deletions .github/workflows/validate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}

Expand All @@ -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
Expand All @@ -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
Expand All @@ -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',
Expand Down
14 changes: 7 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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",
Expand All @@ -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"
Expand All @@ -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
Expand Up @@ -48,8 +48,8 @@
const envTargets = isTest
? {node: 'current'}
: isWebpack || isRollup
? {browsers: browsersConfig}
: {node: getNodeVersion(pkg)}
? {browsers: browsersConfig}
: {node: getNodeVersion(pkg)}

Check warning on line 52 in src/config/babelrc.js

View check run for this annotation

Codecov / codecov/patch

src/config/babelrc.js#L51-L52

Added lines #L51 - L52 were not covered by tests
const envOptions = {modules: false, loose: true, targets: envTargets}

module.exports = () => ({
Expand Down Expand Up @@ -86,7 +86,10 @@
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,
Expand Down
2 changes: 1 addition & 1 deletion src/config/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
7 changes: 7 additions & 0 deletions src/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,13 @@
// 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, '..')

Check warning on line 45 in src/utils.js

View check run for this annotation

Codecov / codecov/patch

src/utils.js#L43-L45

Added lines #L43 - L45 were not covered by tests
}
const modPkgPath = require.resolve(`${modName}/package.json`)
const modPkgDir = path.dirname(modPkgPath)
const {bin} = require(modPkgPath)
Expand Down