0
Fork 0
mirror of https://github.com/withastro/astro.git synced 2025-04-14 23:51:49 -05:00

config: migrate us to moduleResolution: 'node16' (#8519)

This commit is contained in:
Erika 2023-09-13 16:49:22 +02:00 committed by GitHub
parent 965c49bf04
commit f366682d3f
6 changed files with 8 additions and 11 deletions

View file

@ -1,6 +1,6 @@
import type { AstroAdapter, AstroIntegration } from 'astro';
import { AstroError } from 'astro/errors';
import type { Options, UserOptions } from './types';
import type { Options, UserOptions } from './types.js';
export function getAdapter(options: Options): AstroAdapter {
return {
name: '@astrojs/node',

View file

@ -1,9 +1,9 @@
import type { NodeApp } from 'astro/app/node';
import type { ServerResponse } from 'node:http';
import type { Readable } from 'stream';
import { createOutgoingHttpHeaders } from './createOutgoingHttpHeaders';
import { responseIterator } from './response-iterator';
import type { ErrorHandlerParams, Options, RequestHandlerParams } from './types';
import { createOutgoingHttpHeaders } from './createOutgoingHttpHeaders.js';
import { responseIterator } from './response-iterator.js';
import type { ErrorHandlerParams, Options, RequestHandlerParams } from './types.js';
// Disable no-unused-vars to avoid breaking signature change
export default function (app: NodeApp, mode: Options['mode']) {

View file

@ -4,7 +4,7 @@ import type http from 'node:http';
import { fileURLToPath } from 'node:url';
import { getNetworkAddress } from './get-network-address.js';
import { createServer } from './http-server.js';
import type { createExports } from './server';
import type { createExports } from './server.js';
const preview: CreatePreviewServer = async function ({
client,

View file

@ -2,7 +2,7 @@ import type { SSRManifest } from 'astro';
import { NodeApp, applyPolyfills } from 'astro/app/node';
import middleware from './nodeMiddleware.js';
import startServer from './standalone.js';
import type { Options } from './types';
import type { Options } from './types.js';
applyPolyfills();
export function createExports(manifest: SSRManifest, options: Options) {

View file

@ -5,7 +5,7 @@ import { fileURLToPath } from 'node:url';
import { getNetworkAddress } from './get-network-address.js';
import { createServer } from './http-server.js';
import middleware from './nodeMiddleware.js';
import type { Options } from './types';
import type { Options } from './types.js';
function resolvePaths(options: Options) {
const clientURLRaw = new URL(options.client);

View file

@ -2,9 +2,6 @@
"extends": "../../../tsconfig.base.json",
"include": ["src"],
"compilerOptions": {
"allowJs": true,
"module": "ES2022",
"outDir": "./dist",
"target": "ES2022"
"outDir": "./dist"
}
}