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

Commit 47922ee

Browse files
authored
Merge pull request #194 from agile-ts/commonjs-issue
Commonjs issue
2 parents 80e7128 + 06c46f1 commit 47922ee

File tree

126 files changed

+1684
-1299
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

126 files changed

+1684
-1299
lines changed

.github/ISSUE_TEMPLATE/SUPPORT.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
name: 🆘 Support, Help, and Advice
3+
about: 👉🏽 Need help or tech support? Please don't open an issue! Head to https://github.com/agile-ts/agile/discussions or https://stackoverflow.com/questions/tagged/agile-ts.
4+
---
5+
6+
Hey there! If you need help or tech support then this is not the place to ask.
7+
Please head to the [AgileTs Discord](https://discord.com/T9GzreAwPH) instead
8+
or post a question to [Stackoverflow](https://stackoverflow.com/questions/tagged/agile-ts).
9+
10+
If you arrived here because you think AgileTs's documentation is unclear,
11+
insufficient or wrong, please consider creating an issue for the documentation [here](https://github.com/agile-ts/documentation) instead.

.prettierrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@
1010
"trailingComma": "es5",
1111
"endOfLine": "lf",
1212
"semi": true
13-
}
13+
}

benchmark/runtime/benchmarkTypes.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,5 +146,4 @@ export const startBundleBench = async (entry: string, isDev: boolean) => {
146146
);
147147

148148
console.log(metafile);
149-
// TODO analyze metafile
150149
};

examples/nextjs/develop/clock/pages/ssg.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ export default function SSG() {
88
}
99

1010
// If you build and start the app, the date returned here will have the same
11-
// value for all requests, as this method gets executed at build time.
11+
// value for all requests, as this method gets executed at build time. (see browser network tab)
1212
export function getStaticProps() {
1313
const initialCore = {
1414
light: LIGHT.value,

examples/nextjs/develop/clock/pages/ssr.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ export default function SSR() {
99

1010
// The date returned here will be different for every request that hits the page,
1111
// that is because the page becomes a serverless function instead of being statically
12-
// exported when you use `getServerSideProps` or `getInitialProps`
12+
// exported when you use `getServerSideProps` or `getInitialProps`. (see browser network tab)
1313
export function getServerSideProps() {
1414
tick(Date.now(), false);
1515

examples/plainjs/develop/tree-shaking/package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"main": "src/index.js",
66
"scripts": {
77
"test": "echo \"Error: no test specified\" && exit 1",
8-
"build": "webpack",
8+
"build": "shx rm -rf dist && webpack",
99
"install:dev:agile": "yalc add @agile-ts/core @agile-ts/logger & yarn install",
1010
"install:prod:agile": "yarn add @agile-ts/core @agile-ts/logger & yarn install"
1111
},
@@ -17,6 +17,7 @@
1717
},
1818
"dependencies": {
1919
"@agile-ts/core": "file:.yalc/@agile-ts/core",
20-
"@agile-ts/logger": "file:.yalc/@agile-ts/logger"
20+
"@agile-ts/logger": "file:.yalc/@agile-ts/logger",
21+
"@agile-ts/react": "file:.yalc/@agile-ts/react"
2122
}
2223
}

examples/react/develop/functional-component-ts/yarn.lock

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88
"@agile-ts/utils" "^0.0.7"
99

1010
"@agile-ts/core@file:.yalc/@agile-ts/core":
11-
version "0.2.0-alpha.4"
11+
version "0.2.0"
1212
dependencies:
13-
"@agile-ts/utils" "^0.0.7"
13+
"@agile-ts/utils" "^0.0.8"
1414

1515
"@agile-ts/event@file:.yalc/@agile-ts/event":
1616
version "0.0.10"
@@ -27,13 +27,18 @@
2727
version "0.0.5"
2828

2929
"@agile-ts/react@file:.yalc/@agile-ts/react":
30-
version "0.2.0-alpha.1"
30+
version "0.2.0"
3131

3232
"@agile-ts/utils@^0.0.7":
3333
version "0.0.7"
3434
resolved "https://registry.yarnpkg.com/@agile-ts/utils/-/utils-0.0.7.tgz#3dd1add6b9f63d0a5bf35e71f54ac46448ae047f"
3535
integrity sha512-OviTDC+ZbfyiUx8Gy8veS6YymC/tT6UeP23nT8V0EQV4F2MmuWqZ2yiKk+AYxZx8h74Ey8BVEUX6/ntpxhSNPw==
3636

37+
"@agile-ts/utils@^0.0.8":
38+
version "0.0.8"
39+
resolved "https://registry.yarnpkg.com/@agile-ts/utils/-/utils-0.0.8.tgz#ab9e1eeaddf282340936bddeb74421a2f77de804"
40+
integrity sha512-ex19gPIS5imgV+rzs5HE2CNAIkQ162hPWH5u3HKNZnHiVU6FX62sikH5tG2oQocbDb7FkeB16D7v9ihQeuKYug==
41+
3742
"@babel/code-frame@7.8.3":
3843
version "7.8.3"
3944
resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.8.3.tgz#33e25903d7481181534e12ec0a25f16b6fcf419e"

examples/react/release/boxes/yarn.lock

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,25 +3,25 @@
33

44

55
"@agile-ts/core@file:.yalc/@agile-ts/core":
6-
version "0.2.0-alpha.4"
6+
version "0.2.1"
77
dependencies:
8-
"@agile-ts/utils" "^0.0.7"
8+
"@agile-ts/utils" "^0.0.8"
99

1010
"@agile-ts/logger@file:.yalc/@agile-ts/logger":
11-
version "0.0.7"
11+
version "0.0.8"
1212
dependencies:
13-
"@agile-ts/utils" "^0.0.7"
13+
"@agile-ts/utils" "^0.0.8"
1414

1515
"@agile-ts/proxytree@file:.yalc/@agile-ts/proxytree":
16-
version "0.0.5"
16+
version "0.0.6"
1717

1818
"@agile-ts/react@file:.yalc/@agile-ts/react":
19-
version "0.2.0-alpha.1"
19+
version "0.2.0"
2020

21-
"@agile-ts/utils@^0.0.7":
22-
version "0.0.7"
23-
resolved "https://registry.yarnpkg.com/@agile-ts/utils/-/utils-0.0.7.tgz#3dd1add6b9f63d0a5bf35e71f54ac46448ae047f"
24-
integrity sha512-OviTDC+ZbfyiUx8Gy8veS6YymC/tT6UeP23nT8V0EQV4F2MmuWqZ2yiKk+AYxZx8h74Ey8BVEUX6/ntpxhSNPw==
21+
"@agile-ts/utils@^0.0.8":
22+
version "0.0.8"
23+
resolved "https://registry.yarnpkg.com/@agile-ts/utils/-/utils-0.0.8.tgz#ab9e1eeaddf282340936bddeb74421a2f77de804"
24+
integrity sha512-ex19gPIS5imgV+rzs5HE2CNAIkQ162hPWH5u3HKNZnHiVU6FX62sikH5tG2oQocbDb7FkeB16D7v9ihQeuKYug==
2525

2626
"@babel/code-frame@7.10.4":
2727
version "7.10.4"

package.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,12 +48,16 @@
4848
},
4949
"devDependencies": {
5050
"@changesets/cli": "^2.16.0",
51+
"@rollup/plugin-babel": "^5.3.0",
52+
"@rollup/plugin-node-resolve": "^13.0.4",
53+
"@rollup/plugin-typescript": "^8.2.5",
5154
"@size-limit/file": "^5.0.1",
5255
"@types/jest": "^26.0.24",
5356
"@types/node": "^16.3.2",
5457
"@typescript-eslint/eslint-plugin": "^4.28.3",
5558
"@typescript-eslint/parser": "^4.28.3",
5659
"coveralls": "^3.1.1",
60+
"esbuild": "^0.12.28",
5761
"eslint": "^7.30.0",
5862
"eslint-config-node": "^4.1.0",
5963
"eslint-config-prettier": "^8.3.0",
@@ -65,6 +69,10 @@
6569
"lerna-changelog": "^1.0.1",
6670
"nodemon": "^2.0.12",
6771
"prettier": "^2.3.2",
72+
"rollup": "^2.56.3",
73+
"rollup-plugin-bundle-size": "^1.0.3",
74+
"rollup-plugin-esbuild": "^4.5.0",
75+
"shx": "^0.3.3",
6876
"size-limit": "^5.0.1",
6977
"ts-jest": "^26.5.6",
7078
"ts-node": "^10.1.0",

packages/api/package.json

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,22 @@
1515
"main": "dist/index.js",
1616
"module": "dist/esm/index.js",
1717
"types": "dist/index.d.ts",
18+
"exports": {
19+
"./package.json": "./package.json",
20+
".": {
21+
"types": "./dist/index.d.ts",
22+
"module": "./dist/esm/index.js",
23+
"import": "./dist/esm/index.js",
24+
"default": "./dist/index.js"
25+
}
26+
},
1827
"scripts": {
19-
"build": "yarn run build:esm && yarn run build:cjs",
28+
"build": "shx rm -rf dist && rollup --c rollup.config.js",
2029
"prepare": "yarn run build",
21-
"build:esm": "tsc -p ./tsconfig.esm.json",
22-
"build:cjs": "tsc -p ./tsconfig.json && tsc -p ./tsconfig.production.json",
2330
"dev:publish": "yalc publish",
2431
"dev:push": "yalc push",
2532
"watch:push": "tsc-watch --onSuccess \"yarn run dev:push\"",
26-
"watch": "tsc -w",
33+
"watch": "shx rm -rf dist && tsc -w",
2734
"release": "yarn run prepare",
2835
"release:manual": "yarn run prepare && yarn run release && npm publish",
2936
"pack": "npm pack",

0 commit comments

Comments
 (0)