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

Typescript conversion #621

Merged
merged 174 commits into from
Nov 28, 2023
Merged
Changes from 1 commit
Commits
Show all changes
174 commits
Select commit Hold shift + click to select a range
c01794a
Add setup for building with typescript
craigbeck Jun 26, 2023
1237529
Use internal refs to lib
craigbeck Jul 25, 2023
81a9fe4
Move files from lib/ to src/
craigbeck Jul 26, 2023
18b187b
Build from src/ to dist/ and adjust test require paths to test built …
craigbeck Jul 26, 2023
c8b1cc4
Fix eslint paths
craigbeck Jul 26, 2023
d52e56c
Rename util.js
craigbeck Jul 26, 2023
f9f27b2
Use export
craigbeck Jul 26, 2023
24f3fc3
Rename dependencyOptions.js
craigbeck Jul 26, 2023
25ba3cf
Convert dependencyOptions to typescript
craigbeck Jul 26, 2023
bdcf8c7
Rename contexts.js
craigbeck Jul 26, 2023
dbc5f10
Convert context to typescript
craigbeck Jul 26, 2023
a57b9f8
Convert operatorFns to typescript
craigbeck Jul 26, 2023
774a441
Rename expressions.js
craigbeck Jul 26, 2023
dbd2f96
Convert expressions to typescript
craigbeck Jul 27, 2023
9d99006
Rename templates.js
craigbeck Jul 28, 2023
e7e6067
Use import for serialize-object
craigbeck Jul 28, 2023
e9ee6ad
No console log in test
craigbeck Aug 1, 2023
5ff3626
Add dom to tsconfig lib
craigbeck Aug 1, 2023
3108a6e
Fix misnamed functions
craigbeck Aug 1, 2023
ecdb38c
Convert tempaltes to typescript (19 tests fail)
craigbeck Aug 2, 2023
6b27008
Fix misnamed method
craigbeck Aug 2, 2023
2eb792f
Add initial typescript linting setup
craigbeck Aug 2, 2023
c891717
Automated eslint --fix
craigbeck Aug 2, 2023
c90c713
Lint fixes
craigbeck Aug 2, 2023
d83d26d
Change to @ts-expect-error or resolve @ts-error
craigbeck Aug 2, 2023
12952f1
Remove node 14, add node 20 to test matrix
craigbeck Aug 2, 2023
8381520
Fix test for parsing error to pass on node v20 (v20 changed error mes…
craigbeck Aug 2, 2023
8470cb4
Adding types to context and templates
craigbeck Aug 2, 2023
d8dc21c
More typing; 2 DynamicElement test failures
craigbeck Aug 3, 2023
6e4e9b3
Fix DynamicElement tests by moving shared Element behavior to BaseEle…
ericyhwang Aug 7, 2023
4d6321a
Sort imports
craigbeck Aug 7, 2023
c241d81
Type render functions
craigbeck Aug 7, 2023
7687caf
Expression method typings
craigbeck Aug 8, 2023
cdeaaa0
Skip unimplemented test
craigbeck Aug 8, 2023
8976ac1
Type Segments
craigbeck Aug 8, 2023
2982a97
ExpressionMeta type literals
craigbeck Aug 8, 2023
b8d8997
Remove extraneous return types
craigbeck Aug 8, 2023
6f3be73
Use method syntax
craigbeck Aug 8, 2023
965fc07
Placeholder type for value
craigbeck Aug 8, 2023
91e60a1
Placeholder type for value
craigbeck Aug 8, 2023
c0ef475
Return type Segments
craigbeck Aug 8, 2023
93c3907
Placeholder for BlockType
craigbeck Aug 8, 2023
c4518bb
Type dependency options; more tempalte class method typings
craigbeck Aug 8, 2023
77434e5
Rename createPathExpression.js
craigbeck Aug 9, 2023
79ac1d0
Lint fix expressions.ts
craigbeck Aug 9, 2023
a6eb717
Typescript fixes for createPathExpression
craigbeck Aug 9, 2023
da43484
Eslint: ignore unused args prefixed with underscore
craigbeck Aug 9, 2023
8d89588
Rename tempaltes/index.js
craigbeck Aug 9, 2023
9b65766
Convert index to typescript
craigbeck Aug 9, 2023
b0956ab
Convert createPathExpression to typescript
craigbeck Aug 9, 2023
cbafddd
Raname parsing/markup.js
craigbeck Aug 9, 2023
024ae75
Remove console.log
craigbeck Aug 9, 2023
76d1371
Use type for checking type guards
craigbeck Aug 9, 2023
a893153
Convert parsing/markup to typescript
craigbeck Aug 9, 2023
5e8cfb6
Rename parsing/index.js
craigbeck Aug 9, 2023
43b0cfc
Add types for much of templates.ts
ericyhwang Aug 10, 2023
c26c943
Remove extraneous isSpreadElement check
craigbeck Aug 10, 2023
846720d
Convert parsing/index to typescript
craigbeck Aug 11, 2023
aa78ae3
Merge branch 'ts-conversion-1' of github.com:derbyjs/derby into ts-co…
craigbeck Aug 11, 2023
b97278c
Ignore error w DynamicAttribute until generic added to resolve
craigbeck Aug 11, 2023
dfbcda6
Formatted
craigbeck Aug 11, 2023
96a93b2
Add eslint prettier, and import sort; Demote usage of any to warning …
craigbeck Aug 11, 2023
d09d22f
Sort imports
craigbeck Aug 11, 2023
a3b0ab8
Use Obejct.prototype.hasOwnProperty
craigbeck Aug 11, 2023
6108f39
Remove unused functions
craigbeck Aug 11, 2023
54cbbe4
Disable eslint no-unused-vars to prevent duplicate errors with typesc…
craigbeck Aug 21, 2023
a569d9c
Remove unused dependency through
craigbeck Aug 21, 2023
2d53114
Resolve unused-var linting errors
craigbeck Aug 21, 2023
83bd54c
Switch typescript to tilde versioning, since TS major releases increm…
ericyhwang Aug 21, 2023
9be00ad
Rename Controller.js
craigbeck Aug 21, 2023
e7483ca
Convert Controller to typescript
craigbeck Aug 23, 2023
f201e68
Rename App.js
craigbeck Aug 24, 2023
7cf9159
Rename AppForServer.js
craigbeck Aug 24, 2023
b9418df
Convert App, AppFoprServer, Controller to typescript
craigbeck Aug 25, 2023
9dd6407
Use export syntax
craigbeck Aug 25, 2023
1e7c7b2
Fix semicolons
craigbeck Aug 25, 2023
583512d
Lint fixes
craigbeck Aug 25, 2023
a2612e8
Rename Derby.js
craigbeck Aug 25, 2023
d825091
Convert Derby.js to typescript
craigbeck Aug 26, 2023
6802dbd
Fix App import in DerbyStandalone
craigbeck Aug 26, 2023
a16e370
Merge branch 'ts-conversion-1' of github.com:derbyjs/derby into ts-co…
craigbeck Aug 28, 2023
0d6d68e
Type parsing/index methods
craigbeck Sep 1, 2023
d4fa7cf
More types for parsing
craigbeck Sep 7, 2023
2ce439d
Rename Page.js
craigbeck Sep 11, 2023
bfe897d
Make DependencyOptions options... optional
craigbeck Sep 11, 2023
f7d8608
Rename PageForServer.js
craigbeck Sep 11, 2023
eaa3253
Convert App and AppForServer to typescript
craigbeck Sep 13, 2023
18c5b43
Add markerNode property to Controller as used by Hook
craigbeck Sep 13, 2023
cd67337
Convert Page and PageFroServer to typescript
craigbeck Sep 13, 2023
5033e46
Convert components to typescript
craigbeck Sep 13, 2023
08eba28
Make Context generic and eslint-ignore this-alias
craigbeck Sep 13, 2023
32b734e
Handle diffrences between Page/Component in expressions
craigbeck Sep 13, 2023
2a127a5
Dont alias DependencyOptions
craigbeck Sep 13, 2023
22c81b9
Create local Hook class for markerHooks
craigbeck Sep 13, 2023
496cc41
Conversion + typing for App, Controller, Page, components
craigbeck Sep 14, 2023
7329903
No passing this to super in PageBase (handled by this.page assignment)
craigbeck Sep 14, 2023
b9f561b
Add ESTree types
craigbeck Sep 15, 2023
998ebbd
Use Model type rather than ModelData (incorrect type)
craigbeck Sep 15, 2023
25add99
Remove unused guard function
craigbeck Sep 15, 2023
e997c25
Syntax fix
craigbeck Sep 15, 2023
79903c5
Remove unnecessary regex escape
craigbeck Sep 15, 2023
e0afaff
Disable prefer-spread for function apply
craigbeck Sep 15, 2023
8a24820
Supress error until correct types for bindings can be sorted out
craigbeck Sep 18, 2023
0889e37
Add return types
craigbeck Sep 18, 2023
b016cd6
3.0.0-beta.1
craigbeck Sep 18, 2023
10ab08b
Fix DerbyForDerver, and Racer require
craigbeck Sep 18, 2023
2fa7887
Rename DerbyForServer.js
craigbeck Sep 19, 2023
5bd5169
Use DerbyBase class as base for Derby and DerbyForServer
craigbeck Sep 21, 2023
b44037e
Rename DerbyStandalone.js
craigbeck Sep 21, 2023
bd2b226
Convert DerbyStandalone to typescript
craigbeck Sep 21, 2023
9e469d4
Handle DerbyForServer non-default export
craigbeck Sep 25, 2023
0ae26b2
Lift use and serverUse to base class
craigbeck Sep 25, 2023
d1402e1
Call _init in AppForServer
craigbeck Sep 25, 2023
8d81f7e
Move methods to base class
craigbeck Sep 25, 2023
c369c86
Initialize _pendingComponentMap in base class
craigbeck Sep 25, 2023
02544aa
Lift Component to base class
craigbeck Sep 25, 2023
382c97f
Use package exports to map derby/parsing
craigbeck Sep 25, 2023
a3e4c0b
Map exports for templates and AppForServer
craigbeck Sep 25, 2023
fd8076a
Map App export and lib/App (for derby-webpack)
craigbeck Sep 25, 2023
7e8a4e6
Lift onRoute to AppBase
craigbeck Sep 25, 2023
543442a
Ensure app Page class is being used appropriately
craigbeck Sep 25, 2023
796c3d4
Split derby server + client requries
craigbeck Sep 25, 2023
42698f8
Use arrow-function
craigbeck Sep 25, 2023
6ae6209
Convert callbacks to arrow-functions
craigbeck Sep 25, 2023
fb8bb60
Extract finishInit to local arrow-function
craigbeck Sep 25, 2023
17ee8bb
Remove abstract from MarkupHook class
craigbeck Sep 26, 2023
44a0092
Revert "Remove abstract from MarkupHook class"
craigbeck Sep 26, 2023
54db640
Use named import over require
craigbeck Sep 26, 2023
840f68c
Ensure MarkupHooks have valid module attribute
craigbeck Sep 26, 2023
309cb4a
3.0.0-beta.2
craigbeck Sep 26, 2023
a1e7b21
Add types
craigbeck Sep 29, 2023
f6d4da8
Type PageForServer
craigbeck Oct 2, 2023
56a4c4d
Additional types Apps and Pages; proctected methods
craigbeck Oct 2, 2023
af74798
Include all dist in published package
craigbeck Oct 2, 2023
a812eed
3.0.0-beta.3
craigbeck Oct 2, 2023
3f60401
Merge branch 'master' of github.com:derbyjs/derby into ts-conversion-1
craigbeck Oct 4, 2023
9eec95c
Make args optional on parseViews
craigbeck Oct 5, 2023
c537804
Remove generic from Controller
craigbeck Oct 5, 2023
211bb7b
Code review cleanups
ericyhwang Oct 5, 2023
67d60fb
Include test-utils in published output
craigbeck Oct 6, 2023
2150df6
Merge branch 'ts-conversion-1' of github.com:derbyjs/derby into ts-co…
craigbeck Oct 6, 2023
3136502
Add test-utils/index.js to exports
craigbeck Oct 6, 2023
08bd44a
3.0.0-beta.4
craigbeck Oct 10, 2023
1ede576
Remove exports of ./lib/* as majro version and exports changes requir…
craigbeck Oct 11, 2023
bff71ec
3.0.0-beta.5
craigbeck Oct 11, 2023
c141692
Rename src/index.js
craigbeck Oct 12, 2023
6bff0de
Remove DerbyForServer in favor of server
craigbeck Oct 13, 2023
4b5434f
Fix issue of App being untyped in consuming code due to dynamic export
craigbeck Oct 13, 2023
15fecf1
Export run function
craigbeck Oct 13, 2023
bddf1b7
Add generic to Controller for model data
craigbeck Oct 13, 2023
4ef80f6
Extract routes setup
craigbeck Oct 16, 2023
e2928f9
BREAKING: change arg order for render so method signatures can be ali…
craigbeck Oct 16, 2023
8f5eb5a
Use Model generic
craigbeck Oct 16, 2023
069d240
Create constructor type for singletone components that do not use con…
craigbeck Oct 16, 2023
321cab8
Add no-op render to satisfy need to have method on PageBase
craigbeck Oct 16, 2023
0ad4d1f
Export route types and add method types for Page
craigbeck Oct 16, 2023
f26df28
Rename Dom.js
craigbeck Oct 17, 2023
8e3414e
Convert Dom to typescript
craigbeck Oct 17, 2023
bf7e91f
Export type PageBase, PageParams
craigbeck Oct 17, 2023
fefb0e4
Addition typing for view prop and type debounce fns
craigbeck Oct 17, 2023
c7a9902
Refine Dom target types
craigbeck Oct 17, 2023
ec4f389
Delay as optional arg
craigbeck Oct 17, 2023
5342135
Additional typing and method signatures for Dom event listener methods
craigbeck Oct 18, 2023
620dcee
Use RootModel and ChildModel over Model
craigbeck Oct 18, 2023
aa592a4
Use const require for Racer due to not actually having types
craigbeck Oct 19, 2023
efbe310
3.0.0-beta.6
craigbeck Oct 19, 2023
f3bed84
Re-type Dom listeners
craigbeck Oct 19, 2023
c22c099
3.0.0-beta.7
craigbeck Oct 19, 2023
2299fc5
Re-export util
craigbeck Oct 19, 2023
7414202
3.0.0-beta.8
craigbeck Oct 19, 2023
1b4d936
Revert back to use Model over ChildModel types
craigbeck Oct 25, 2023
8dfdc9b
Require racer
craigbeck Oct 25, 2023
f02ec7d
Revert to exportig derby instance from index; not publishing types
craigbeck Oct 26, 2023
1d3e42a
3.0.0-beta.9
craigbeck Oct 26, 2023
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -2,3 +2,4 @@
*.swp
node_modules
.vscode
dist/
12 changes: 7 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -9,13 +9,13 @@
},
"main": "index.js",
"files": [
"*.js",
"lib/**/*.js",
"test-utils/**/*.js"
"dist/**/*.js"
],
"scripts": {
"build": "node_modules/.bin/tsc",
"checks": "npm run lint && npm test",
"lint": "npx eslint '**/*.js'",
"lint": "npx eslint *.js lib/**/*.js test/**/*.js test-utils/**/*.js",
"prepare": "npm run build",
"test": "npx mocha 'test/all/**/*.mocha.js' 'test/dom/**/*.mocha.js' 'test/server/**/*.mocha.js'",
"test-browser": "node test/server.js"
},
@@ -31,13 +31,15 @@
"tracks": "^0.5.8"
},
"devDependencies": {
"@types/node": "^20.3.1",
"async": "^3.2.4",
"browserify": "^17.0.0",
"chai": "^4.3.6",
"eslint": "^8.37.0",
"express": "^4.18.1",
"jsdom": "^20.0.1",
"mocha": "^10.0.0"
"mocha": "^10.0.0",
"typescript": "^5.1.3"
},
"optionalDependencies": {},
"bugs": {
16 changes: 16 additions & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"compilerOptions": {
"allowJs": true,
"ignoreDeprecations": "5.0",
"lib":[],
"module": "CommonJS",
"noImplicitUseStrict": true,
"outDir": "dist",
"sourceMap": false,
"target": "ES5"
},
"include": [
"*.js",
"lib/**/*"
]
}