Skip to content

Commit 2d2d1b5

Browse files
committed
chore: bump (dev)Dependencies, update ts usage
1 parent 0086a6d commit 2d2d1b5

26 files changed

+2957
-2932
lines changed

.codesandbox/ci.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"node": "14",
2+
"node": "16",
33
"packages": [
44
"packages/*"
55
],

.github/workflows/ci.yml

+5-7
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ jobs:
1010
strategy:
1111
matrix:
1212
node:
13-
- 12
1413
- 14
1514
- 16
15+
- 18
1616
runs-on: ubuntu-latest
1717
steps:
1818
- name: Checkout Repo
@@ -41,13 +41,11 @@ jobs:
4141
PARSER_NO_WATCH: true
4242

4343
- name: Codecov
44-
if: matrix.node == 14 # only report coverage once per commit
44+
uses: codecov/codecov-action@v3
45+
46+
- name: Codacy Coverage
4547
run: |
46-
yarn global add codecov codacy-coverage
47-
codecov
48-
cat ./coverage/lcov.info | codacy-coverage -u rx-ts -n pkgr
48+
bash <(curl -Ls https://coverage.codacy.com/get.sh)
4949
env:
50-
CI: 'true'
51-
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
5250
CODACY_ACCOUNT_TOKEN: ${{ secrets.CODACY_ACCOUNT_TOKEN }}
5351
CODACY_PROJECT_TOKEN: ${{ secrets.CODACY_PROJECT_TOKEN }}

.github/workflows/release.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@ jobs:
1616
# This makes Actions fetch all Git history so that Changesets can generate changelogs with the correct commits
1717
fetch-depth: 0
1818

19-
- name: Setup Node.js 14.x
19+
- name: Setup Node.js 16.x
2020
uses: actions/setup-node@v3
2121
with:
22-
node-version: 14.x
22+
node-version: 16.x
2323
cache: yarn
2424

2525
- name: Install Dependencies

.stylelintrc

+1-14
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,3 @@
11
{
2-
"extends": "@1stg/stylelint-config",
3-
"overrides": [
4-
{
5-
"files": [
6-
"**/*.js",
7-
"**/*.jsx",
8-
"**/*.cjs",
9-
"**/*.mjs",
10-
"**/*.ts",
11-
"**/*.tsx"
12-
],
13-
"customSyntax": "@stylelint/postcss-css-in-js"
14-
}
15-
]
2+
"extends": "@1stg/stylelint-config"
163
}

package.json

+29-32
Original file line numberDiff line numberDiff line change
@@ -26,37 +26,34 @@
2626
"dev:vue": "yarn w:dev -e src/vue -t vue",
2727
"lint": "run-p lint:*",
2828
"lint:es": "eslint . --cache -f friendly",
29-
"lint:style": "stylelint --cache './**/*.{html,js,scss,ts,vue}'",
29+
"lint:style": "stylelint --cache './**/*.{cjs,html,js,md,scss,ts,vue}'",
3030
"lint:tsc": "tsc --noEmit",
3131
"prelint": "yarn build",
32-
"prepare": "simple-git-hooks && yarn-deduplicate --strategy fewer && t || exit 0",
32+
"prepare": "patch-package && simple-git-hooks && yarn-deduplicate --strategy fewer && t || exit 0",
3333
"pretest": "yarn clean",
3434
"release": "changeset publish",
35-
"serve": "serve dist",
35+
"serve": "sirv dist",
3636
"test": "jest",
3737
"typecov": "type-coverage",
3838
"vercel-build": "yarn build && run-p build:w:*",
3939
"w:build": "node packages/webpack/lib/cli",
4040
"w:dev": "ts-node-esm packages/webpack/src/cli"
4141
},
4242
"devDependencies": {
43-
"@1stg/app-config": "^3.5.0",
44-
"@angular/common": "^13.3.2",
45-
"@angular/compiler": "^13.3.2",
46-
"@angular/compiler-cli": "^13.3.2",
47-
"@angular/core": "^13.3.2",
48-
"@angular/platform-browser": "^13.3.2",
49-
"@angular/platform-browser-dynamic": "^13.3.2",
50-
"@babel/types": "^7.17.0",
43+
"@1stg/app-config": "^4.1.1",
44+
"@angular/common": "^13.3.9",
45+
"@angular/compiler": "^13.3.9",
46+
"@angular/compiler-cli": "^13.3.9",
47+
"@angular/core": "^13.3.9",
48+
"@angular/platform-browser": "^13.3.9",
49+
"@angular/platform-browser-dynamic": "^13.3.9",
50+
"@babel/types": "^7.17.12",
5151
"@changesets/changelog-github": "^0.4.4",
5252
"@changesets/cli": "^2.22.0",
5353
"@d-ts/bin": "^1.1.0",
5454
"@d-ts/core": "^1.0.0",
55-
"@d-ts/rollup-plugins": "^1.1.0",
5655
"@d-ts/svelte": "^1.0.0",
5756
"@d-ts/vue": "^1.0.0",
58-
"@d-ts/webpack-plugins": "^1.1.0",
59-
"@stylelint/postcss-css-in-js": "^0.37.2",
6057
"@types/babel__core": "^7.1.19",
6158
"@types/case-sensitive-paths-webpack-plugin": "^2.1.6",
6259
"@types/copy-webpack-plugin": "^10.1.0",
@@ -65,35 +62,35 @@
6562
"@types/friendly-errors-webpack-plugin": "^0.1.4",
6663
"@types/imagemin": "^8.0.0",
6764
"@types/is-glob": "^4.0.2",
68-
"@types/jest": "^27.4.1",
65+
"@types/jest": "^27.5.1",
6966
"@types/lodash-es": "^4.17.6",
7067
"@types/micromatch": "^4.0.2",
7168
"@types/mini-css-extract-plugin": "^2.5.1",
72-
"@types/node": "^17.0.23",
69+
"@types/node": "^17.0.35",
7370
"@types/postcss-load-config": "^3.0.1",
74-
"@types/prettier": "^2.4.4",
75-
"@types/react": "^17.0.43",
76-
"@types/react-dom": "^17.0.14",
77-
"@types/resolve": "^1.20.1",
71+
"@types/prettier": "^2.6.1",
72+
"@types/react": "^18.0.9",
73+
"@types/react-dom": "^18.0.4",
74+
"@types/resolve": "^1.20.2",
7875
"@types/webpack-dev-server": "^4.7.2",
79-
"@types/webpack-env": "^1.16.3",
76+
"@types/webpack-env": "^1.17.0",
8077
"@types/workbox-webpack-plugin": "^5.1.8",
81-
"@vue/compiler-sfc": "^3.2.31",
82-
"core-js": "^3.21.1",
83-
"jest": "^27.5.1",
84-
"postcss": "^8.4.12",
85-
"postcss-syntax": "^0.36.2",
86-
"react": "^18.0.0",
87-
"react-dom": "^18.0.0",
78+
"@vue/compiler-sfc": "^3.2.34",
79+
"core-js": "^3.22.5",
80+
"jest": "^28.1.0",
81+
"patch-package": "^6.4.7",
82+
"postcss": "^8.4.14",
83+
"react": "^18.1.0",
84+
"react-dom": "^18.1.0",
8885
"rimraf": "^3.0.2",
8986
"rxjs": "^7.5.5",
9087
"serve": "^13.0.2",
91-
"svelte": "^3.46.6",
92-
"ts-jest": "^27.1.4",
88+
"svelte": "^3.48.0",
89+
"ts-jest": "^28.0.2",
9390
"ts-node": "^10.7.0",
9491
"type-coverage": "^2.21.1",
95-
"typescript": "^4.6.3",
96-
"vue": "^3.2.31",
92+
"typescript": "^4.6.4",
93+
"vue": "^3.2.34",
9794
"zone.js": "^0.11.5"
9895
},
9996
"resolutions": {

packages/es-modules/package.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,11 @@
1010
"main": "./lib/index.cjs",
1111
"module": "./lib/index.js",
1212
"exports": {
13+
"types": "./lib/index.d.ts",
1314
"import": "./lib/index.js",
1415
"require": "./lib/index.cjs"
1516
},
16-
"types": "lib",
17+
"types": "./lib/index.d.ts",
1718
"files": [
1819
"lib",
1920
"!**/*.tsbuildinfo"

packages/imagemin/package.json

+3-2
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,11 @@
1616
"main": "./lib/index.cjs",
1717
"module": "./lib/index.js",
1818
"exports": {
19+
"types": "./lib/index.d.ts",
1920
"import": "./lib/index.js",
2021
"require": "./lib/index.cjs"
2122
},
22-
"types": "lib",
23+
"types": "./lib/index.d.ts",
2324
"files": [
2425
"lib"
2526
],
@@ -35,7 +36,7 @@
3536
"imagemin-webp": "^7.0.0",
3637
"is-glob": "^4.0.3",
3738
"tiny-glob": "^0.2.9",
38-
"tslib": "^2.3.1"
39+
"tslib": "^2.4.0"
3940
},
4041
"publishConfig": {
4142
"access": "public"

packages/imagemin/src/index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import fs from 'fs'
1+
import fs from 'node:fs'
22

33
import { Plugin } from 'imagemin'
44

packages/rollup/package.json

+17-15
Original file line numberDiff line numberDiff line change
@@ -17,38 +17,40 @@
1717
"lib"
1818
],
1919
"dependencies": {
20-
"@babel/core": "^7.17.9",
21-
"@babel/plugin-proposal-decorators": "^7.17.9",
22-
"@babel/preset-env": "^7.16.11",
23-
"@babel/preset-typescript": "^7.16.7",
20+
"@babel/core": "^7.17.12",
21+
"@babel/plugin-proposal-decorators": "^7.17.12",
22+
"@babel/preset-env": "^7.17.12",
23+
"@babel/preset-typescript": "^7.17.12",
2424
"@pkgr/es-modules": "^0.5.0",
2525
"@pkgr/umd-globals": "^0.7.0",
2626
"@pkgr/utils": "^2.0.0",
27+
"@rollup/plugin-alias": "^3.1.9",
2728
"@rollup/plugin-babel": "^5.3.1",
28-
"@rollup/plugin-commonjs": "^21.0.3",
29+
"@rollup/plugin-commonjs": "^22.0.0",
2930
"@rollup/plugin-json": "^4.0.3",
30-
"@rollup/plugin-node-resolve": "^13.0.6",
31+
"@rollup/plugin-node-resolve": "^13.3.0",
3132
"@rollup/plugin-replace": "^4.0.0",
32-
"@rollup/plugin-url": "^6.1.0",
33-
"@rxts/rollup-plugin-alias": "^0.1.1",
34-
"builtin-modules": "^3.2.0",
35-
"commander": "^9.1.0",
36-
"core-js": "^3.19.1",
33+
"@rollup/plugin-url": "^7.0.0",
34+
"builtin-modules": "^3.3.0",
35+
"commander": "^9.2.0",
36+
"core-js": "^3.22.5",
3737
"debug": "^4.3.2",
38-
"esbuild": "^0.14.34",
38+
"esbuild": "^0.14.39",
3939
"is-glob": "^4.0.3",
4040
"jsox": "^1.2.111",
4141
"lodash-es": "^4.17.21",
4242
"micromatch": "^4.0.5",
43-
"postcss": "^8.3.11",
44-
"rollup": "^2.60.0",
43+
"postcss": "^8.4.14",
44+
"rollup": "^2.74.0",
4545
"rollup-plugin-copy": "^3.4.0",
4646
"rollup-plugin-esbuild": "^4.9.1",
4747
"rollup-plugin-postcss": "^4.0.1",
4848
"rollup-plugin-terser": "^7.0.2",
49+
"rollup-plugin-unassert": "^0.4.0",
4950
"rollup-plugin-vue": "^6.0.0",
5051
"rollup-plugin-vue-jsx-compat": "^0.0.6",
51-
"tslib": "^2.3.1"
52+
"tslib": "^2.4.0",
53+
"unassert": "^1.6.0"
5254
},
5355
"publishConfig": {
5456
"access": "public"

packages/rollup/shim.d.ts

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
declare module 'jsox' {
2+
export const JSOX: typeof JSON
3+
}
4+
5+
declare module 'unassert' {
6+
export interface UnassertOptions {
7+
assertionPatterns?: string[]
8+
requirePatterns?: string[]
9+
importPatterns?: string[]
10+
}
11+
12+
export const defaultOptions: () => Required<UnassertOptions>
13+
}
14+
15+
declare module 'rollup-plugin-unassert' {
16+
import { FilterPattern } from '@rollup/pluginutils'
17+
import { Plugin } from 'rollup'
18+
import { UnassertOptions as _UnassertOptions } from 'unassert'
19+
20+
export interface UnassertOptions extends _UnassertOptions {
21+
sourcemap?: boolean
22+
include?: FilterPattern
23+
exclude?: FilterPattern
24+
}
25+
26+
const unassert: (options?: UnassertOptions) => Plugin
27+
28+
export default unassert
29+
}

packages/rollup/src/cli.ts

+18-16
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
#!/usr/bin/env node
2-
/* eslint-disable @typescript-eslint/no-unsafe-argument, @typescript-eslint/no-unsafe-member-access */
3-
import fs from 'fs'
4-
import path from 'path'
5-
import { fileURLToPath } from 'url'
2+
/// <reference path="../shim.d.ts" />
3+
4+
import fs from 'node:fs'
5+
import path from 'node:path'
6+
import { fileURLToPath } from 'node:url'
67

78
import { program } from 'commander'
89
import debug from 'debug'
9-
// @ts-expect-error
1010
import { JSOX } from 'jsox'
1111
import { pick } from 'lodash-es'
1212
import { InputOptions, OutputOptions, rollup, watch } from 'rollup'
@@ -25,6 +25,8 @@ const parseArrayArgs = (curr: string, prev?: string[]) => {
2525
return prev ? [...prev, ...next] : next
2626
}
2727

28+
const jsoxParse = <T>(text: string) => JSOX.parse(text) as T
29+
2830
program
2931
.version(
3032
(
@@ -46,7 +48,7 @@ program
4648
.option(
4749
'-m, --monorepo <false | glob | paths>',
4850
'whether try to resolve the project as a monorepo automatically, or custom the packages path',
49-
JSOX.parse,
51+
jsoxParse,
5052
)
5153
.option(
5254
'-e, --exports <mode>',
@@ -61,17 +63,17 @@ program
6163
.option(
6264
'-g, --globals <JSOX>',
6365
'JSON string to be parsed as umd globals map',
64-
JSOX.parse,
66+
jsoxParse,
6567
)
6668
.option(
6769
'-a, --alias-entries <JSOX>',
6870
'entries setting for @rxts/rollup-plugin-alias, could be array or object',
69-
JSOX.parse,
71+
jsoxParse,
7072
)
7173
.option(
7274
'-c, --copies <JSOX>',
7375
'targets setting or whole CopyOptions for rollup-plugin-copy, could be array or object',
74-
JSOX.parse,
76+
jsoxParse,
7577
)
7678
.option(
7779
'-s, --source-map <boolean>',
@@ -85,30 +87,30 @@ program
8587
.option(
8688
'-b, --babel <JSOX>',
8789
'Overrides the Babel plugin options for `@rollup/plugin-babel`',
88-
JSOX.parse,
90+
jsoxParse,
8991
)
9092
.option(
9193
'--esbuild <JSOX>',
9294
'Overrides the esbuild options for `rollup-plugin-esbuild`',
93-
JSOX.parse,
95+
jsoxParse,
9496
)
9597
.option(
9698
'-t, --transformer [babel | esbuild]',
9799
'Specify which transformer to use',
98100
'esbuild',
99101
)
100102

101-
.option('--postcss <JSOX>', 'options for `rollup-plugin-postcss`', JSOX.parse)
103+
.option('--postcss <JSOX>', 'options for `rollup-plugin-postcss`', jsoxParse)
102104

103-
.option('--vue <JSOX>', 'options for `rollup-plugin-vue`', JSOX.parse)
104-
.option<boolean | object>(
105+
.option('--vue <JSOX>', 'options for `rollup-plugin-vue`', jsoxParse)
106+
.option(
105107
'-d, --define [boolean | JSOX]',
106108
'options for `@rollup/plugin-replace`, enable `__DEV__` and `__PROD__` by default',
107-
JSOX.parse,
109+
jsoxParse,
108110
true,
109111
)
110112

111-
.option('--terser <JSOX>', 'options for `@rollup/plugin-terser`', JSOX.parse)
113+
.option('--terser <JSOX>', 'options for `@rollup/plugin-terser`', jsoxParse)
112114
.option(
113115
'-p, --prod [boolean]',
114116
'whether to enable production(.min.js) bundle together at the same time',

0 commit comments

Comments
 (0)