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

Commit edc7509

Browse files
authored
Merge pull request #201 from agile-ts/fix-multieditor
fix commonjs bundle
2 parents a45c3b4 + 3b9738d commit edc7509

File tree

35 files changed

+787
-108
lines changed

35 files changed

+787
-108
lines changed

.changeset/early-pants-begin.md

Lines changed: 0 additions & 23 deletions
This file was deleted.

examples/react/develop/multieditor-ts/src/core/signUpEditor.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { createMultieditor, Validator } from '@agile-ts/multieditor';
22
import { generateColor, generateId, isLight } from './utils';
3+
import { globalBind } from '@agile-ts/core';
34

45
export const isValidNameValidator = new Validator()
56
.required()
@@ -71,3 +72,6 @@ export const signUpEditor = createMultieditor((editor) => ({
7172
fixedProperties: ['id'],
7273
reValidateMode: 'afterFirstSubmit',
7374
}));
75+
76+
// For better debugging
77+
globalBind('__core__', { isValidNameValidator, signUpEditor });

package.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,10 @@
4747
"url": "git+https://github.com/agile-ts/agile.git"
4848
},
4949
"devDependencies": {
50+
"@babel/cli": "^7.15.7",
51+
"@babel/core": "^7.15.5",
52+
"@babel/plugin-transform-runtime": "^7.15.0",
53+
"@babel/preset-env": "^7.15.6",
5054
"@changesets/cli": "^2.16.0",
5155
"@rollup/plugin-babel": "^5.3.0",
5256
"@rollup/plugin-node-resolve": "^13.0.4",

packages/api/CHANGELOG.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,23 @@
11
# @agile-ts/api
22

3+
## 0.0.23
4+
5+
### Patch Changes
6+
7+
- 488c87c: #### :nail_care: Polish
8+
9+
- `api`, `core`, `cra-template-agile-typescript`, `cra-template-agile`, `event`, `logger`, `multieditor`, `proxytree`, `react`, `utils`, `vue`
10+
- [#194](https://github.com/agile-ts/agile/pull/194) Commonjs issue ([@bennodev19](https://github.com/bennodev19))
11+
- `core`
12+
- [#195](https://github.com/agile-ts/agile/pull/195) Removed `internal.ts` and resolved cycle dependencies ([@bennodev19](https://github.com/bennodev19))
13+
14+
#### Committers: 1
15+
16+
- BennoDev ([@bennodev19](https://github.com/bennodev19))
17+
18+
- Updated dependencies [488c87c]
19+
- @agile-ts/utils@0.0.9
20+
321
## 0.0.22
422

523
### Patch Changes

packages/api/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@agile-ts/api",
3-
"version": "0.0.22",
3+
"version": "0.0.23",
44
"author": "BennoDev",
55
"license": "MIT",
66
"homepage": "https://agile-ts.org/",
@@ -42,7 +42,7 @@
4242
"@agile-ts/utils": "file:../utils"
4343
},
4444
"dependencies": {
45-
"@agile-ts/utils": "^0.0.8"
45+
"@agile-ts/utils": "^0.0.9"
4646
},
4747
"publishConfig": {
4848
"access": "public"

packages/babel.config.js

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
// https://babeljs.io/docs/en/config-files#config-function-api
2+
export default function getBabelConfig() {
3+
return {
4+
ignore: ['./node_modules'],
5+
presets: [
6+
[
7+
'@babel/preset-env',
8+
{
9+
targets: {
10+
// Only targeting browsers supporting ES Modules (https://babeljs.io/docs/en/babel-preset-env)
11+
// Why?: https://github.com/babel/babel/issues/9849#issuecomment-592668815
12+
esmodules: true,
13+
},
14+
},
15+
],
16+
],
17+
// https://stackoverflow.com/questions/53558916/babel-7-referenceerror-regeneratorruntime-is-not-defined/61517521#61517521
18+
// Unfortunately this plugin requires an external (prod) dependency '@babel/runtime'.
19+
// However the required dependency is also modular and shrinks the bundle size in general due to function reuses.
20+
// (See: https://babeljs.io/docs/en/babel-runtime)
21+
// Note: Required when using "babelHelpers: 'runtime'" in the 'rollup.config.default.js'
22+
// and to support browsers that do not support ES Modules like 'IE11'
23+
// plugins: ['@babel/transform-runtime'],
24+
};
25+
}

packages/core/CHANGELOG.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,24 @@
11
# Change Log
22

3+
## 0.2.4
4+
5+
### Patch Changes
6+
7+
- 488c87c: #### :nail_care: Polish
8+
9+
- `api`, `core`, `cra-template-agile-typescript`, `cra-template-agile`, `event`, `logger`, `multieditor`, `proxytree`, `react`, `utils`, `vue`
10+
- [#194](https://github.com/agile-ts/agile/pull/194) Commonjs issue ([@bennodev19](https://github.com/bennodev19))
11+
- `core`
12+
- [#195](https://github.com/agile-ts/agile/pull/195) Removed `internal.ts` and resolved cycle dependencies ([@bennodev19](https://github.com/bennodev19))
13+
14+
#### Committers: 1
15+
16+
- BennoDev ([@bennodev19](https://github.com/bennodev19))
17+
18+
- Updated dependencies [488c87c]
19+
- @agile-ts/logger@0.0.9
20+
- @agile-ts/utils@0.0.9
21+
322
## 0.2.0
423

524
### Patch Changes

packages/core/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@agile-ts/core",
3-
"version": "0.2.3",
3+
"version": "0.2.5",
44
"author": "BennoDev",
55
"license": "MIT",
66
"homepage": "https://agile-ts.org/",
@@ -55,10 +55,10 @@
5555
"@agile-ts/utils": "file:../utils"
5656
},
5757
"dependencies": {
58-
"@agile-ts/utils": "^0.0.8"
58+
"@agile-ts/utils": "^0.0.9"
5959
},
6060
"peerDependencies": {
61-
"@agile-ts/logger": "^0.0.8"
61+
"@agile-ts/logger": "^0.0.9"
6262
},
6363
"peerDependenciesMeta": {
6464
"@agile-ts/logger": {

packages/core/src/state/public/createState.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
1-
import {
2-
createEnhancedState,
3-
CreateStateConfigInterfaceWithAgile,
4-
} from './index';
51
import { EnhancedState } from '../state.enhanced';
2+
import { createEnhancedState } from './createEnhancedState';
3+
import { CreateStateConfigInterfaceWithAgile } from './index';
64

75
/**
86
* Returns a newly created enhanced State.

packages/cra-template-agile-typescript/CHANGELOG.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,20 @@
11
# cra-template-agile-typescript
22

3+
## 0.0.10
4+
5+
### Patch Changes
6+
7+
- 488c87c: #### :nail_care: Polish
8+
9+
- `api`, `core`, `cra-template-agile-typescript`, `cra-template-agile`, `event`, `logger`, `multieditor`, `proxytree`, `react`, `utils`, `vue`
10+
- [#194](https://github.com/agile-ts/agile/pull/194) Commonjs issue ([@bennodev19](https://github.com/bennodev19))
11+
- `core`
12+
- [#195](https://github.com/agile-ts/agile/pull/195) Removed `internal.ts` and resolved cycle dependencies ([@bennodev19](https://github.com/bennodev19))
13+
14+
#### Committers: 1
15+
16+
- BennoDev ([@bennodev19](https://github.com/bennodev19))
17+
318
## 0.0.9
419

520
### Patch Changes

0 commit comments

Comments
 (0)