Skip to content

Commit

Permalink
feat(deps): update dependency typescript to v5 (#41)
Browse files Browse the repository at this point in the history
* chore(deps): update dependency typescript to v5

* updates typescript and related tooling

* ignore build configs in release flow

* update docs

* generate docs on the fly during release

- stops this pointless static-check thing

* improved docs docs

* remove ts-ignore that was needed due to spurious failures

* remove broken invoccation in workflow

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: eve n.u <[email protected]>
  • Loading branch information
renovate[bot] and ships authored Nov 13, 2023
1 parent f7cb8a9 commit 5c10bdd
Show file tree
Hide file tree
Showing 65 changed files with 325 additions and 5,222 deletions.
5 changes: 0 additions & 5 deletions .github/workflows/example-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,3 @@ jobs:
run: |
cd ${{env.PKG_DIR}} ;
pnpm lint;
- name: Verify docs are up-to-date
run: |
cd ${{env.PKG_DIR}} ;
pnpm docs:check;
4 changes: 2 additions & 2 deletions .github/workflows/gh-pages.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,10 @@ jobs:
run: |
pnpm install;
- name: Verify docs
- name: Generate docs
run: |
cd packages/ts-sdk ;
pnpm docs:check;
pnpm docs:generate;
- name: Build SPA
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
# must ignore spa because we need spa in the workspace file for development, but spa is not released.
run: npx multi-semantic-release --ignore-packages=packages/spa,packages/example,packages/widget,packages/http-server
run: npx multi-semantic-release --ignore-packages=packages/spa,packages/example,packages/widget,packages/http-server,packages/build-configs

release-github-pages-docs:
uses: ./.github/workflows/gh-pages.yaml
5 changes: 0 additions & 5 deletions .github/workflows/ts-sdk-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,3 @@ jobs:
run: |
cd ${{env.PKG_DIR}} ;
pnpm lint;
- name: Verify docs are up-to-date
run: |
cd ${{env.PKG_DIR}} ;
pnpm docs:check;
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,6 @@
"multi-semantic-release": "^3.0.2",
"rdf-validate-shacl": "^0.5.0",
"tsx": "^4.0.0",
"typescript": "^4.9.5"
"typescript": "^5.0.0"
}
}
13 changes: 13 additions & 0 deletions packages/build-configs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# docmaps project build configs

This is an unpublished NPM module consumed by `pnpm` workspace references.
All the modules in this monorepo depend on this module for their
shared typescript configurations, including tsconfig, lint configs, etc.

## Usage

This module can be installed into a new monorepo package by:

```
pnpm install @docmaps/build-configs@workspace:0.0.0
```
19 changes: 19 additions & 0 deletions packages/build-configs/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"name": "@docmaps/build-configs",
"version": "0.0.0",
"repository": "[email protected]:docmaps-project/docmaps.git",
"homepage": "https://github.com/Docmaps-Project/docmaps/tree/main/packages/build-tools",
"description": "typescript build configurations for shared standards across monorepo",
"type": "module",
"scripts": {},
"keywords": [],
"author": "github.com/ships",
"license": "ISC",
"files": [
"/"
],
"devDependencies": {
"@tsconfig/node-lts": "^18.12.5",
"@tsconfig/strictest": "^2.0.2"
}
}
13 changes: 13 additions & 0 deletions packages/build-configs/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"extends": ["@tsconfig/strictest/tsconfig.json", "@tsconfig/node-lts/tsconfig.json"],
"compilerOptions": {
"module": "esnext",
"target": "ES2020",
"esModuleInterop": true,
"moduleResolution": "bundler",
"sourceMap": true,
"removeComments": true,
"noUnusedLocals": false,
"declaration": true
}
}
9 changes: 4 additions & 5 deletions packages/example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
"type": "module",
"scripts": {
"test": "npx tsx src/index.ts",
"docs:check": "echo WARN: no docs exist for this package",
"build": "tsc",
"lint": "echo WARN: no linting specified for this package"
},
Expand All @@ -17,11 +16,11 @@
"docmaps-sdk": "workspace:^0.0.0",
"fp-ts": "^2.16.0",
"io-ts": "^2.2.20",
"tsx": "^4.0.0",
"typescript": "^4.9.5"
"tsx": "^4.0.0"
},
"devDependencies": {
"@tsconfig/node-lts-strictest-esm": "^18.12.1",
"@types/node": "^18.16.2"
"@docmaps/build-configs": "workspace:^",
"@types/node": "^18.16.2",
"typescript": "^5.2.2"
}
}
14 changes: 2 additions & 12 deletions packages/example/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,7 @@
{
"extends": "@tsconfig/node-lts-strictest-esm/tsconfig.json",
"noErrorTruncation": true,
"extends": "@docmaps/build-configs/tsconfig.json",
"compilerOptions": {
"noErrorTruncation": true,
"module": "esnext",
"target": "ES2020",
"esModuleInterop": true,
"moduleResolution": "node",
"outDir": "./dist",
"sourceMap": true,
"noUnusedLocals": false,
"removeComments": true,
"declaration": true
"outDir": "./dist"
},
"include": [
"src/**/*"
Expand Down
21 changes: 2 additions & 19 deletions packages/http-client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,9 @@
"main": "dist/index.js",
"types": "dist/index.d.ts",
"scripts": {
"test": "ava",
"clean": "rm -rf dist/",
"test:integration": "ava test/integration/",
"test:cleanup": "docker compose -f test/integration/assets/docker-compose.yml down",
"test:unit": "ava test/unit/",
"lint": "npx eslint .",
"lint:fix": "npx eslint --fix .",
"start": "tsx dist/httpserver/main.js",
"build": "tsc --declaration"
},
"keywords": [],
Expand All @@ -27,10 +22,10 @@
],
"dependencies": {
"@ts-rest/core": "^3.30.2",
"@tsconfig/node-lts-strictest-esm": "^18.12.1",
"docmaps-sdk": "workspace:^0.0.0"
},
"devDependencies": {
"@docmaps/build-configs": "workspace:^",
"@types/node": "^18.16.2",
"@typescript-eslint/eslint-plugin": "^6.0.0",
"@typescript-eslint/parser": "^6.0.0",
Expand All @@ -39,21 +34,9 @@
"eslint-plugin-prettier": "^5.0.0",
"prettier": "^3.0.0",
"ts-mockito": "^2.6.1",
"typescript": "^4.9.5",
"typescript": "^5.2.2",
"zod": "^3.22.2"
},
"ava": {
"extensions": {
"ts": "module"
},
"nodeArguments": [
"--loader=ts-node/esm",
"--experimental-specifier-resolution=node"
],
"files": [
"**/*.test.ts"
]
},
"engines": {
"node": ">=18.14.0"
}
Expand Down
15 changes: 2 additions & 13 deletions packages/http-client/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,18 +1,7 @@
{
"extends": "@tsconfig/node-lts-strictest-esm/tsconfig.json",
"noErrorTruncation": true,
"extends": "@docmaps/build-configs/tsconfig.json",
"compilerOptions": {
"noErrorTruncation": true,
"module": "esnext",
"target": "ES2020",
"esModuleInterop": true,
"moduleResolution": "node",
"importsNotUsedAsValues": "remove",
"outDir": "./dist",
"sourceMap": true,
"noUnusedLocals": false,
"removeComments": true,
"declaration": true
"outDir": "./dist"
},
"include": [
"src/**/*"
Expand Down
10 changes: 4 additions & 6 deletions packages/http-server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,9 @@
"@docmaps/http-client": "workspace:^0.1.0",
"@rdfjs/data-model": "^2.0.1",
"@rdfjs/namespace": "^2.0.0",
"@tpluscode/sparql-builder": "^0.3.31",
"@tpluscode/sparql-builder": "^1.1.0",
"@ts-rest/core": "^3.30.2",
"@ts-rest/express": "^3.30.2",
"@tsconfig/node-lts-strictest-esm": "^18.12.1",
"@zazuko/rdf-vocabularies": "^2023.1.19",
"commander": "^11.0.0",
"cors": "^2.8.5",
Expand All @@ -51,6 +50,7 @@
"tsx": "^4.0.0"
},
"devDependencies": {
"@docmaps/build-configs": "workspace:^",
"@rdfjs/types": "^1.1.0",
"@types/cors": "^2.8.14",
"@types/express": "^4.17.17",
Expand All @@ -67,17 +67,15 @@
"eslint-plugin-prettier": "^5.0.0",
"prettier": "^3.0.0",
"ts-mockito": "^2.6.1",
"ts-node": "^10.9.1",
"typescript": "^4.9.5",
"typescript": "^5.2.2",
"zod": "^3.22.2"
},
"ava": {
"extensions": {
"ts": "module"
},
"nodeArguments": [
"--loader=ts-node/esm",
"--experimental-specifier-resolution=node"
"--loader=tsx/esm"
],
"files": [
"**/*.test.ts"
Expand Down
8 changes: 0 additions & 8 deletions packages/http-server/src/httpserver/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -136,14 +136,6 @@ export class HttpServer {
},
})

// FIXME: resolve this awkward use of typescript ignores. The only
// reason I am willing to do this temporarily:
// - this function call doesn't affect any types as far as I can tell
// - it seems related to known issues in Zod, dependency of ts-rest
// - I have an open issue to track: https://github.com/ts-rest/ts-rest/issues/389

// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
createExpressEndpoints(contract, router, this.app, { logInitialization: false })
this.server = createHttpServer(this.app)
}
Expand Down
15 changes: 2 additions & 13 deletions packages/http-server/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,18 +1,7 @@
{
"extends": "@tsconfig/node-lts-strictest-esm/tsconfig.json",
"noErrorTruncation": true,
"extends": "@docmaps/build-configs/tsconfig.json",
"compilerOptions": {
"noErrorTruncation": true,
"module": "esnext",
"target": "ES2020",
"esModuleInterop": true,
"moduleResolution": "node",
"importsNotUsedAsValues": "remove",
"outDir": "./dist",
"sourceMap": true,
"noUnusedLocals": false,
"removeComments": true,
"declaration": true
"outDir": "./dist"
},
"include": [
"src/**/*"
Expand Down
6 changes: 4 additions & 2 deletions packages/spa/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "svelte-app",
"name": "@docmaps/spa",
"version": "1.0.0",
"private": true,
"type": "module",
Expand All @@ -11,6 +11,7 @@
"test": "echo !!!!WARN: No test setup!"
},
"devDependencies": {
"@docmaps/build-configs": "workspace:^",
"@rollup/plugin-commonjs": "^25.0.0",
"@rollup/plugin-node-resolve": "^15.1.0",
"@rollup/plugin-terser": "^0.4.3",
Expand All @@ -19,7 +20,8 @@
"rollup-plugin-livereload": "^2.0.5",
"rollup-plugin-polyfill-node": "^0.12.0",
"rollup-plugin-svelte": "^7.1.5",
"svelte": "^4.0.0"
"svelte": "^4.0.0",
"typescript": "^5.2.2"
},
"dependencies": {
"@docmaps/etl": "workspace:^0.1.2",
Expand Down
8 changes: 3 additions & 5 deletions packages/ts-etl/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"typescript-collections": "^1.3.3"
},
"devDependencies": {
"@tsconfig/node-lts-strictest-esm": "^18.12.1",
"@docmaps/build-configs": "workspace:^",
"@types/node": "^18.16.2",
"@typescript-eslint/eslint-plugin": "^6.0.0",
"@typescript-eslint/parser": "^6.0.0",
Expand All @@ -46,16 +46,14 @@
"eslint-plugin-prettier": "^5.0.0",
"prettier": "^3.0.0",
"ts-mockito": "^2.6.1",
"ts-node": "^10.9.1",
"typescript": "^4.9.5"
"typescript": "^5.2.2"
},
"ava": {
"extensions": {
"ts": "module"
},
"nodeArguments": [
"--loader=ts-node/esm",
"--experimental-specifier-resolution=node"
"--loader=tsx/esm"
],
"files": [
"**/*.test.ts"
Expand Down
14 changes: 2 additions & 12 deletions packages/ts-etl/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,7 @@
{
"extends": "@tsconfig/node-lts-strictest-esm/tsconfig.json",
"noErrorTruncation": true,
"extends": "@docmaps/build-configs/tsconfig.json",
"compilerOptions": {
"noErrorTruncation": true,
"module": "esnext",
"target": "ES2020",
"esModuleInterop": true,
"moduleResolution": "node",
"outDir": "./dist",
"sourceMap": true,
"noUnusedLocals": false,
"removeComments": true,
"declaration": true
"outDir": "./dist"
},
"include": [
"src/**/*"
Expand Down
Binary file removed packages/ts-sdk/.DS_Store
Binary file not shown.
2 changes: 1 addition & 1 deletion packages/ts-sdk/.gitignore
Original file line number Diff line number Diff line change
@@ -1 +1 @@
docs/examples/*.ts
docs/
11 changes: 5 additions & 6 deletions packages/ts-sdk/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,11 @@ as the results of a SPARQL query.

## Documentation

Documentation exists at `./docs/` and is [served by github pages](https://docmaps-project.github.io/docmaps/docmaps-sdk/index.html).
Everything in `/docs` is generated by the command `pnpm docs:generate`. The inputs to the
generation script include all Markdown and source files in this directory, and CI may
fail if your PR includes changes to documented types or markdown and you have not run
`pnpm docs:generate`. You can confirm that CI will pass from a given clean Git worktree
by running `pnpm docs:check` (note that this will dirty your Git worktree).
Documentation is [served by github pages](https://docmaps-project.github.io/docmaps/docmaps-sdk/index.html).
If you wish to view documentation for an off-branch edition of this package, the directory `/docs`
can be populated by the command `pnpm docs:generate`. The inputs to the
generation script include all Markdown and source files in this directory. These docs are generated
dynamically during GH Pages release on merge to main, so the directory can be empty on check-in.

## Contributing

Expand Down
Loading

0 comments on commit 5c10bdd

Please sign in to comment.