Skip to content

Commit

Permalink
Fix astro/app import (#7821)
Browse files Browse the repository at this point in the history
* core -> core.js

* changeset

* test

---------

Co-authored-by: Nate Moore <[email protected]>
  • Loading branch information
ottomated and natemoo-re authored Aug 1, 2023
1 parent 2f06923 commit c00b6f0
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/four-ways-tap.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'astro': patch
---

Fixes an issue that prevents importing `'astro/app'`
2 changes: 1 addition & 1 deletion packages/astro/src/core/app/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import { consoleLogDestination } from '../logger/console.js';
import { error, type LogOptions } from '../logger/core.js';
import { prependForwardSlash, removeTrailingForwardSlash } from '../path.js';
import { RedirectSinglePageBuiltModule } from '../redirects/index.js';
import { isResponse } from '../render/core';
import { isResponse } from '../render/core.js';
import {
createEnvironment,
createRenderContext,
Expand Down
13 changes: 13 additions & 0 deletions packages/astro/test/import-app.test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import { expect } from 'chai';

describe('Import astro/app', async () => {

it('Successfully imports astro/app', async () => {
try {
await import('astro/app');
expect(true).to.be.true;
} catch (err) {
expect.fail(undefined, undefined, `Importing astro/app should not throw an error: ${err}`);
}
});
});
6 changes: 6 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit c00b6f0

Please sign in to comment.