Skip to content

Commit 4ef4b62

Browse files
authored
deps!: upgrade typescript and typedoc (#1337)
Upgrades all deps including typescript, typedoc, semantic release and markdown deps. BREAKING CHANGE: update typescript to `5.1.6, typedoc to `0.24.8` and eslint-config-ipfs to `5.0.0`
1 parent 48cc141 commit 4ef4b62

30 files changed

+254
-152
lines changed

.gitignore

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
package-lock.json
22
yarn.lock
3+
# only the root node_modules folder since some of the test fixtures have them
34
/node_modules
4-
/actions/bundle-size/node_modules
5-
/coverage
6-
/dist
7-
/docs
5+
dist
86
.docs
97
.nyc_output
108
*.log

package.json

Lines changed: 32 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -229,39 +229,39 @@
229229
"@electron/get": "^2.0.0",
230230
"@polka/send-type": "^0.5.2",
231231
"@semantic-release/changelog": "^6.0.1",
232-
"@semantic-release/commit-analyzer": "^9.0.2",
232+
"@semantic-release/commit-analyzer": "^10.0.1",
233233
"@semantic-release/git": "^10.0.1",
234-
"@semantic-release/github": "https://registry.npmjs.org/@achingbrain/semantic-release-github/-/semantic-release-github-0.0.2.tgz",
235-
"@semantic-release/npm": "^9.0.2",
236-
"@semantic-release/release-notes-generator": "^10.0.3",
234+
"@semantic-release/github": "^9.0.3",
235+
"@semantic-release/npm": "^10.0.4",
236+
"@semantic-release/release-notes-generator": "^11.0.4",
237237
"@types/chai": "^4.2.16",
238238
"@types/chai-as-promised": "^7.1.3",
239239
"@types/chai-string": "^1.4.2",
240240
"@types/chai-subset": "^1.3.3",
241241
"@types/mocha": "^10.0.0",
242-
"@types/node": "^18.11.15",
242+
"@types/node": "^20.4.2",
243243
"@typescript-eslint/eslint-plugin": "^5.18.0",
244244
"buffer": "^6.0.3",
245245
"bytes": "^3.1.0",
246-
"c8": "^7.7.0",
246+
"c8": "^8.0.0",
247247
"chai": "^4.3.4",
248248
"chai-as-promised": "^7.1.1",
249249
"chai-bites": "^0.1.2",
250250
"chai-parentheses": "^0.0.2",
251251
"chai-string": "^1.5.0",
252252
"chai-subset": "^1.6.0",
253-
"conventional-changelog-conventionalcommits": "^5.0.0",
253+
"conventional-changelog-conventionalcommits": "^6.1.0",
254254
"cors": "^2.8.5",
255255
"depcheck": "^1.4.3",
256256
"diff": "^5.1.0",
257257
"electron-mocha-main": "^11.0.3",
258258
"env-paths": "^3.0.0",
259-
"esbuild": "^0.17.9",
259+
"esbuild": "^0.18.12",
260260
"eslint": "^8.31.0",
261-
"eslint-config-ipfs": "^4.0.2",
261+
"eslint-config-ipfs": "^5.0.0",
262262
"eslint-plugin-etc": "^2.0.2",
263263
"eslint-plugin-import": "^2.18.0",
264-
"eslint-plugin-jsdoc": "^43.1.1",
264+
"eslint-plugin-jsdoc": "^46.4.3",
265265
"eslint-plugin-node": "^11.1.0",
266266
"eslint-plugin-promise": "^6.1.1",
267267
"execa": "^7.0.0",
@@ -272,48 +272,48 @@
272272
"kleur": "^4.1.4",
273273
"lilconfig": "^2.0.5",
274274
"listr": "~0.14.2",
275-
"mdast-util-from-markdown": "^1.2.0",
276-
"mdast-util-gfm": "^2.0.1",
277-
"mdast-util-gfm-footnote": "^1.0.1",
278-
"mdast-util-gfm-strikethrough": "^1.0.1",
279-
"mdast-util-gfm-table": "^1.0.4",
280-
"mdast-util-gfm-task-list-item": "^1.0.1",
281-
"mdast-util-to-markdown": "^1.3.0",
282-
"mdast-util-toc": "^6.1.0",
275+
"mdast-util-from-markdown": "^2.0.0",
276+
"mdast-util-gfm": "^3.0.0",
277+
"mdast-util-gfm-footnote": "^2.0.0",
278+
"mdast-util-gfm-strikethrough": "^2.0.0",
279+
"mdast-util-gfm-table": "^2.0.0",
280+
"mdast-util-gfm-task-list-item": "^2.0.0",
281+
"mdast-util-to-markdown": "^2.0.0",
282+
"mdast-util-toc": "^7.0.0",
283283
"merge-options": "^3.0.4",
284-
"micromark-extension-gfm": "^2.0.1",
285-
"micromark-extension-gfm-footnote": "^1.0.4",
286-
"micromark-extension-gfm-strikethrough": "^1.0.4",
287-
"micromark-extension-gfm-table": "^1.0.5",
288-
"micromark-extension-gfm-task-list-item": "^1.0.3",
284+
"micromark-extension-gfm": "^3.0.0",
285+
"micromark-extension-gfm-footnote": "^2.0.0",
286+
"micromark-extension-gfm-strikethrough": "^2.0.0",
287+
"micromark-extension-gfm-table": "^2.0.0",
288+
"micromark-extension-gfm-task-list-item": "^2.0.1",
289289
"minimatch": "^9.0.0",
290290
"mocha": "^10.0.0",
291-
"npm-package-json-lint": "^6.3.0",
291+
"npm-package-json-lint": "^7.0.0",
292292
"nyc": "^15.1.0",
293293
"p-map": "^6.0.0",
294294
"p-retry": "^5.1.2",
295295
"pascalcase": "^2.0.0",
296296
"path": "^0.12.7",
297-
"playwright-test": "^8.1.0",
297+
"playwright-test": "^12.1.1",
298298
"polka": "^0.5.2",
299299
"premove": "^4.0.0",
300300
"prompt": "^1.2.2",
301301
"proper-lockfile": "^4.1.2",
302302
"react-native-test-runner": "^5.0.0",
303-
"read-pkg-up": "^9.1.0",
303+
"read-pkg-up": "^10.0.0",
304304
"rimraf": "^5.0.0",
305-
"semantic-release": "^20.1.3",
305+
"semantic-release": "^21.0.7",
306306
"semantic-release-monorepo": "^7.0.5",
307307
"semver": "^7.3.8",
308308
"source-map-support": "^0.5.20",
309309
"strip-bom": "^5.0.0",
310310
"strip-json-comments": "^5.0.0",
311311
"tempy": "^3.0.0",
312-
"typedoc": "^0.23.21",
312+
"typedoc": "^0.24.8",
313313
"typedoc-plugin-mdn-links": "^3.0.3",
314-
"typedoc-plugin-missing-exports": "^1.0.0",
315-
"typescript": "^4.6.3",
316-
"typescript-docs-verifier": "2.4.0",
314+
"typedoc-plugin-missing-exports": "^2.0.0",
315+
"typescript": "^5.1.6",
316+
"typescript-docs-verifier": "^2.5.0",
317317
"uint8arrays": "^4.0.2",
318318
"undici": "^5.0.0",
319319
"update-notifier": "^6.0.2",
@@ -337,7 +337,7 @@
337337
"@types/semver": "^7.3.4",
338338
"@types/update-notifier": "^6.0.1",
339339
"@types/yargs": "^17.0.0",
340-
"electron": "^24.1.2"
340+
"electron": "^25.3.0"
341341
},
342342
"browser": {
343343
"fs": false,
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
/* eslint-disable no-console */
2+
3+
import path from 'path'
4+
import fs from 'fs-extra'
5+
import {
6+
ensureFileHasContents
7+
} from './utils.js'
8+
9+
/**
10+
* @param {string} projectDir
11+
* @param {boolean} isTypescriptProject
12+
*/
13+
export async function checkTypedocFiles (projectDir, isTypescriptProject) {
14+
console.info('Check typedoc files')
15+
16+
const pkg = fs.readJSONSync(path.join(projectDir, 'package.json'))
17+
const entryPoints = Object.values(pkg.exports)
18+
.map(e => {
19+
const path = e.import
20+
21+
if (isTypescriptProject) {
22+
return path
23+
.replace('dist/src', 'src')
24+
.replace('.js', '.ts')
25+
}
26+
27+
return path
28+
})
29+
30+
await ensureFileHasContents(JSON.stringify({
31+
entryPoints
32+
}, null, 2), 'typedoc.json')
33+
}

src/check-project/index.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ import { checkLicenseFiles } from './check-licence-files.js'
1717
import { checkMonorepoFiles } from './check-monorepo-files.js'
1818
import { checkMonorepoReadme } from './check-monorepo-readme.js'
1919
import { checkReadme } from './check-readme.js'
20+
import { checkTypedocFiles } from './check-typedoc-files.js'
2021
import { monorepoManifest } from './manifests/monorepo.js'
2122
import { typedCJSManifest } from './manifests/typed-cjs.js'
2223
import { typedESMManifest } from './manifests/typed-esm.js'
@@ -424,6 +425,7 @@ async function processModule (projectDir, manifest, branchName, repoUrl, homePag
424425

425426
await checkLicenseFiles(projectDir)
426427
await checkReadme(projectDir, repoUrl, branchName, ciFile, rootManifest)
428+
await checkTypedocFiles(projectDir, typescript)
427429
}
428430

429431
export default new Listr([

src/check-project/readme/utils.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,17 +18,17 @@ export function parseMarkdown (md) {
1818
return fromMarkdown(md, {
1919
extensions: [
2020
gfm(),
21-
gfmTable,
21+
gfmTable(),
2222
gfmFootnote(),
2323
gfmStrikethrough(),
24-
gfmTaskListItem
24+
gfmTaskListItem()
2525
],
2626
mdastExtensions: [
2727
gfmFromMarkdown(),
28-
gfmTableFromMarkdown,
28+
gfmTableFromMarkdown(),
2929
gfmFootnoteFromMarkdown(),
30-
gfmStrikethroughFromMarkdown,
31-
gfmTaskListItemFromMarkdown
30+
gfmStrikethroughFromMarkdown(),
31+
gfmTaskListItemFromMarkdown()
3232
]
3333
})
3434
}
@@ -43,8 +43,8 @@ export function writeMarkdown (tree) {
4343
gfmToMarkdown(),
4444
gfmTableToMarkdown(),
4545
gfmFootnoteToMarkdown(),
46-
gfmStrikethroughToMarkdown,
47-
gfmTaskListItemToMarkdown
46+
gfmStrikethroughToMarkdown(),
47+
gfmTaskListItemToMarkdown()
4848
],
4949
bullet: '-',
5050
listItemIndent: 'one'

src/config/tsconfig.aegir.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
"noUnusedLocals": true,
2828
"noUnusedParameters": false,
2929
// advanced
30-
"importsNotUsedAsValues": "error",
30+
"verbatimModuleSyntax": true,
3131
"forceConsistentCasingInFileNames": true,
3232
"skipLibCheck": true,
3333
"stripInternal": true,

src/docs.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,11 @@ const docs = async (ctx, task) => {
4949
'--gitRevision',
5050
'master',
5151
'--plugin',
52-
fromAegir('src/docs/typedoc-plugin.cjs'),
52+
fromAegir('src/docs/typedoc-plugin.js'),
5353
'--plugin',
54-
fromAegir('src/docs/unknown-symbol-resolver-plugin.cjs'),
54+
fromAegir('src/docs/unknown-symbol-resolver-plugin.js'),
5555
'--plugin',
56-
fromAegir('src/docs/type-indexer-plugin.cjs'),
56+
fromAegir('src/docs/type-indexer-plugin.js'),
5757
'--plugin',
5858
'typedoc-plugin-mdn-links',
5959
'--plugin',

0 commit comments

Comments
 (0)