Skip to content

Commit

Permalink
feat(utils): get package manager info (#295)
Browse files Browse the repository at this point in the history
  • Loading branch information
JounQin committed Jul 5, 2022
1 parent 644e34a commit 9454c9b
Show file tree
Hide file tree
Showing 21 changed files with 2,438 additions and 2,006 deletions.
15 changes: 15 additions & 0 deletions .changeset/hip-windows-beg.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
"@pkgr/es-modules": patch
"@pkgr/imagemin": patch
"@pkgr/rollup": patch
"@pkgr/umd-globals": patch
"@pkgr/utils": patch
"@pkgr/webpack-angular": patch
"@pkgr/webpack-mdx": patch
"@pkgr/webpack-react": patch
"@pkgr/webpack-svelte": patch
"@pkgr/webpack-vue": patch
"@pkgr/webpack": patch
---

chore: add donate and funding fields
5 changes: 5 additions & 0 deletions .changeset/sweet-meals-nail.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@pkgr/utils": minor
---

feat: get package manager info
5 changes: 4 additions & 1 deletion .eslintrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
{
"extends": "@1stg"
"extends": "@1stg",
"rules": {
"unicorn/prefer-top-level-await": "off"
}
}
32 changes: 16 additions & 16 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
],
"scripts": {
"build": "run-s build:ts build:r",
"build:r": "ts-node-esm packages/rollup/src/cli.ts -f cjs -d false --exclude webpack-*",
"build:r": "tsx packages/rollup/src/cli.ts -f cjs -d false --exclude webpack-*",
"build:ts": "tsc -b",
"build:w:angular": "yarn w:build -e src/angular -o dist/angular -t angular -p",
"build:w:react": "yarn w:build -e src/react -o dist/react -t react -p",
Expand All @@ -37,17 +37,17 @@
"typecov": "type-coverage",
"vercel-build": "yarn build && run-p build:w:*",
"w:build": "node packages/webpack/lib/cli",
"w:dev": "ts-node-esm packages/webpack/src/cli"
"w:dev": "tsx packages/webpack/src/cli"
},
"devDependencies": {
"@1stg/app-config": "^4.2.0",
"@angular/common": "^14.0.2",
"@angular/compiler": "^14.0.2",
"@angular/compiler-cli": "^14.0.2",
"@angular/core": "^14.0.2",
"@angular/platform-browser": "^14.0.2",
"@angular/platform-browser-dynamic": "^14.0.2",
"@babel/types": "^7.18.4",
"@1stg/app-config": "^5.2.5",
"@angular/common": "^14.0.4",
"@angular/compiler": "^14.0.4",
"@angular/compiler-cli": "^14.0.4",
"@angular/core": "^14.0.4",
"@angular/platform-browser": "^14.0.4",
"@angular/platform-browser-dynamic": "^14.0.4",
"@babel/types": "^7.18.7",
"@changesets/changelog-github": "^0.4.5",
"@changesets/cli": "^2.23.0",
"@d-ts/bin": "^1.1.1",
Expand All @@ -62,19 +62,19 @@
"@types/friendly-errors-webpack-plugin": "^0.1.4",
"@types/imagemin": "^8.0.0",
"@types/is-glob": "^4.0.2",
"@types/jest": "^28.1.2",
"@types/jest": "^28.1.4",
"@types/lodash-es": "^4.17.6",
"@types/micromatch": "^4.0.2",
"@types/mini-css-extract-plugin": "^2.5.1",
"@types/node": "^18.0.0",
"@types/node": "^18.0.1",
"@types/postcss-load-config": "^3.0.1",
"@types/prettier": "^2.6.3",
"@types/react": "^18.0.14",
"@types/react-dom": "^18.0.5",
"@types/react-dom": "^18.0.6",
"@types/webpack-dev-server": "^4.7.2",
"@types/webpack-env": "^1.17.0",
"@types/workbox-webpack-plugin": "^5.1.8",
"jest": "^28.1.1",
"jest": "^28.1.2",
"patch-package": "^6.4.7",
"react": "^18.2.0",
"react-dom": "^18.2.0",
Expand All @@ -83,8 +83,8 @@
"sirv-cli": "^2.0.2",
"svelte": "^3.48.0",
"ts-jest": "^28.0.5",
"ts-node": "^10.8.1",
"type-coverage": "^2.21.1",
"tsx": "^3.7.1",
"type-coverage": "^2.21.2",
"typescript": "^4.7.4",
"vue": "^3.2.37",
"zone.js": "^0.11.6"
Expand Down
56 changes: 28 additions & 28 deletions packages/es-modules/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,34 +5,7 @@
"description": "Union collections of es modules mappings for pkgs without or with incorrect `module` field",
"repository": "git+https://github.com/un-ts/pkgr.git",
"homepage": "https://github.com/un-ts/pkgr/blob/master/packages/es-modules",
"funding": "https://opencollective.com/unts",
"author": "JounQin (https://www.1stG.me) <admin@1stg.me>",
"license": "MIT",
"main": "./lib/index.cjs",
"module": "./lib/index.js",
"exports": {
"types": "./lib/index.d.ts",
"import": "./lib/index.js",
"require": "./lib/index.cjs"
},
"types": "./lib/index.d.ts",
"files": [
"lib",
"!**/*.tsbuildinfo"
],
"keywords": [
"alias",
"es",
"modules",
"rollup",
"rollup-config",
"webpack",
"webpack-config"
],
"publishConfig": {
"access": "public"
},
"sideEffects": false,
"donate": {
"recipients": [
{
Expand Down Expand Up @@ -63,5 +36,32 @@
]
}
]
}
},
"funding": "https://opencollective.com/unts",
"license": "MIT",
"main": "./lib/index.cjs",
"module": "./lib/index.js",
"exports": {
"types": "./lib/index.d.ts",
"import": "./lib/index.js",
"require": "./lib/index.cjs"
},
"types": "./lib/index.d.ts",
"files": [
"lib",
"!**/*.tsbuildinfo"
],
"keywords": [
"alias",
"es",
"modules",
"rollup",
"rollup-config",
"webpack",
"webpack-config"
],
"publishConfig": {
"access": "public"
},
"sideEffects": false
}
68 changes: 34 additions & 34 deletions packages/imagemin/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,39 @@
"description": "Seamless imagemin API wrapper to minify images, working perfectly with lint-staged also",
"repository": "git@github.com:un-ts/pkgr.git",
"homepage": "https://github.com/un-ts/pkgr/blob/master/packages/imagemin",
"funding": "https://opencollective.com/unts",
"author": "JounQin (https://www.1stG.me) <admin@1stg.me>",
"donate": {
"recipients": [
{
"name": "unts",
"platform": "opencollective",
"address": "https://opencollective.com/unts",
"weight": 60
},
{
"name": "rxts",
"platform": "opencollective",
"address": "https://opencollective.com/rxts",
"weight": 20
},
{
"name": "1stG",
"email": "i@1stg.me",
"weight": 20,
"platforms": [
{
"platform": "opencollective",
"address": "https://opencollective.com/1stG"
},
{
"platform": "patreon",
"address": "https://www.patreon.com/1stG"
}
]
}
]
},
"funding": "https://opencollective.com/unts",
"license": "MIT",
"engines": {
"node": "^12.20.0 || ^14.18.0 || >=16.0.0"
Expand All @@ -32,7 +63,7 @@
"imagemin-mozjpeg": "^10.0.0",
"imagemin-optipng": "^8.0.0",
"imagemin-pngquant": "^9.0.2",
"imagemin-svgo": "^10.0.0",
"imagemin-svgo": "^10.0.1",
"imagemin-upng": "^3.0.0",
"imagemin-webp": "^7.0.0",
"is-glob": "^4.0.3",
Expand All @@ -42,36 +73,5 @@
"publishConfig": {
"access": "public"
},
"sideEffects": false,
"donate": {
"recipients": [
{
"name": "unts",
"platform": "opencollective",
"address": "https://opencollective.com/unts",
"weight": 60
},
{
"name": "rxts",
"platform": "opencollective",
"address": "https://opencollective.com/rxts",
"weight": 20
},
{
"name": "1stG",
"email": "i@1stg.me",
"weight": 20,
"platforms": [
{
"platform": "opencollective",
"address": "https://opencollective.com/1stG"
},
{
"platform": "patreon",
"address": "https://www.patreon.com/1stG"
}
]
}
]
}
"sideEffects": false
}
90 changes: 45 additions & 45 deletions packages/rollup/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,39 @@
"description": "Seamless Rollup bundler wrapper for libraries",
"repository": "git@github.com:un-ts/pkgr.git",
"homepage": "https://github.com/un-ts/pkgr/blob/master/packages/rollup",
"funding": "https://opencollective.com/unts",
"author": "JounQin (https://www.1stG.me) <admin@1stg.me>",
"donate": {
"recipients": [
{
"name": "unts",
"platform": "opencollective",
"address": "https://opencollective.com/unts",
"weight": 60
},
{
"name": "rxts",
"platform": "opencollective",
"address": "https://opencollective.com/rxts",
"weight": 20
},
{
"name": "1stG",
"email": "i@1stg.me",
"weight": 20,
"platforms": [
{
"platform": "opencollective",
"address": "https://opencollective.com/1stG"
},
{
"platform": "patreon",
"address": "https://www.patreon.com/1stG"
}
]
}
]
},
"funding": "https://opencollective.com/unts",
"license": "MIT",
"engines": {
"node": "^12.20.0 || ^14.18.0 || >=16.0.0"
Expand All @@ -18,34 +49,34 @@
"lib"
],
"dependencies": {
"@babel/core": "^7.18.5",
"@babel/plugin-proposal-decorators": "^7.18.2",
"@babel/preset-env": "^7.18.2",
"@babel/preset-typescript": "^7.17.12",
"@babel/core": "^7.18.6",
"@babel/plugin-proposal-decorators": "^7.18.6",
"@babel/preset-env": "^7.18.6",
"@babel/preset-typescript": "^7.18.6",
"@pkgr/es-modules": "^0.6.0",
"@pkgr/umd-globals": "^0.8.0",
"@pkgr/utils": "^2.2.0",
"@rollup/plugin-alias": "^3.1.9",
"@rollup/plugin-babel": "^5.3.1",
"@rollup/plugin-commonjs": "^22.0.0",
"@rollup/plugin-json": "^4.0.3",
"@rollup/plugin-commonjs": "^22.0.1",
"@rollup/plugin-json": "^4.1.0",
"@rollup/plugin-node-resolve": "^13.3.0",
"@rollup/plugin-replace": "^4.0.0",
"@rollup/plugin-url": "^7.0.0",
"builtin-modules": "^3.3.0",
"commander": "^9.3.0",
"core-js": "^3.23.1",
"debug": "^4.3.2",
"esbuild": "^0.14.46",
"core-js": "^3.23.3",
"debug": "^4.3.4",
"esbuild": "^0.14.48",
"is-glob": "^4.0.3",
"jsox": "^1.2.111",
"jsox": "^1.2.113",
"lodash-es": "^4.17.21",
"micromatch": "^4.0.5",
"postcss": "^8.4.14",
"rollup": "^2.75.6",
"rollup": "^2.75.7",
"rollup-plugin-copy": "^3.4.0",
"rollup-plugin-esbuild": "^4.9.1",
"rollup-plugin-postcss": "^4.0.1",
"rollup-plugin-postcss": "^4.0.2",
"rollup-plugin-terser": "^7.0.2",
"rollup-plugin-unassert": "^0.4.0",
"rollup-plugin-vue": "^6.0.0",
Expand All @@ -56,36 +87,5 @@
"publishConfig": {
"access": "public"
},
"sideEffects": false,
"donate": {
"recipients": [
{
"name": "unts",
"platform": "opencollective",
"address": "https://opencollective.com/unts",
"weight": 60
},
{
"name": "rxts",
"platform": "opencollective",
"address": "https://opencollective.com/rxts",
"weight": 20
},
{
"name": "1stG",
"email": "i@1stg.me",
"weight": 20,
"platforms": [
{
"platform": "opencollective",
"address": "https://opencollective.com/1stG"
},
{
"platform": "patreon",
"address": "https://www.patreon.com/1stG"
}
]
}
]
}
"sideEffects": false
}
2 changes: 1 addition & 1 deletion packages/rollup/src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,7 @@ ConfigOptions = {}): RollupOptions[] => {
useEsBuild && vue && (!jsxFactory || jsxFactory === 'vueJsxCompat')

return pkgFormats.map(format => {
const isEsVersion = /^es(\d+|m|next)$/.test(format) && format !== 'es5'
const isEsVersion = /^es(?:\d+|m|next)$/.test(format) && format !== 'es5'
return {
input: pkgInput,
output: {
Expand Down

0 comments on commit 9454c9b

Please sign in to comment.