Skip to content

Commit

Permalink
deps!: upgrade typescript and typedoc (#1337)
Browse files Browse the repository at this point in the history
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`
  • Loading branch information
achingbrain authored Jul 19, 2023
1 parent 48cc141 commit 4ef4b62
Show file tree
Hide file tree
Showing 30 changed files with 254 additions and 152 deletions.
6 changes: 2 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
package-lock.json
yarn.lock
# only the root node_modules folder since some of the test fixtures have them
/node_modules
/actions/bundle-size/node_modules
/coverage
/dist
/docs
dist
.docs
.nyc_output
*.log
Expand Down
64 changes: 32 additions & 32 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -229,39 +229,39 @@
"@electron/get": "^2.0.0",
"@polka/send-type": "^0.5.2",
"@semantic-release/changelog": "^6.0.1",
"@semantic-release/commit-analyzer": "^9.0.2",
"@semantic-release/commit-analyzer": "^10.0.1",
"@semantic-release/git": "^10.0.1",
"@semantic-release/github": "https://registry.npmjs.org/@achingbrain/semantic-release-github/-/semantic-release-github-0.0.2.tgz",
"@semantic-release/npm": "^9.0.2",
"@semantic-release/release-notes-generator": "^10.0.3",
"@semantic-release/github": "^9.0.3",
"@semantic-release/npm": "^10.0.4",
"@semantic-release/release-notes-generator": "^11.0.4",
"@types/chai": "^4.2.16",
"@types/chai-as-promised": "^7.1.3",
"@types/chai-string": "^1.4.2",
"@types/chai-subset": "^1.3.3",
"@types/mocha": "^10.0.0",
"@types/node": "^18.11.15",
"@types/node": "^20.4.2",
"@typescript-eslint/eslint-plugin": "^5.18.0",
"buffer": "^6.0.3",
"bytes": "^3.1.0",
"c8": "^7.7.0",
"c8": "^8.0.0",
"chai": "^4.3.4",
"chai-as-promised": "^7.1.1",
"chai-bites": "^0.1.2",
"chai-parentheses": "^0.0.2",
"chai-string": "^1.5.0",
"chai-subset": "^1.6.0",
"conventional-changelog-conventionalcommits": "^5.0.0",
"conventional-changelog-conventionalcommits": "^6.1.0",
"cors": "^2.8.5",
"depcheck": "^1.4.3",
"diff": "^5.1.0",
"electron-mocha-main": "^11.0.3",
"env-paths": "^3.0.0",
"esbuild": "^0.17.9",
"esbuild": "^0.18.12",
"eslint": "^8.31.0",
"eslint-config-ipfs": "^4.0.2",
"eslint-config-ipfs": "^5.0.0",
"eslint-plugin-etc": "^2.0.2",
"eslint-plugin-import": "^2.18.0",
"eslint-plugin-jsdoc": "^43.1.1",
"eslint-plugin-jsdoc": "^46.4.3",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-promise": "^6.1.1",
"execa": "^7.0.0",
Expand All @@ -272,48 +272,48 @@
"kleur": "^4.1.4",
"lilconfig": "^2.0.5",
"listr": "~0.14.2",
"mdast-util-from-markdown": "^1.2.0",
"mdast-util-gfm": "^2.0.1",
"mdast-util-gfm-footnote": "^1.0.1",
"mdast-util-gfm-strikethrough": "^1.0.1",
"mdast-util-gfm-table": "^1.0.4",
"mdast-util-gfm-task-list-item": "^1.0.1",
"mdast-util-to-markdown": "^1.3.0",
"mdast-util-toc": "^6.1.0",
"mdast-util-from-markdown": "^2.0.0",
"mdast-util-gfm": "^3.0.0",
"mdast-util-gfm-footnote": "^2.0.0",
"mdast-util-gfm-strikethrough": "^2.0.0",
"mdast-util-gfm-table": "^2.0.0",
"mdast-util-gfm-task-list-item": "^2.0.0",
"mdast-util-to-markdown": "^2.0.0",
"mdast-util-toc": "^7.0.0",
"merge-options": "^3.0.4",
"micromark-extension-gfm": "^2.0.1",
"micromark-extension-gfm-footnote": "^1.0.4",
"micromark-extension-gfm-strikethrough": "^1.0.4",
"micromark-extension-gfm-table": "^1.0.5",
"micromark-extension-gfm-task-list-item": "^1.0.3",
"micromark-extension-gfm": "^3.0.0",
"micromark-extension-gfm-footnote": "^2.0.0",
"micromark-extension-gfm-strikethrough": "^2.0.0",
"micromark-extension-gfm-table": "^2.0.0",
"micromark-extension-gfm-task-list-item": "^2.0.1",
"minimatch": "^9.0.0",
"mocha": "^10.0.0",
"npm-package-json-lint": "^6.3.0",
"npm-package-json-lint": "^7.0.0",
"nyc": "^15.1.0",
"p-map": "^6.0.0",
"p-retry": "^5.1.2",
"pascalcase": "^2.0.0",
"path": "^0.12.7",
"playwright-test": "^8.1.0",
"playwright-test": "^12.1.1",
"polka": "^0.5.2",
"premove": "^4.0.0",
"prompt": "^1.2.2",
"proper-lockfile": "^4.1.2",
"react-native-test-runner": "^5.0.0",
"read-pkg-up": "^9.1.0",
"read-pkg-up": "^10.0.0",
"rimraf": "^5.0.0",
"semantic-release": "^20.1.3",
"semantic-release": "^21.0.7",
"semantic-release-monorepo": "^7.0.5",
"semver": "^7.3.8",
"source-map-support": "^0.5.20",
"strip-bom": "^5.0.0",
"strip-json-comments": "^5.0.0",
"tempy": "^3.0.0",
"typedoc": "^0.23.21",
"typedoc": "^0.24.8",
"typedoc-plugin-mdn-links": "^3.0.3",
"typedoc-plugin-missing-exports": "^1.0.0",
"typescript": "^4.6.3",
"typescript-docs-verifier": "2.4.0",
"typedoc-plugin-missing-exports": "^2.0.0",
"typescript": "^5.1.6",
"typescript-docs-verifier": "^2.5.0",
"uint8arrays": "^4.0.2",
"undici": "^5.0.0",
"update-notifier": "^6.0.2",
Expand All @@ -337,7 +337,7 @@
"@types/semver": "^7.3.4",
"@types/update-notifier": "^6.0.1",
"@types/yargs": "^17.0.0",
"electron": "^24.1.2"
"electron": "^25.3.0"
},
"browser": {
"fs": false,
Expand Down
33 changes: 33 additions & 0 deletions src/check-project/check-typedoc-files.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
/* eslint-disable no-console */

import path from 'path'
import fs from 'fs-extra'
import {
ensureFileHasContents
} from './utils.js'

/**
* @param {string} projectDir
* @param {boolean} isTypescriptProject
*/
export async function checkTypedocFiles (projectDir, isTypescriptProject) {
console.info('Check typedoc files')

const pkg = fs.readJSONSync(path.join(projectDir, 'package.json'))
const entryPoints = Object.values(pkg.exports)
.map(e => {
const path = e.import

if (isTypescriptProject) {
return path
.replace('dist/src', 'src')
.replace('.js', '.ts')
}

return path
})

await ensureFileHasContents(JSON.stringify({
entryPoints
}, null, 2), 'typedoc.json')
}
2 changes: 2 additions & 0 deletions src/check-project/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import { checkLicenseFiles } from './check-licence-files.js'
import { checkMonorepoFiles } from './check-monorepo-files.js'
import { checkMonorepoReadme } from './check-monorepo-readme.js'
import { checkReadme } from './check-readme.js'
import { checkTypedocFiles } from './check-typedoc-files.js'
import { monorepoManifest } from './manifests/monorepo.js'
import { typedCJSManifest } from './manifests/typed-cjs.js'
import { typedESMManifest } from './manifests/typed-esm.js'
Expand Down Expand Up @@ -424,6 +425,7 @@ async function processModule (projectDir, manifest, branchName, repoUrl, homePag

await checkLicenseFiles(projectDir)
await checkReadme(projectDir, repoUrl, branchName, ciFile, rootManifest)
await checkTypedocFiles(projectDir, typescript)
}

export default new Listr([
Expand Down
14 changes: 7 additions & 7 deletions src/check-project/readme/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,17 @@ export function parseMarkdown (md) {
return fromMarkdown(md, {
extensions: [
gfm(),
gfmTable,
gfmTable(),
gfmFootnote(),
gfmStrikethrough(),
gfmTaskListItem
gfmTaskListItem()
],
mdastExtensions: [
gfmFromMarkdown(),
gfmTableFromMarkdown,
gfmTableFromMarkdown(),
gfmFootnoteFromMarkdown(),
gfmStrikethroughFromMarkdown,
gfmTaskListItemFromMarkdown
gfmStrikethroughFromMarkdown(),
gfmTaskListItemFromMarkdown()
]
})
}
Expand All @@ -43,8 +43,8 @@ export function writeMarkdown (tree) {
gfmToMarkdown(),
gfmTableToMarkdown(),
gfmFootnoteToMarkdown(),
gfmStrikethroughToMarkdown,
gfmTaskListItemToMarkdown
gfmStrikethroughToMarkdown(),
gfmTaskListItemToMarkdown()
],
bullet: '-',
listItemIndent: 'one'
Expand Down
2 changes: 1 addition & 1 deletion src/config/tsconfig.aegir.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"noUnusedLocals": true,
"noUnusedParameters": false,
// advanced
"importsNotUsedAsValues": "error",
"verbatimModuleSyntax": true,
"forceConsistentCasingInFileNames": true,
"skipLibCheck": true,
"stripInternal": true,
Expand Down
6 changes: 3 additions & 3 deletions src/docs.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,11 @@ const docs = async (ctx, task) => {
'--gitRevision',
'master',
'--plugin',
fromAegir('src/docs/typedoc-plugin.cjs'),
fromAegir('src/docs/typedoc-plugin.js'),
'--plugin',
fromAegir('src/docs/unknown-symbol-resolver-plugin.cjs'),
fromAegir('src/docs/unknown-symbol-resolver-plugin.js'),
'--plugin',
fromAegir('src/docs/type-indexer-plugin.cjs'),
fromAegir('src/docs/type-indexer-plugin.js'),
'--plugin',
'typedoc-plugin-mdn-links',
'--plugin',
Expand Down
Loading

0 comments on commit 4ef4b62

Please sign in to comment.