Skip to content

Commit

Permalink
fix: remaining references
Browse files Browse the repository at this point in the history
  • Loading branch information
Princesseuh committed Aug 15, 2024
1 parent 9279d56 commit 5e928f5
Show file tree
Hide file tree
Showing 17 changed files with 28 additions and 28 deletions.
2 changes: 1 addition & 1 deletion .github/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,5 +40,5 @@
- packages/integrations/vue/**

'docs pr':
- packages/astro/src/@types/astro.ts
- packages/astro/src/types/public/**
- packages/astro/src/core/errors/errors-data.ts
2 changes: 1 addition & 1 deletion .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ on:
- "examples/**"
- ".github/workflows/check.yml"
- "scripts/smoke/check.js"
- "packages/astro/src/@types/astro.ts"
- "packages/astro/src/types/public/**"
- "pnpm-lock.yaml"
- "packages/astro/types.d.ts"

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ jobs:
filters: |
docs:
- 'packages/integrations/*/README.md'
- 'packages/astro/src/@types/astro.ts'
- "packages/astro/src/types/public/**"
- 'packages/astro/src/core/errors/errors-data.ts'
- name: Build autogenerated docs pages from current astro branch
Expand Down
2 changes: 1 addition & 1 deletion packages/astro/components/Picture.astro
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
import { type LocalImageProps, type RemoteImageProps, getImage } from 'astro:assets';
import * as mime from 'mrmime';
import type { GetImageResult, ImageOutputFormat } from '../dist/@types/astro';
import type { GetImageResult, ImageOutputFormat } from '../dist/types/public/index.js';
import { isESMImportedImage, resolveSrc } from '../dist/assets/utils/imageKind';
import { AstroError, AstroErrorData } from '../dist/core/errors/index.js';
import type { HTMLAttributes } from '../types';
Expand Down
8 changes: 4 additions & 4 deletions packages/astro/config.d.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
type ViteUserConfig = import('vite').UserConfig;
type ViteUserConfigFn = import('vite').UserConfigFn;
type AstroUserConfig = import('./dist/@types/astro.js').AstroUserConfig;
type AstroInlineConfig = import('./dist/@types/astro.js').AstroInlineConfig;
type ImageServiceConfig = import('./dist/@types/astro.js').ImageServiceConfig;
type AstroUserConfig = import('./dist/types/public/config.js').AstroUserConfig;
type AstroInlineConfig = import('./dist/types/public/config.js').AstroInlineConfig;
type ImageServiceConfig = import('./dist/types/public/config.js').ImageServiceConfig;
type SharpImageServiceConfig = import('./dist/assets/services/sharp.js').SharpImageServiceConfig;
type EnvField = typeof import('./dist/env/config.js').envField;

Expand Down Expand Up @@ -42,4 +42,4 @@ export function passthroughImageService(): ImageServiceConfig;
/**
* Return a valid env field to use in this Astro config for `experimental.env.schema`.
*/
export const envField: EnvField;
export declare const envField: EnvField;
2 changes: 1 addition & 1 deletion packages/astro/src/core/create-vite.ts
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ export async function createVite(
{
// Typings are imported from 'astro' (e.g. import { Type } from 'astro')
find: /^astro$/,
replacement: fileURLToPath(new URL('../@types/astro.js', import.meta.url)),
replacement: fileURLToPath(new URL('../types/public/index.js', import.meta.url)),
},
{
find: 'astro:middleware',
Expand Down
2 changes: 1 addition & 1 deletion packages/astro/src/core/errors/errors-data.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// BEFORE ADDING AN ERROR: Please look at the README.md in this folder for general guidelines on writing error messages
// Additionally, this code, much like `@types/astro.ts`, is used to generate documentation, so make sure to pass
// Additionally, this code, much like `types/public/config.ts`, is used to generate documentation, so make sure to pass
// your changes by our wonderful docs team before merging!

import type { ZodError } from 'zod';
Expand Down
2 changes: 1 addition & 1 deletion packages/astro/templates/actions.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ function toActionProxy(actionCallback = {}, aggregatedPath = '') {
/**
* @param {*} param argument passed to the action when called server or client-side.
* @param {string} path Built path to call action by path name.
* @param {import('../dist/@types/astro.d.ts').APIContext | undefined} context Injected API context when calling actions from the server.
* @param {import('../dist/types/public/context.js').APIContext | undefined} context Injected API context when calling actions from the server.
* Usage: `actions.[name](param)`.
* @returns {Promise<import('../dist/actions/runtime/virtual/shared.js').SafeResult<any, any>>}
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { testImageService } from './test-image-service.js';
import { loadFixture } from './test-utils.js';

/**
** @typedef {import('../src/@types/astro').AstroInlineConfig & { root?: string | URL }} AstroInlineConfig
** @typedef {import('../src/types/public/config.js').AstroInlineConfig & { root?: string | URL }} AstroInlineConfig
*/

/** @type {AstroInlineConfig} */
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { APIRoute } from "../../../../../src/@types/astro";
import type { APIRoute } from "astro"

export const GET = (async ({ params, request }) => {
const url = new URL(request.url);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
*
* @returns {import('../src/@types/astro').AstroIntegration}
* @returns {import('../../../../../src/types/public/integrations.js').AstroIntegration}
*/
export default function () {
return {
Expand Down Expand Up @@ -82,4 +82,4 @@ export default function () {
},
},
};
}
}
10 changes: 5 additions & 5 deletions packages/astro/test/test-adapter.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { viteID } from '../dist/core/util.js';

/**
* @typedef {import('../src/@types/astro.js').AstroAdapter} AstroAdapter
* @typedef {import('../src/@types/astro.js').AstroIntegration} AstroIntegration
* @typedef {import('../src/@types/astro.js').HookParameters<"astro:build:ssr">['entryPoints']} EntryPoints
* @typedef {import('../src/@types/astro.js').HookParameters<"astro:build:ssr">['middlewareEntryPoint']} MiddlewareEntryPoint
* @typedef {import('../src/@types/astro.js').HookParameters<"astro:build:done">['routes']} Routes
* @typedef {import('../src/types/public/integrations.js').AstroAdapter} AstroAdapter
* @typedef {import('../src/types/public/integrations.js').AstroIntegration} AstroIntegration
* @typedef {import('../src/types/public/integrations.js').HookParameters<"astro:build:ssr">['entryPoints']} EntryPoints
* @typedef {import('../src/types/public/integrations.js').HookParameters<"astro:build:ssr">['middlewareEntryPoint']} MiddlewareEntryPoint
* @typedef {import('../src/types/public/integrations.js').HookParameters<"astro:build:done">['routes']} Routes
*/

/**
Expand Down
2 changes: 1 addition & 1 deletion packages/astro/test/test-image-service.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export function testImageService(config = {}) {
};
}

/** @type {import("../dist/@types/astro").LocalImageService} */
/** @type {import("../dist/types/public/index.js").LocalImageService} */
export default {
...baseService,
propertiesToHash: [...baseService.propertiesToHash, 'data-custom'],
Expand Down
4 changes: 2 additions & 2 deletions packages/astro/test/test-utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ process.env.ASTRO_TELEMETRY_DISABLED = true;

/**
* @typedef {import('../src/core/dev/dev').DevServer} DevServer
* @typedef {import('../src/@types/astro').AstroInlineConfig & { root?: string | URL }} AstroInlineConfig
* @typedef {import('../src/@types/astro').AstroConfig} AstroConfig
* @typedef {import('../src/types/public/config.js').AstroInlineConfig & { root?: string | URL }} AstroInlineConfig
* @typedef {import('../src/types/public/config.js').AstroConfig} AstroConfig
* @typedef {import('../src/core/preview/index').PreviewServer} PreviewServer
* @typedef {import('../src/core/app/index').App} App
* @typedef {import('../src/cli/check/index').AstroChecker} AstroChecker
Expand Down
2 changes: 1 addition & 1 deletion packages/astro/test/types/call-action.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { describe, it } from 'node:test';
import { expectTypeOf } from 'expect-type';
import type { APIContext } from '../../dist/@types/astro.js';
import type { APIContext } from '../../dist/types/public/context.js';
import { type ActionReturnType, defineAction } from '../../dist/actions/runtime/virtual/server.js';
import { z } from '../../zod.mjs';

Expand Down
6 changes: 3 additions & 3 deletions packages/astro/test/units/test-utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -211,8 +211,8 @@ export function createBasicPipeline(options = {}) {
}

/**
* @param {import('../../src/@types/astro.js').AstroInlineConfig} inlineConfig
* @returns {Promise<import('../../src/@types/astro.js').AstroSettings>}
* @param {import('../../src/types/public/config.js').AstroInlineConfig} inlineConfig
* @returns {Promise<import('../../src/types/astro.js').AstroSettings>}
*/
export async function createBasicSettings(inlineConfig = {}) {
if (!inlineConfig.root) {
Expand All @@ -225,7 +225,7 @@ export async function createBasicSettings(inlineConfig = {}) {
/**
* @typedef {{
* fs?: typeof realFS,
* inlineConfig?: import('../../src/@types/astro.js').AstroInlineConfig,
* inlineConfig?: import('../../src/types/public/config.js').AstroInlineConfig,
* logging?: import('../../src/core/logger/core').LogOptions,
* }} RunInContainerOptions
*/
Expand Down
2 changes: 1 addition & 1 deletion packages/integrations/node/test/api-route.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { createRequestAndResponse, loadFixture } from './test-utils.js';
describe('API routes', () => {
/** @type {import('./test-utils').Fixture} */
let fixture;
/** @type {import('astro/src/@types/astro.js').PreviewServer} */
/** @type {import('../../../astro/src/types/public/preview.js').PreviewServer} */
let previewServer;
/** @type {URL} */
let baseUri;
Expand Down

0 comments on commit 5e928f5

Please sign in to comment.