Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve ESM support by using import with file extensions #302

Open
wants to merge 73 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
73 commits
Select commit Hold shift + click to select a range
a32b402
fix: ESM by using import with file extensions
JumpLink Jul 12, 2022
d3a040f
fix: Fix jest config to allow .js extensions
JumpLink Jul 12, 2022
983bec6
fix: Fix angular webpack config to allow .js extensions
JumpLink Jul 12, 2022
1c8f7b0
fix: Add custom angular webpack config for api-console-guiFix to allo…
JumpLink Jul 13, 2022
2cfedb4
Merge branch 'master' into esm-extension-import
JumpLink Jul 18, 2022
f31e5c8
Merge branch 'master' into esm-extension-import
JumpLink Jul 18, 2022
02041ea
chore: Lint import file extensions
JumpLink Jul 18, 2022
fac976b
chore: New lint:ext npm script
JumpLink Jul 18, 2022
47f3679
Merge branch 'esm-extension-import' into lint-file-extension
JumpLink Jul 18, 2022
6208747
Merge master into lint-file-extension
JumpLink Jul 19, 2022
3f11d2b
Merge master into esm-extension-import
JumpLink Jul 19, 2022
4671f8a
Merge branch 'esm-extension-import' into lint-file-extension
JumpLink Jul 19, 2022
527dc84
Merge branch 'master' into esm-extension-import
JumpLink Jul 19, 2022
ee66dda
fix(rpc-tests): Fix import MemoryLoggerTransport
JumpLink Jul 19, 2022
c79d567
Merge branch 'master' into esm-extension-import
JumpLink Jul 19, 2022
0c77420
Merge branch 'esm-extension-import' into lint-file-extension
JumpLink Jul 19, 2022
4451660
fix: ESM imports for api-console-gui
JumpLink Jul 19, 2022
5741844
fix: Fix require and __dirname for ESM
JumpLink Jul 19, 2022
276f7e2
chore(example-app): Move from CJS to ESM
JumpLink Jul 19, 2022
ac0b8d6
Merge branch 'esm-extension-import' of github.com:gjsify/deepkit-fram…
JumpLink Jul 19, 2022
6dbfc39
chore(example-app): Add support for ESM and CJS
JumpLink Jul 19, 2022
75f27fa
chore: Moved getDirname to @deepkit/core
JumpLink Jul 19, 2022
f4b9b66
Merge branch 'master' into esm-extension-import
JumpLink Jul 19, 2022
d6772eb
chore(esm): Add Node.js independent __dirname implementation
JumpLink Jul 20, 2022
de393a7
fix: Fix jsx and test by removing jsx.Fragment
JumpLink Jul 20, 2022
f8bdd4e
fix: Invalid json in packages/example-app/tsconfig.json
JumpLink Jul 20, 2022
9e201b8
fix: ng build deprecated --prod warning
JumpLink Jul 20, 2022
295417c
Merge branch 'esm-extension-import' into lint-file-extension
JumpLink Jul 20, 2022
4cd70d1
fix: Try to fix jsx and test by set jsx.Fragment to undefined
JumpLink Jul 20, 2022
94b460e
feat(platform): Initial new package
JumpLink Jul 22, 2022
ef262b2
chore(platform): Make use of the new platform package
JumpLink Jul 22, 2022
3e14209
chore(github): Add github action workflows for the new platform package
JumpLink Jul 22, 2022
bf2fa23
fix(platform): Add platform as dependency
JumpLink Jul 22, 2022
7ce435c
Merge remote-tracking branch 'upstream/master' into esm-extension-import
JumpLink Jul 22, 2022
9d54527
chore(github): Use npm ci instead of npm install
JumpLink Jul 22, 2022
10ac9d5
chore(github): Use bootstrap:ci instead of bootstrap
JumpLink Jul 22, 2022
c4e495a
chore(github): Update package-lock.json
JumpLink Jul 22, 2022
e406f7e
fix(framework): Install @deepkit/platform as a default dependency (no…
JumpLink Jul 22, 2022
211b68f
chore(github): Platform tests: Only run bootstrap:ci for @deepkit/pla…
JumpLink Jul 22, 2022
7b5ed00
chore(github): Platform tests: Also run bootstrap:ci for @deepkit/typ…
JumpLink Jul 22, 2022
29fafc5
chore(github): Platform tests: Do not link the packages (platform has…
JumpLink Jul 22, 2022
6cecae4
Merge branch 'master' into esm-extension-import
JumpLink Jul 25, 2022
09a5055
Merge branch 'esm-extension-import' into lint-file-extension
JumpLink Jul 25, 2022
64394ab
fix(github): Run build:platform before install-compiler
JumpLink Jul 25, 2022
90077b9
fix(lint): Fix new lint errors
JumpLink Jul 25, 2022
8c51a09
fix(lint): Fix lint workflow
JumpLink Jul 25, 2022
445f402
fix(github): Fix workflows
JumpLink Jul 25, 2022
a213a33
fix(platform): Fix build npm script
JumpLink Jul 25, 2022
36c8ab5
fix(ci): Build platform before run install-compiler
JumpLink Jul 25, 2022
f91b2fc
fix(type-compiler): Do not use @deepkit/platform
JumpLink Jul 25, 2022
55da098
fix(github): Fix workflows again
JumpLink Jul 25, 2022
7d1eeb0
fix(github): Only bootstrap @deepkit/platform
JumpLink Jul 25, 2022
ee97022
fix(platform): Do not run clear before build to fix build on windows
JumpLink Jul 25, 2022
aaf5335
fix(platform): Add browser test assets to repo for faster tests
JumpLink Jul 25, 2022
28302c5
fix(ci): Build platform before build anything else
JumpLink Jul 25, 2022
c9ff3ba
fix(ci): Fix platform build by allow just the default tsc command
JumpLink Jul 25, 2022
49b1c77
chore(platform): Platform structure adapted to skeleton + add referen…
JumpLink Jul 25, 2022
58fe7eb
Merge branch 'master' into esm-extension-import
JumpLink Jul 26, 2022
bf52d15
fix(test): Fix imports in tests
JumpLink Jul 26, 2022
8d21b31
fix(tests): Downgrade typescript from 4.7.4 to 4.6.2 again
JumpLink Jul 27, 2022
b084236
fix(tests): Downgrade typescript from 4.7.4 to 4.6.2 again (package-l…
JumpLink Jul 27, 2022
23f37b1
chore(tsconfig): Update tsconfig files using sync-tsconfig-deps.js
JumpLink Jul 27, 2022
c2c8721
fix: Import of typescript
JumpLink Jul 28, 2022
44e0c71
Merge remote-tracking branch 'upstream/master' into esm-extension-import
JumpLink Jul 28, 2022
3f0ac2a
chore(github): Move all new workflows into main.yml
JumpLink Jul 28, 2022
e0b4e08
chore(core) Removed getCurrentFileName method
JumpLink Jul 29, 2022
83eeaf6
chore: Revert DEVELOPMENT.md
JumpLink Jul 31, 2022
e2a9e2f
Merge branch 'master' into esm-extension-import
JumpLink Aug 2, 2022
31b1dad
chore(platform): Bump version 1.0.1-alpha.75
JumpLink Aug 8, 2022
3ccf85b
Merge branch 'master' into esm-extension-import
JumpLink Aug 8, 2022
c331fed
fix: New issues after master merge
JumpLink Aug 8, 2022
764d69f
Merge branch 'master' into esm-extension-import
JumpLink Aug 24, 2022
52b99bc
chore(platform): Add platform as a dependency to more packages of the…
JumpLink Aug 24, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix(github): Run build:platform before install-compiler
  • Loading branch information
JumpLink committed Jul 25, 2022
commit 64394aba7716d6041e5bccd81a5935c197a98a0e
20 changes: 20 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Lint
on:
pull_request:
push:

jobs:
browser:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: 16
- name: npm install
run: npm ci
- name: Check import file extensions
run: npm run lint
npm run lint:ext
22 changes: 0 additions & 22 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,28 +5,6 @@ on:
push:

jobs:
lint:
runs-on: buildjet-2vcpu-ubuntu-2004
strategy:
matrix:
node-version: [ 16.x ]
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Cache node_modules
uses: actions/cache@v1
with:
path: "**/node_modules"
key: ${{ runner.os }}-all2-node_modules-${{ hashFiles('**/package-lock.json') }}
- name: npm install
run: npm ci
- name: Check import file extensions
run: npm run lint
npm run lint:ext

unit-tests:
runs-on: buildjet-2vcpu-ubuntu-2004
strategy:
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/platform-browser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:

jobs:
browser:
runs-on: ubuntu-22.04
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
Expand All @@ -16,12 +16,12 @@ jobs:
- name: Install NPM dependencies
run: npm ci
- name: Bootstrap
run: npm run bootstrap:ci -- --scope="@deepkit/platform"
# - name: Link
# run: npm run link
# - name: Install compiler
# run: npm run install-compiler
run: npm run bootstrap:ci
- name: Link
run: npm run link
- name: Build
run: npm run lerna -- build --scope="@deepkit/platform"
run: npm run build:platform"
- name: Install compiler
run: npm run install-compiler
- name: Test
run: npm run lerna -- test:browser --scope="@deepkit/platform"
12 changes: 6 additions & 6 deletions .github/workflows/platform-deno.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,12 @@ jobs:
- name: Install NPM dependencies
run: npm ci
- name: Bootstrap
run: npm run bootstrap:ci -- --scope="@deepkit/platform"
# - name: Link
# run: npm run link
# - name: Install compiler
# run: npm run install-compiler
run: npm run bootstrap:ci
- name: Link
run: npm run link
- name: Build
run: npm run lerna -- build --scope="@deepkit/platform"
run: npm run build:platform"
- name: Install compiler
run: npm run install-compiler
- name: Test
run: npm run lerna -- test:deno --scope="@deepkit/platform"
12 changes: 6 additions & 6 deletions .github/workflows/platform-gjs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@ jobs:
- name: Install NPM dependencies
run: npm ci
- name: Bootstrap
run: npm run bootstrap:ci -- --scope="@deepkit/platform"
# - name: Link
# run: npm run link
# - name: Install compiler
# run: npm run install-compiler
run: npm run bootstrap:ci
- name: Link
run: npm run link
- name: Build
run: npm run lerna -- build --scope="@deepkit/platform"
run: npm run build:platform"
- name: Install compiler
run: npm run install-compiler
- name: Test
run: npm run lerna -- test:gjs --scope="@deepkit/platform"
12 changes: 6 additions & 6 deletions .github/workflows/platform-node.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@ jobs:
- name: Install NPM dependencies
run: npm ci
- name: Bootstrap
run: npm run bootstrap:ci -- --scope="@deepkit/platform"
# - name: Link
# run: npm run link
# - name: Install compiler
# run: npm run install-compiler
run: npm run bootstrap:ci
- name: Link
run: npm run link
- name: Build
run: npm run lerna -- build --scope="@deepkit/platform"
run: npm run build:platform"
- name: Install compiler
run: npm run install-compiler
- name: Test
run: npm run lerna -- test:node --scope="@deepkit/platform"
1 change: 1 addition & 0 deletions DEVELOPMENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ cd deepkit-framework
npm install
npm run bootstrap
npm run link
npm run build:platform
npm run install-compiler
```

Expand Down
14 changes: 7 additions & 7 deletions package-lock.json

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

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"bootstrap": "lerna bootstrap --no-ci",
"bootstrap:ci": "lerna bootstrap --ignore @deepkit/benchmark",
"link": "npm-local-development --no-watcher",
"build:platform": "lerna run build --scope='@deepkit/platform'",
"build": "tsc --build tsconfig.json && tsc --build tsconfig.esm.json && lerna run build",
"build:esm": "tsc --build tsconfig.esm.json",
"tsc": "tsc --build",
Expand Down Expand Up @@ -42,7 +43,7 @@
"ts-node": "^10.9.1",
"ts-node-dev": "^1.1.1",
"typedoc": "^0.23.2",
"typescript": "^4.6.2"
"typescript": "^4.7.4"
},
"engines": {
"node": ">= 14.0.0"
Expand Down
3 changes: 3 additions & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
{
"files": [],
"references": [
{
"path": "packages/platform/tsconfig.json"
},
{
"path": "packages/core/tsconfig.json"
},
Expand Down