Skip to content
This repository has been archived by the owner on Oct 16, 2024. It is now read-only.

Commit

Permalink
chore: release
Browse files Browse the repository at this point in the history
  • Loading branch information
hemengke1997 committed Mar 28, 2024
1 parent 558e22d commit 1101a83
Show file tree
Hide file tree
Showing 22 changed files with 97 additions and 15 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
"@types/react": "^18.2.55",
"@types/react-dom": "^18.2.19",
"@types/validate-npm-package-name": "^4.0.2",
"bundle-require": "^4.0.2",
"chokidar": "^3.6.0",
"conventional-changelog-cli": "^2.2.2",
"esbuild": "^0.17.19",
Expand Down
7 changes: 7 additions & 0 deletions packages/axios-pro/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# @minko-fe/axios-pro

## 0.1.22

### Patch Changes

- Updated dependencies []:
- @minko-fe/lodash-pro@0.2.4

## 0.1.21

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/axios-pro/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@minko-fe/axios-pro",
"version": "0.1.21",
"version": "0.1.22",
"description": "axios-pro",
"type": "module",
"keywords": [
Expand Down
7 changes: 7 additions & 0 deletions packages/flexible-pro/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# @minko-fe/flexible-pro

## 0.1.22

### Patch Changes

- Updated dependencies []:
- @minko-fe/lodash-pro@0.2.4

## 0.1.21

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/flexible-pro/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@minko-fe/flexible-pro",
"version": "0.1.21",
"version": "0.1.22",
"description": "flexible-pro",
"type": "module",
"keywords": [
Expand Down
6 changes: 6 additions & 0 deletions packages/lodash-pro/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# @minko-fe/lodash-pro

## 0.2.4

### Patch Changes

- fix: noExternal not working

## 0.2.3

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/lodash-pro/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@minko-fe/lodash-pro",
"version": "0.2.3",
"version": "0.2.4",
"description": "lodash-pro",
"type": "module",
"keywords": [
Expand Down
8 changes: 6 additions & 2 deletions packages/lodash-pro/scripts/tsup.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,12 @@ export const cjs: Options = {
format: ['cjs'],
outDir: 'dist/lib',
target: 'es2020',
noExternal: ['lodash-es'],
platform: 'node',
outExtension: () => ({ js: '.cjs' }),
esbuildPlugins: [fileSuffixPlugin('cjs')],
noExternal: ['lodash-es', 'p-is-promise'],
esbuildPlugins: [
fileSuffixPlugin('cjs', {
noExternal: ['lodash-es', 'p-is-promise'],
}),
],
}
7 changes: 7 additions & 0 deletions packages/postcss-config/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# @minko-fe/postcss-config

## 0.1.23

### Patch Changes

- Updated dependencies []:
- @minko-fe/lodash-pro@0.2.4

## 0.1.22

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/postcss-config/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@minko-fe/postcss-config",
"version": "0.1.22",
"version": "0.1.23",
"description": "postcss-config",
"type": "module",
"keywords": [
Expand Down
8 changes: 8 additions & 0 deletions packages/react-component/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# @minko-fe/react-component

## 0.1.26

### Patch Changes

- Updated dependencies []:
- @minko-fe/lodash-pro@0.2.4
- @minko-fe/react-hook@0.2.7

## 0.1.25

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/react-component/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@minko-fe/react-component",
"version": "0.1.25",
"version": "0.1.26",
"description": "react-component",
"type": "module",
"keywords": [
Expand Down
7 changes: 7 additions & 0 deletions packages/react-hook/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# @minko-fe/react-hook

## 0.2.7

### Patch Changes

- Updated dependencies []:
- @minko-fe/lodash-pro@0.2.4

## 0.2.6

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/react-hook/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@minko-fe/react-hook",
"version": "0.2.6",
"version": "0.2.7",
"description": "react-hook",
"type": "module",
"keywords": [
Expand Down
8 changes: 8 additions & 0 deletions packages/react-locale/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# @minko-fe/react-locale

## 0.1.25

### Patch Changes

- Updated dependencies []:
- @minko-fe/lodash-pro@0.2.4
- @minko-fe/vite-config@0.2.5

## 0.1.24

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/react-locale/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@minko-fe/react-locale",
"version": "0.1.24",
"version": "0.1.25",
"description": "react-locale",
"type": "module",
"keywords": [
Expand Down
8 changes: 8 additions & 0 deletions packages/react-route/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# @minko-fe/react-route

## 0.1.25

### Patch Changes

- Updated dependencies []:
- @minko-fe/lodash-pro@0.2.4
- @minko-fe/react-hook@0.2.7

## 0.1.24

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/react-route/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@minko-fe/react-route",
"version": "0.1.24",
"version": "0.1.25",
"description": "react-route",
"type": "module",
"keywords": [
Expand Down
7 changes: 7 additions & 0 deletions packages/vite-config/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# @minko-fe/vite-config

## 0.2.5

### Patch Changes

- Updated dependencies []:
- @minko-fe/lodash-pro@0.2.4

## 0.2.4

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/vite-config/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@minko-fe/vite-config",
"version": "0.2.4",
"version": "0.2.5",
"description": "vite-config",
"type": "module",
"keywords": [
Expand Down
9 changes: 6 additions & 3 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 10 additions & 1 deletion scripts/utils/esbuild/file-suffix-plugin.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,24 @@
import { match } from 'bundle-require'
import { type Plugin } from 'esbuild'
import fs from 'node:fs'
import path from 'node:path'
import { type Options } from 'tsup'

// To aviod nodejs error: ERR_UNSUPPORTED_DIR_IMPORT
export const fileSuffixPlugin = (format: 'cjs' | 'esm'): Plugin => ({
export const fileSuffixPlugin = (format: 'cjs' | 'esm', tsupOptions?: Options): Plugin => ({
name: 'add-file-suffix',
setup(build) {
build.onResolve({ filter: /.*/ }, (args) => {
if (args.kind === 'entry-point') return
let importeePath = args.path

const { external, noExternal } = tsupOptions ?? {}
if (match(importeePath, noExternal)) {
return
}
if (match(importeePath, external)) {
return { external: true }
}
// is external module
if (importeePath[0] !== '.' && !path.isAbsolute(importeePath)) {
return { external: true }
Expand Down

0 comments on commit 1101a83

Please sign in to comment.