Skip to content

Commit 686238a

Browse files
authored
feat: split @pkgr/utils into @pkgr/core and @pkgr/browser (#354)
1 parent 423567b commit 686238a

File tree

23 files changed

+973
-915
lines changed

23 files changed

+973
-915
lines changed

.changeset/fluffy-jars-exist.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
"@pkgr/browser": minor
3+
"@pkgr/core": minor
4+
"@pkgr/utils": minor
5+
---
6+
7+
feat: split `@pkgr/utils` into `@pkgr/core` and `@pkgr/browser`

.codesandbox/ci.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"node": "16",
2+
"node": "18",
33
"packages": [
44
"packages/*"
55
],

.github/workflows/ci.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,16 +20,16 @@ jobs:
2020
runs-on: ${{ matrix.os }}
2121
steps:
2222
- name: Checkout Repo
23-
uses: actions/checkout@v3
23+
uses: actions/checkout@v4
2424

2525
- name: Setup Node.js ${{ matrix.node }}
26-
uses: actions/setup-node@v3
26+
uses: actions/setup-node@v4
2727
with:
2828
node-version: ${{ matrix.node }}
2929
cache: yarn
3030

3131
- name: Install Dependencies
32-
run: yarn --frozen-lockfile
32+
run: yarn --frozen-lockfile --ignore-engines
3333

3434
- name: Build, Lint and Test
3535
run: yarn run-s lint typecov test

.github/workflows/codeql.yml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
1-
name: 'CodeQL'
1+
name: CodeQL
22

33
on:
44
push:
5-
branches: ['master']
5+
branches:
6+
- master
67
pull_request:
7-
branches: ['master']
8+
branches:
9+
- master
810
schedule:
911
- cron: '4 21 * * 3'
1012

@@ -20,11 +22,12 @@ jobs:
2022
strategy:
2123
fail-fast: false
2224
matrix:
23-
language: [javascript]
25+
language:
26+
- javascript
2427

2528
steps:
2629
- name: Checkout
27-
uses: actions/checkout@v3
30+
uses: actions/checkout@v4
2831

2932
- name: Initialize CodeQL
3033
uses: github/codeql-action/init@v2

.github/workflows/pkg-size.yml

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
name: Package Size Report
22

33
on:
4-
pull_request:
5-
branches:
6-
- master
4+
- pull_request
75

86
jobs:
97
pkg-size-report:
@@ -12,12 +10,12 @@ jobs:
1210

1311
steps:
1412
- name: Checkout
15-
uses: actions/checkout@v3
13+
uses: actions/checkout@v4
1614

17-
- name: Setup Node.js
18-
uses: actions/setup-node@v3
15+
- name: Setup Node.js LTS
16+
uses: actions/setup-node@v4
1917
with:
20-
node-version: 16
18+
node-version: lts/*
2119
cache: yarn
2220

2321
- name: Package Size Report

.github/workflows/release.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,22 +11,22 @@ jobs:
1111
runs-on: ubuntu-latest
1212
steps:
1313
- name: Checkout Repo
14-
uses: actions/checkout@v3
14+
uses: actions/checkout@v4
1515
with:
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 16
20-
uses: actions/setup-node@v3
19+
- name: Setup Node.js LTS
20+
uses: actions/setup-node@v4
2121
with:
22-
node-version: 16
22+
node-version: lts/*
2323
cache: yarn
2424

2525
- name: Install Dependencies
2626
run: yarn --frozen-lockfile
2727

2828
# `@pkgr/utils` is used by `@1stg/lint-staged`
29-
- name: Build prerelease
29+
- name: Build
3030
run: yarn build
3131

3232
- name: Create Release Pull Request or Publish to npm

package.json

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"workspaces": [
1111
"packages/**"
1212
],
13-
"packageManager": "[email protected].19",
13+
"packageManager": "[email protected].21",
1414
"scripts": {
1515
"build": "run-s build:ts build:r",
1616
"build:r": "tsx packages/rollup/src/cli.ts -f cjs -d false",
@@ -27,24 +27,24 @@
2727
"typecov": "type-coverage"
2828
},
2929
"devDependencies": {
30-
"@1stg/common-config": "^9.0.0",
31-
"@changesets/changelog-github": "^0.4.8",
32-
"@changesets/cli": "^2.26.2",
33-
"@types/cross-spawn": "^6.0.2",
34-
"@types/debug": "^4.1.8",
35-
"@types/imagemin": "^8.0.1",
36-
"@types/is-glob": "^4.0.2",
37-
"@types/jest": "^29.5.3",
38-
"@types/lodash-es": "^4.17.8",
39-
"@types/micromatch": "^4.0.2",
40-
"@types/node": "^20.4.6",
41-
"jest": "^29.6.2",
30+
"@1stg/common-config": "^9.0.1",
31+
"@changesets/changelog-github": "^0.5.0",
32+
"@changesets/cli": "^2.27.1",
33+
"@types/cross-spawn": "^6.0.6",
34+
"@types/debug": "^4.1.12",
35+
"@types/imagemin": "^8.0.5",
36+
"@types/is-glob": "^4.0.4",
37+
"@types/jest": "^29.5.11",
38+
"@types/lodash-es": "^4.17.12",
39+
"@types/micromatch": "^4.0.6",
40+
"@types/node": "^20.10.5",
41+
"jest": "^29.7.0",
4242
"patch-package": "^8.0.0",
43-
"rimraf": "^5.0.1",
43+
"rimraf": "^5.0.5",
4444
"ts-jest": "^29.1.1",
45-
"tsx": "^3.12.7",
46-
"type-coverage": "^2.26.0",
47-
"typescript": "^5.1.6",
45+
"tsx": "^4.7.0",
46+
"type-coverage": "^2.27.1",
47+
"typescript": "^5.3.3",
4848
"yarn-deduplicate": "^6.0.2"
4949
},
5050
"resolutions": {

packages/browser/package.json

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
{
2+
"name": "@pkgr/browser",
3+
"version": "0.0.0",
4+
"type": "module",
5+
"description": "Shared browser utils for `@pkgr` packages or any package else",
6+
"repository": "git+https://github.com/un-ts/pkgr.git",
7+
"homepage": "https://github.com/un-ts/pkgr/blob/master/packages/browser",
8+
"author": "JounQin (https://www.1stG.me) <[email protected]>",
9+
"funding": "https://opencollective.com/unts",
10+
"license": "MIT",
11+
"engines": {
12+
"node": "^12.20.0 || ^14.18.0 || >=16.0.0"
13+
},
14+
"main": "./lib/index.cjs",
15+
"module": "./lib/index.js",
16+
"exports": {
17+
"types": "./lib/index.d.ts",
18+
"import": "./lib/index.js",
19+
"require": "./lib/index.cjs"
20+
},
21+
"types": "./lib/index.d.ts",
22+
"files": [
23+
"lib",
24+
"openChrome.applescript"
25+
],
26+
"dependencies": {
27+
"cross-spawn": "^7.0.3",
28+
"open": "^8.4.2 || ^9.1.0 || ^10.0.1",
29+
"picocolors": "^1.0.0",
30+
"tslib": "^2.6.2"
31+
},
32+
"publishConfig": {
33+
"access": "public"
34+
},
35+
"sideEffects": false
36+
}

0 commit comments

Comments
 (0)