Skip to content

Commit

Permalink
Debugging windows
Browse files Browse the repository at this point in the history
  • Loading branch information
ascorbic committed Jul 8, 2024
1 parent 616a3cf commit aa423df
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 4 deletions.
4 changes: 2 additions & 2 deletions packages/astro/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@
"test:e2e:match": "playwright test -g",
"test:e2e:chrome": "playwright test",
"test:e2e:firefox": "playwright test --config playwright.firefox.config.js",
"test:node": "astro-scripts test \"test/**/*.test.js\""
"test:node": "astro-scripts test \"test/content-layer.test.js\""
},
"dependencies": {
"@astrojs/compiler": "^2.8.1",
Expand Down Expand Up @@ -243,4 +243,4 @@
"publishConfig": {
"provenance": true
}
}
}
3 changes: 3 additions & 0 deletions packages/astro/src/content/loaders/glob.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,9 @@ export function glob(globOptions: GlobOptions): Loader {
logger.warn(`No entry type found for ${entry}`);
return;
}
console.log({ entry, base });
const fileUrl = new URL(entry, base);
console.log({ fileUrl });
const { body, data } = await entryType.getEntryInfo({
contents: await fs.readFile(fileUrl, 'utf-8'),
fileUrl,
Expand All @@ -82,6 +84,7 @@ export function glob(globOptions: GlobOptions): Loader {
const id = generateId({ entry, base, data });

const filePath = fileURLToPath(fileUrl);
console.log({ filePath });

const parsedData = await parseData({
id,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,12 @@ const cats = defineCollection({
}),
});

console.log('import.meta.url', import.meta.url);
console.log('url', new URL('../../content-outside-src', import.meta.url).href );
console.log('fileURLToPath', fileURLToPath(new URL('../../content-outside-src', import.meta.url)));

// Absolute paths should also work
const absoluteRoot = fileURLToPath(new URL('../../content-outside-src', import.meta.url))
const absoluteRoot = fileURLToPath(new URL('../../content-outside-src', import.meta.url));

const spacecraft = defineCollection({
type: 'experimental_data',
Expand Down
2 changes: 1 addition & 1 deletion scripts/cmd/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import arg from 'arg';
import glob from 'tiny-glob';

const isCI = !!process.env.CI;
const defaultTimeout = isCI ? 1400000 : 600000;
const defaultTimeout = 600000 //isCI ? 600000 : 600000;

export default async function test() {
const args = arg({
Expand Down

0 comments on commit aa423df

Please sign in to comment.