Skip to content

Commit

Permalink
chore(publish): v2.0.0-beta.14
Browse files Browse the repository at this point in the history
  • Loading branch information
janryWang committed Apr 7, 2021
1 parent 63227f7 commit 0e3cc60
Show file tree
Hide file tree
Showing 16 changed files with 74 additions and 86 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@
"mfetch": "^0.2.27",
"mobx": "^6.0.4",
"mobx-react-lite": "^3.1.6",
"escape-string-regexp":"^4.0.0",
"onchange": "^5.2.0",
"opencollective": "^1.0.3",
"opencollective-postinstall": "^2.0.2",
Expand Down
53 changes: 20 additions & 33 deletions packages/antd/copy.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { copy, readFile, writeFile, existsSync } from 'fs-extra'
import { copySync, readFileSync, writeFileSync, existsSync } from 'fs-extra'
import glob from 'glob'

import excape from 'escape-string-regexp'
export const runCopy = ({
esStr,
libStr,
Expand All @@ -10,42 +10,29 @@ export const runCopy = ({
return Promise.resolve()
}

const fileContent: string = (await readFile(filename)).toString()

return writeFile(
const fileContent: string = readFileSync(filename, 'utf-8')
writeFileSync(
filename,
fileContent.replace(new RegExp(libStr, 'g'), esStr)
fileContent.replace(new RegExp(excape(libStr), 'g'), esStr),
{
encoding: 'utf-8',
}
)
}

return new Promise((resolve, reject) => {
glob(`./src/**/*`, (err, files) => {
if (err) {
return reject(err)
}

const all = [] as Promise<unknown>[]

for (let i = 0; i < files.length; i += 1) {
const filename = files[i]

if (/\.(less|scss)$/.test(filename)) {
all.push(copy(filename, filename.replace(/src\//, 'esm/')))
all.push(copy(filename, filename.replace(/src\//, 'lib/')))

continue
}

if (/\/style.ts$/.test(filename)) {
replaceOperation(
filename.replace(/src\//, 'esm/').replace(/\.ts$/, '.js')
)

continue
}
glob(`./src/**/*`, (err, files) => {
if (err) {
throw err
}
files.forEach((filename) => {
if (/\.(less|scss)$/.test(filename)) {
copySync(filename, filename.replace(/src\//, 'esm/'))
copySync(filename, filename.replace(/src\//, 'lib/'))
} else if (/\/style.ts$/.test(filename)) {
replaceOperation(
filename.replace(/src\//, 'esm/').replace(/\.ts$/, '.js')
)
}

return Promise.all(all).then(resolve).catch(reject)
})
})
}
Expand Down
14 changes: 7 additions & 7 deletions packages/antd/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@formily/antd",
"version": "2.0.0-beta.13",
"version": "2.0.0-beta.14",
"license": "MIT",
"main": "lib",
"module": "esm",
Expand Down Expand Up @@ -42,12 +42,12 @@
},
"dependencies": {
"@ant-design/icons": "^4.0.0",
"@formily/core": "^2.0.0-beta.13",
"@formily/json-schema": "^2.0.0-beta.13",
"@formily/react": "^2.0.0-beta.13",
"@formily/reactive": "^2.0.0-beta.13",
"@formily/reactive-react": "^2.0.0-beta.13",
"@formily/shared": "^2.0.0-beta.13",
"@formily/core": "^2.0.0-beta.14",
"@formily/json-schema": "^2.0.0-beta.14",
"@formily/react": "^2.0.0-beta.14",
"@formily/reactive": "^2.0.0-beta.14",
"@formily/reactive-react": "^2.0.0-beta.14",
"@formily/shared": "^2.0.0-beta.14",
"classnames": "^2.2.6",
"react-sortable-hoc": "^1.11.0",
"react-sticky-box": "^0.9.3",
Expand Down
8 changes: 4 additions & 4 deletions packages/core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@formily/core",
"version": "2.0.0-beta.13",
"version": "2.0.0-beta.14",
"license": "MIT",
"main": "lib",
"module": "esm",
Expand Down Expand Up @@ -35,9 +35,9 @@
"dumi": "^1.1.0-rc.8"
},
"dependencies": {
"@formily/reactive": "^2.0.0-beta.13",
"@formily/shared": "^2.0.0-beta.13",
"@formily/validator": "^2.0.0-beta.13"
"@formily/reactive": "^2.0.0-beta.14",
"@formily/shared": "^2.0.0-beta.14",
"@formily/validator": "^2.0.0-beta.14"
},
"publishConfig": {
"access": "public"
Expand Down
6 changes: 3 additions & 3 deletions packages/devtools/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@formily/devtools",
"version": "2.0.0-beta.13",
"version": "2.0.0-beta.14",
"license": "MIT",
"repository": {
"type": "git",
Expand All @@ -20,8 +20,8 @@
"start": "webpack-dev-server --config config/webpack.dev.js"
},
"dependencies": {
"@formily/core": "^2.0.0-beta.13",
"@formily/shared": "^2.0.0-beta.13",
"@formily/core": "^2.0.0-beta.14",
"@formily/shared": "^2.0.0-beta.14",
"react": "^17.0.0",
"react-dom": "^17.0.0",
"react-json-view": "^1.19.1",
Expand Down
8 changes: 4 additions & 4 deletions packages/json-schema/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@formily/json-schema",
"version": "2.0.0-beta.13",
"version": "2.0.0-beta.14",
"license": "MIT",
"main": "lib",
"module": "esm",
Expand All @@ -27,9 +27,9 @@
"build:umd": "rollup --config"
},
"dependencies": {
"@formily/core": "^2.0.0-beta.13",
"@formily/reactive": "^2.0.0-beta.13",
"@formily/shared": "^2.0.0-beta.13"
"@formily/core": "^2.0.0-beta.14",
"@formily/reactive": "^2.0.0-beta.14",
"@formily/shared": "^2.0.0-beta.14"
},
"publishConfig": {
"access": "public"
Expand Down
14 changes: 7 additions & 7 deletions packages/next/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@formily/next",
"version": "2.0.0-beta.13",
"version": "2.0.0-beta.14",
"license": "MIT",
"main": "lib",
"umd:main": "dist/formily.next.umd.production.js",
Expand Down Expand Up @@ -42,12 +42,12 @@
},
"dependencies": {
"@ant-design/icons": "^4.0.0",
"@formily/core": "^2.0.0-beta.13",
"@formily/json-schema": "^2.0.0-beta.13",
"@formily/react": "^2.0.0-beta.13",
"@formily/reactive": "^2.0.0-beta.13",
"@formily/reactive-react": "^2.0.0-beta.13",
"@formily/shared": "^2.0.0-beta.13",
"@formily/core": "^2.0.0-beta.14",
"@formily/json-schema": "^2.0.0-beta.14",
"@formily/react": "^2.0.0-beta.14",
"@formily/reactive": "^2.0.0-beta.14",
"@formily/reactive-react": "^2.0.0-beta.14",
"@formily/shared": "^2.0.0-beta.14",
"classnames": "^2.2.6",
"react-sortable-hoc": "^1.11.0",
"react-sticky-box": "^0.9.3",
Expand Down
2 changes: 1 addition & 1 deletion packages/next/src/array-table/style.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ import '@alifd/next/lib/badge/style'
import '@alifd/next/lib/pagination/style'
import '@alifd/next/lib/select/style'
import '@alifd/next/lib/table/style'
import './main.scss'
import './main.scss'
2 changes: 1 addition & 1 deletion packages/path/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@formily/path",
"version": "2.0.0-beta.13",
"version": "2.0.0-beta.14",
"license": "MIT",
"main": "lib",
"module": "esm",
Expand Down
14 changes: 7 additions & 7 deletions packages/react/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@formily/react",
"version": "2.0.0-beta.13",
"version": "2.0.0-beta.14",
"license": "MIT",
"main": "lib",
"module": "esm",
Expand Down Expand Up @@ -38,12 +38,12 @@
"dumi": "^1.1.0-rc.8"
},
"dependencies": {
"@formily/core": "^2.0.0-beta.13",
"@formily/json-schema": "^2.0.0-beta.13",
"@formily/reactive": "^2.0.0-beta.13",
"@formily/reactive-react": "^2.0.0-beta.13",
"@formily/shared": "^2.0.0-beta.13",
"@formily/validator": "^2.0.0-beta.13",
"@formily/core": "^2.0.0-beta.14",
"@formily/json-schema": "^2.0.0-beta.14",
"@formily/reactive": "^2.0.0-beta.14",
"@formily/reactive-react": "^2.0.0-beta.14",
"@formily/shared": "^2.0.0-beta.14",
"@formily/validator": "^2.0.0-beta.14",
"hoist-non-react-statics": "^3.3.2"
},
"publishConfig": {
Expand Down
6 changes: 3 additions & 3 deletions packages/reactive-react/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@formily/reactive-react",
"version": "2.0.0-beta.13",
"version": "2.0.0-beta.14",
"license": "MIT",
"main": "lib",
"module": "esm",
Expand Down Expand Up @@ -38,8 +38,8 @@
"dumi": "^1.1.0-rc.8"
},
"dependencies": {
"@formily/reactive": "^2.0.0-beta.13",
"@formily/shared": "^2.0.0-beta.13",
"@formily/reactive": "^2.0.0-beta.14",
"@formily/shared": "^2.0.0-beta.14",
"hoist-non-react-statics": "^3.3.2"
},
"publishConfig": {
Expand Down
6 changes: 3 additions & 3 deletions packages/reactive-vue/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@formily/reactive-vue",
"version": "2.0.0-beta.13",
"version": "2.0.0-beta.14",
"license": "MIT",
"main": "lib",
"module": "esm",
Expand Down Expand Up @@ -41,8 +41,8 @@
"vuepress": "^1.8.2"
},
"dependencies": {
"@formily/reactive": "^2.0.0-beta.13",
"@formily/shared": "^2.0.0-beta.13",
"@formily/reactive": "^2.0.0-beta.14",
"@formily/shared": "^2.0.0-beta.14",
"vue-demi": "latest"
},
"publishConfig": {
Expand Down
4 changes: 2 additions & 2 deletions packages/reactive/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@formily/reactive",
"version": "2.0.0-beta.13",
"version": "2.0.0-beta.14",
"license": "MIT",
"main": "lib",
"module": "esm",
Expand Down Expand Up @@ -32,7 +32,7 @@
"dumi": "^1.1.0-rc.8"
},
"dependencies": {
"@formily/shared": "^2.0.0-beta.13"
"@formily/shared": "^2.0.0-beta.14"
},
"publishConfig": {
"access": "public"
Expand Down
4 changes: 2 additions & 2 deletions packages/shared/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@formily/shared",
"version": "2.0.0-beta.13",
"version": "2.0.0-beta.14",
"license": "MIT",
"main": "lib",
"module": "esm",
Expand Down Expand Up @@ -34,7 +34,7 @@
"@types/react": ">=16.8.0 || >=17.0.0"
},
"dependencies": {
"@formily/path": "^2.0.0-beta.13",
"@formily/path": "^2.0.0-beta.14",
"camel-case": "^4.1.1",
"lower-case": "^2.0.1",
"no-case": "^3.0.4",
Expand Down
4 changes: 2 additions & 2 deletions packages/validator/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@formily/validator",
"version": "2.0.0-beta.13",
"version": "2.0.0-beta.14",
"license": "MIT",
"main": "lib",
"module": "esm",
Expand All @@ -27,7 +27,7 @@
"build:umd": "rollup --config"
},
"dependencies": {
"@formily/shared": "^2.0.0-beta.13"
"@formily/shared": "^2.0.0-beta.14"
},
"publishConfig": {
"access": "public"
Expand Down
14 changes: 7 additions & 7 deletions packages/vue/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@formily/vue",
"version": "2.0.0-beta.13",
"version": "2.0.0-beta.14",
"license": "MIT",
"main": "lib",
"module": "esm",
Expand Down Expand Up @@ -32,12 +32,12 @@
"vuepress": "^1.8.2"
},
"dependencies": {
"@formily/core": "^2.0.0-beta.13",
"@formily/json-schema": "^2.0.0-beta.13",
"@formily/reactive": "^2.0.0-beta.13",
"@formily/reactive-vue": "^2.0.0-beta.13",
"@formily/shared": "^2.0.0-beta.13",
"@formily/validator": "^2.0.0-beta.13",
"@formily/core": "^2.0.0-beta.14",
"@formily/json-schema": "^2.0.0-beta.14",
"@formily/reactive": "^2.0.0-beta.14",
"@formily/reactive-vue": "^2.0.0-beta.14",
"@formily/shared": "^2.0.0-beta.14",
"@formily/validator": "^2.0.0-beta.14",
"vue-demi": "latest",
"vue-frag": "^1.1.4"
},
Expand Down

0 comments on commit 0e3cc60

Please sign in to comment.