-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into fix/missing-css-import-on-404-redirect
- Loading branch information
Showing
17 changed files
with
203 additions
and
69 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'astro': patch | ||
--- | ||
|
||
Fix filename generation for `.astro` pages |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@astrojs/rss': patch | ||
--- | ||
|
||
Add URL to RSSOptions.site type |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'astro': patch | ||
--- | ||
|
||
Fix inline root resolve logic |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'astro': patch | ||
--- | ||
|
||
Ensure that injected routes from `node_modules` are properly detected |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
import { expect } from 'chai'; | ||
import { makeAstroPageEntryPointFileName } from '../../../dist/core/build/static-build.js'; | ||
|
||
describe('astro/src/core/build', () => { | ||
describe('makeAstroPageEntryPointFileName', () => { | ||
const routes = [ | ||
{ | ||
route: '/', | ||
component: 'src/pages/index.astro', | ||
pathname: '/', | ||
}, | ||
{ | ||
route: '/injected', | ||
component: '../node_modules/my-dep/injected.astro', | ||
pathname: '/injected', | ||
}, | ||
{ | ||
route: '/injected-workspace', | ||
component: '../../packages/demo/[...all].astro', | ||
pathname: undefined, | ||
}, | ||
{ | ||
route: '/blog/[year]/[...slug]', | ||
component: 'src/pages/blog/[year]/[...slug].astro', | ||
pathname: undefined, | ||
}, | ||
]; | ||
|
||
it('handles local pages', async () => { | ||
const input = '@astro-page:src/pages/index@_@astro'; | ||
const output = 'pages/index.astro.mjs'; | ||
const result = makeAstroPageEntryPointFileName('@astro-page:', input, routes); | ||
expect(result).to.equal(output); | ||
}); | ||
|
||
it('handles dynamic pages', async () => { | ||
const input = '@astro-page:src/pages/blog/[year]/[...slug]@_@astro'; | ||
const output = 'pages/blog/_year_/_---slug_.astro.mjs'; | ||
const result = makeAstroPageEntryPointFileName('@astro-page:', input, routes); | ||
expect(result).to.equal(output); | ||
}); | ||
|
||
it('handles node_modules pages', async () => { | ||
const input = '@astro-page:../node_modules/my-dep/injected@_@astro'; | ||
const output = 'pages/injected.astro.mjs'; | ||
const result = makeAstroPageEntryPointFileName('@astro-page:', input, routes); | ||
expect(result).to.equal(output); | ||
}); | ||
|
||
// Fix #7561 | ||
it('handles local workspace pages', async () => { | ||
const input = '@astro-page:../../packages/demo/[...all]@_@astro'; | ||
const output = 'pages/injected-workspace.astro.mjs'; | ||
const result = makeAstroPageEntryPointFileName('@astro-page:', input, routes); | ||
expect(result).to.equal(output); | ||
}); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import { expect } from 'chai'; | ||
import path from 'node:path'; | ||
import { fileURLToPath } from 'node:url'; | ||
import { resolveConfig } from '../../../dist/core/config/index.js'; | ||
|
||
describe('resolveConfig', () => { | ||
it('resolves relative inline root correctly', async () => { | ||
const { astroConfig } = await resolveConfig( | ||
{ | ||
configFile: false, | ||
root: 'relative/path', | ||
}, | ||
'dev' | ||
); | ||
const expectedRoot = path.join(process.cwd(), 'relative/path/'); | ||
expect(fileURLToPath(astroConfig.root)).to.equal(expectedRoot); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.