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

{backend, test}: change backend files and backend tests to typescript #204

Merged
merged 20 commits into from Jan 4, 2022

Conversation

acharb
Copy link
Contributor

@acharb acharb commented Dec 18, 2021

WHAT
converting backend files from JS to TS. Some slight refactoring was needed (pointed out in comments), but in general no functional changes.

closes #197

WHY
Typescript will make the project more aligned with other SDF ones, as well as prevent bugs thanks to TS compiler

@acharb acharb changed the base branch from master to acharb-typescript December 18, 2021 01:38
@stellar-jenkins
Copy link

Something went wrong with PR preview build please check

@stellar-jenkins
Copy link

Something went wrong with PR preview build please check

@stellar-jenkins
Copy link

Something went wrong with PR preview build please check

Base automatically changed from acharb-typescript to master December 21, 2021 22:03
# Conflicts:
#	README.md
#	backend/app.js
#	backend/routes.js
#	backend/routes.ts
#	package.json
#	test/tests/integration/backend.ts
#	tsconfig.json
#	yarn.lock
@stellar-jenkins
Copy link

Something went wrong with PR preview build please check

@stellar-jenkins
Copy link

Preview deployed to development environment: https://dashboard.prototypes.kube001.services.stellar-ops.com

@stellar-jenkins
Copy link

Preview deployed to development environment: https://dashboard.prototypes.kube001.services.stellar-ops.com

@stellar-jenkins
Copy link

Preview deployed to development environment: https://dashboard.prototypes.kube001.services.stellar-ops.com

@stellar-jenkins
Copy link

Preview deployed to development environment: https://dashboard.prototypes.kube001.services.stellar-ops.com

@stellar-jenkins
Copy link

Preview deployed to development environment: https://dashboard.prototypes.kube001.services.stellar-ops.com

@stellar-jenkins
Copy link

Preview deployed to development environment: https://dashboard.prototypes.kube001.services.stellar-ops.com

},
);

export const NodeMeasurement = sequelize.define(
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed this NodeMeasurement table, it's not being used

@@ -38,7 +38,7 @@
"babel-preset-es2015": "^6.22.0",
"babel-preset-react": "^6.23.0",
"babel-register": "^6.24.0",
"bignumber.js": "^3.0.1",
"bignumber.js": "^9.0.1",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bignumber.js types added in version 4

common/lumens.js Show resolved Hide resolved
tsconfig.json Outdated
Comment on lines 3 to 7
"compilerOptions": {
// temporary flags during js->ts transition
"allowJs": false,
"allowJs": true,
"isolatedModules": false,

"target": "es5",
"rootDir": "./backend",
"baseUrl": "./"
"target": "es6",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

changing target to es6 because of sequelize

@acharb acharb marked this pull request as ready for review January 3, 2022 19:30
@acharb acharb changed the title (wip): change backend files to typescript {backend, common}: change backend files to typescript Jan 3, 2022
@acharb acharb changed the title {backend, common}: change backend files to typescript {backend, test}: change backend files and backend tests to typescript Jan 3, 2022
@stellar-jenkins
Copy link

Preview deployed to development environment: https://dashboard.prototypes.kube001.services.stellar-ops.com

backend/ledgers.ts Outdated Show resolved Hide resolved
backend/ledgers.ts Outdated Show resolved Hide resolved
backend/lumens.ts Outdated Show resolved Hide resolved
common/lumens.d.ts Outdated Show resolved Hide resolved
common/lumens.js Show resolved Hide resolved
@stellar-jenkins
Copy link

Preview deployed to development environment: https://dashboard.prototypes.kube001.services.stellar-ops.com

@stellar-jenkins
Copy link

Preview deployed to development environment: https://dashboard.prototypes.kube001.services.stellar-ops.com

@stellar-jenkins
Copy link

Preview deployed to development environment: https://dashboard.prototypes.kube001.services.stellar-ops.com

@acharb acharb requested a review from quietbits January 4, 2022 17:57
@acharb acharb merged commit 114b53f into master Jan 4, 2022
@acharb acharb deleted the acharb-ts-refactor branch January 4, 2022 18:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add TypeScript to backend
3 participants