Skip to content

Commit f7c8e6e

Browse files
committed
all back to cjs
1 parent af75f4c commit f7c8e6e

File tree

9 files changed

+7
-8
lines changed

9 files changed

+7
-8
lines changed
File renamed without changes.

next.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import {codecovNextJSWebpackPlugin} from '@codecov/nextjs-webpack-plugin';
22
import {withSentryConfig} from '@sentry/nextjs';
33

4-
import {redirects} from './redirects.cjs';
4+
import {redirects} from './redirects.js';
55

66
const outputFileTracingExcludes = process.env.NEXT_PUBLIC_DEVELOPER_DOCS
77
? {

package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
"description": "Sentry's documentation (and tools to build it)",
44
"license": "FSL-1.1-Apache-2.0",
55
"author": "getsentry",
6-
"type": "module",
76
"repository": {
87
"type": "git",
98
"url": "git+https://github.com/getsentry/sentry-docs.git"
@@ -20,7 +19,7 @@
2019
"dev:developer-docs": "yarn enforce-redirects && NEXT_PUBLIC_DEVELOPER_DOCS=1 yarn dev",
2120
"build:developer-docs": "yarn enforce-redirects && git submodule init && git submodule update && NEXT_PUBLIC_DEVELOPER_DOCS=1 yarn build",
2221
"build": "yarn enforce-redirects && next build && yarn generate-md-exports",
23-
"generate-md-exports": "node --loader ts-node/esm scripts/generate-md-exports.ts",
22+
"generate-md-exports": "node scripts/generate-md-exports.mjs",
2423
"vercel:build:developer-docs": "yarn enforce-redirects && git submodule init && git submodule update && NEXT_PUBLIC_DEVELOPER_DOCS=1 yarn build",
2524
"start": "next start",
2625
"lint": "next lint",
File renamed without changes.
File renamed without changes.

public/yo.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
yo you
File renamed without changes.

scripts/generate-md-exports.ts renamed to scripts/generate-md-exports.mjs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
#!/usr/bin/env ts-node
1+
#!/usr/bin/env node
22

3-
import type {PathLike} from 'node:fs';
43
import {mkdir, opendir, readFile, rm, writeFile} from 'node:fs/promises';
54
import * as path from 'node:path';
65
import rehypeParse from 'rehype-parse';
@@ -14,7 +13,7 @@ const root = process.cwd(); // fix this
1413
const INPUT_DIR = path.join(root, '.next', 'server', 'app');
1514
const OUTPUT_DIR = path.join(root, 'public', 'md-exports');
1615

17-
export const genMDFromHTML = async (source: PathLike, target: PathLike) => {
16+
export const genMDFromHTML = async (source, target) => {
1817
const text = await readFile(source, {encoding: 'utf8'});
1918
await writeFile(
2019
target,

tsconfig.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
// https://www.typescriptlang.org/docs/handbook/compiler-options.html
77
/* Basic Options */
88
"target": "ESNEXT" /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017','ES2018' or 'ESNEXT'. */,
9-
"module": "ESNext" /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */,
9+
"module": "commonjs" /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */,
1010
"lib": [
1111
"dom",
1212
"esnext"
@@ -79,5 +79,5 @@
7979
".next/types/**/*.ts",
8080
"**/*.ts",
8181
"**/*.tsx"
82-
]
82+
, "scripts/generate-md-exports.mjs" ]
8383
}

0 commit comments

Comments
 (0)