feat: Add TypeScript support (#9550)

This commit is contained in:
Daniel
2025-01-30 11:45:35 +11:00
committed by GitHub
parent a97d41864e
commit 59e46d0aea
11 changed files with 2925 additions and 153 deletions

View File

@@ -15,7 +15,8 @@
"LICENSE",
"NOTICE",
"postinstall.js",
"README.md"
"README.md",
"types"
],
"license": "Apache-2.0",
"dependencies": {
@@ -73,6 +74,8 @@
"@babel/plugin-proposal-object-rest-spread": "7.20.7",
"@babel/plugin-transform-flow-strip-types": "7.26.5",
"@babel/preset-env": "7.26.0",
"@babel/preset-typescript": "7.26.0",
"@definitelytyped/dtslint": "0.0.163",
"@saithodev/semantic-release-backmerge": "4.0.1",
"@semantic-release/changelog": "6.0.3",
"@semantic-release/commit-analyzer": "13.0.1",
@@ -106,6 +109,7 @@
"nyc": "17.1.0",
"prettier": "2.0.5",
"semantic-release": "24.2.1",
"typescript": "5.7.3",
"yaml": "2.7.0"
},
"scripts": {
@@ -114,9 +118,10 @@
"ci:definitionsCheck": "node ./ci/definitionsCheck.js",
"definitions": "node ./resources/buildConfigDefinitions.js && prettier --write 'src/Options/*.js'",
"docs": "jsdoc -c ./jsdoc-conf.json",
"lint": "flow && eslint --cache ./",
"lint": "eslint --cache ./",
"lint-fix": "eslint --fix --cache ./",
"build": "babel src/ -d lib/ --copy-files",
"build": "babel src/ -d lib/ --copy-files --extensions '.ts,.js'",
"build:types": "tsc",
"watch": "babel --watch src/ -d lib/ --copy-files",
"test:mongodb:runnerstart": "cross-env MONGODB_VERSION=${MONGODB_VERSION:=$npm_config_dbversion} MONGODB_TOPOLOGY=${MONGODB_TOPOLOGY:=standalone} mongodb-runner start -t ${MONGODB_TOPOLOGY} --version ${MONGODB_VERSION} -- --port 27017",
"test:mongodb:testonly": "cross-env MONGODB_VERSION=${MONGODB_VERSION:=$npm_config_dbversion} MONGODB_TOPOLOGY=${MONGODB_TOPOLOGY:=standalone} TESTING=1 jasmine",
@@ -125,6 +130,7 @@
"test:mongodb:7.0.16": "npm run test:mongodb --dbversion=7.0.16",
"test:mongodb:8.0.4": "npm run test:mongodb --dbversion=8.0.4",
"test:postgres:testonly": "cross-env PARSE_SERVER_TEST_DB=postgres PARSE_SERVER_TEST_DATABASE_URI=postgres://postgres:password@localhost:5432/parse_server_postgres_adapter_test_database npm run testonly",
"test:types": "dtslint --expectOnly types",
"pretest": "cross-env MONGODB_VERSION=${MONGODB_VERSION:=8.0.4} MONGODB_TOPOLOGY=${MONGODB_TOPOLOGY:=standalone} mongodb-runner start -t ${MONGODB_TOPOLOGY} --version ${MONGODB_VERSION} -- --port 27017",
"testonly": "cross-env MONGODB_VERSION=${MONGODB_VERSION:=8.0.4} MONGODB_TOPOLOGY=${MONGODB_TOPOLOGY:=standalone} TESTING=1 jasmine",
"test": "npm run testonly",
@@ -136,6 +142,7 @@
"postinstall": "node -p 'require(\"./postinstall.js\")()'",
"madge:circular": "node_modules/.bin/madge ./src --circular"
},
"types": "types/index.d.ts",
"engines": {
"node": ">=18.20.4 <19.0.0 || >=20.18.0 <21.0.0 || >=22.12.0 <23.0.0"
},