Move benchmark package and update changeset config (#6433)
This commit is contained in:
parent
af05a4fa46
commit
00a0af7ed4
14 changed files with 35 additions and 48 deletions
|
@ -6,7 +6,7 @@
|
|||
"access": "public",
|
||||
"baseBranch": "main",
|
||||
"updateInternalDependencies": "patch",
|
||||
"ignore": ["@example/*", "@test/*"],
|
||||
"ignore": ["@example/*", "@test/*", "@benchmark/*", "astro-scripts", "astro-benchmark"],
|
||||
"___experimentalUnsafeOptions_WILL_CHANGE_IN_PATCH": {
|
||||
"onlyUpdatePeerDependentsWhenOutOfRange": true
|
||||
}
|
||||
|
|
|
@ -103,7 +103,7 @@ function printResult(result) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Simple fetch utility to get the render time sent by `@astrojs/timer` in plain text
|
||||
* Simple fetch utility to get the render time sent by `@benchmark/timer` in plain text
|
||||
* @param {string} url
|
||||
* @returns {Promise<number>}
|
||||
*/
|
||||
|
|
|
@ -74,7 +74,7 @@ export async function run(projectDir) {
|
|||
new URL('./astro.config.js', projectDir),
|
||||
`\
|
||||
import { defineConfig } from 'astro/config';
|
||||
import timer from '@astrojs/timer';
|
||||
import timer from '@benchmark/timer';
|
||||
import mdx from '@astrojs/mdx';
|
||||
|
||||
export default defineConfig({
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
"dependencies": {
|
||||
"@astrojs/mdx": "workspace:*",
|
||||
"@astrojs/node": "workspace:*",
|
||||
"@astrojs/timer": "workspace:*",
|
||||
"@benchmark/timer": "workspace:*",
|
||||
"astro": "workspace:*",
|
||||
"autocannon": "^7.10.0",
|
||||
"execa": "^6.1.0",
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
# @astrojs/timer
|
||||
# @benchmark/timer
|
||||
|
||||
Like `@astrojs/node`, but returns the rendered time in milliseconds for the page instead of the page content itself. This is used for internal benchmarks only.
|
|
@ -1,22 +1,16 @@
|
|||
{
|
||||
"name": "@astrojs/timer",
|
||||
"name": "@benchmark/timer",
|
||||
"description": "Preview server for benchmark",
|
||||
"private": true,
|
||||
"version": "0.0.1",
|
||||
"version": "0.0.0",
|
||||
"type": "module",
|
||||
"types": "./dist/index.d.ts",
|
||||
"author": "withastro",
|
||||
"license": "MIT",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/withastro/astro.git",
|
||||
"directory": "packages/integrations/timer"
|
||||
},
|
||||
"keywords": [
|
||||
"withastro",
|
||||
"astro-adapter"
|
||||
],
|
||||
"bugs": "https://github.com/withastro/astro/issues",
|
||||
"exports": {
|
||||
".": "./dist/index.js",
|
||||
"./server.js": "./dist/server.js",
|
|
@ -2,22 +2,22 @@ import type { AstroAdapter, AstroIntegration } from 'astro';
|
|||
|
||||
export function getAdapter(): AstroAdapter {
|
||||
return {
|
||||
name: '@astrojs/timer',
|
||||
serverEntrypoint: '@astrojs/timer/server.js',
|
||||
previewEntrypoint: '@astrojs/timer/preview.js',
|
||||
name: '@benchmark/timer',
|
||||
serverEntrypoint: '@benchmark/timer/server.js',
|
||||
previewEntrypoint: '@benchmark/timer/preview.js',
|
||||
exports: ['handler'],
|
||||
};
|
||||
}
|
||||
|
||||
export default function createIntegration(): AstroIntegration {
|
||||
return {
|
||||
name: '@astrojs/timer',
|
||||
name: '@benchmark/timer',
|
||||
hooks: {
|
||||
'astro:config:setup': ({ updateConfig }) => {
|
||||
updateConfig({
|
||||
vite: {
|
||||
ssr: {
|
||||
noExternal: ['@astrojs/timer'],
|
||||
noExternal: ['@benchmark/timer'],
|
||||
},
|
||||
},
|
||||
});
|
||||
|
@ -26,7 +26,8 @@ export default function createIntegration(): AstroIntegration {
|
|||
setAdapter(getAdapter());
|
||||
|
||||
if (config.output === 'static') {
|
||||
console.warn(`[@astrojs/timer] \`output: "server"\` is required to use this adapter.`);
|
||||
// eslint-disable-next-line no-console
|
||||
console.warn(`[@benchmark/timer] \`output: "server"\` is required to use this adapter.`);
|
||||
}
|
||||
},
|
||||
},
|
|
@ -8,10 +8,10 @@
|
|||
},
|
||||
"scripts": {
|
||||
"release": "pnpm run build && changeset publish",
|
||||
"build": "turbo run build --output-logs=new-only --no-deps --filter=astro --filter=create-astro --filter=\"@astrojs/*\"",
|
||||
"build:ci": "turbo run build:ci --output-logs=new-only --no-deps --filter=astro --filter=create-astro --filter=\"@astrojs/*\"",
|
||||
"build": "turbo run build --output-logs=new-only --no-deps --filter=astro --filter=create-astro --filter=\"@astrojs/*\" --filter=\"@benchmark/*\"",
|
||||
"build:ci": "turbo run build:ci --output-logs=new-only --no-deps --filter=astro --filter=create-astro --filter=\"@astrojs/*\" --filter=\"@benchmark/*\"",
|
||||
"build:examples": "turbo run build --filter=\"@example/*\"",
|
||||
"dev": "turbo run dev --no-deps --no-cache --parallel --filter=astro --filter=create-astro --filter=\"@astrojs/*\"",
|
||||
"dev": "turbo run dev --no-deps --no-cache --parallel --filter=astro --filter=create-astro --filter=\"@astrojs/*\" --filter=\"@benchmark/*\"",
|
||||
"format": "pnpm run format:code",
|
||||
"format:ci": "pnpm run format:imports && pnpm run format:code",
|
||||
"format:code": "prettier -w . --cache --plugin-search-dir=.",
|
||||
|
|
|
@ -1,9 +0,0 @@
|
|||
# @astrojs/timer
|
||||
|
||||
## 0.0.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [[`0abd1d3e4`](https://github.com/withastro/astro/commit/0abd1d3e42cf7bf5efb8c41f37e011b933fb0629), [`cd8469947`](https://github.com/withastro/astro/commit/cd8469947bb63b4233f3459614c5210feac1da96), [`e0844852d`](https://github.com/withastro/astro/commit/e0844852d31d0f5680f2710aaa84e3e808aeb88d)]:
|
||||
- @astrojs/webapi@2.0.3
|
||||
- astro@2.0.18
|
|
@ -67,7 +67,7 @@ importers:
|
|||
specifiers:
|
||||
'@astrojs/mdx': workspace:*
|
||||
'@astrojs/node': workspace:*
|
||||
'@astrojs/timer': workspace:*
|
||||
'@benchmark/timer': workspace:*
|
||||
astro: workspace:*
|
||||
autocannon: ^7.10.0
|
||||
execa: ^6.1.0
|
||||
|
@ -78,7 +78,7 @@ importers:
|
|||
dependencies:
|
||||
'@astrojs/mdx': link:../packages/integrations/mdx
|
||||
'@astrojs/node': link:../packages/integrations/node
|
||||
'@astrojs/timer': link:../packages/integrations/timer
|
||||
'@benchmark/timer': link:packages/timer
|
||||
astro: link:../packages/astro
|
||||
autocannon: 7.10.0
|
||||
execa: 6.1.0
|
||||
|
@ -87,6 +87,21 @@ importers:
|
|||
port-authority: 2.0.1
|
||||
pretty-bytes: 6.1.0
|
||||
|
||||
benchmark/packages/timer:
|
||||
specifiers:
|
||||
'@astrojs/webapi': workspace:*
|
||||
'@types/server-destroy': ^1.0.1
|
||||
astro: workspace:*
|
||||
astro-scripts: workspace:*
|
||||
server-destroy: ^1.0.1
|
||||
dependencies:
|
||||
'@astrojs/webapi': link:../../../packages/webapi
|
||||
server-destroy: 1.0.1
|
||||
devDependencies:
|
||||
'@types/server-destroy': 1.0.1
|
||||
astro: link:../../../packages/astro
|
||||
astro-scripts: link:../../../scripts
|
||||
|
||||
examples/basics:
|
||||
specifiers:
|
||||
astro: ^2.0.18
|
||||
|
@ -3379,21 +3394,6 @@ importers:
|
|||
tailwindcss: 3.2.6_postcss@8.4.21
|
||||
vite: 4.1.2
|
||||
|
||||
packages/integrations/timer:
|
||||
specifiers:
|
||||
'@astrojs/webapi': workspace:*
|
||||
'@types/server-destroy': ^1.0.1
|
||||
astro: workspace:*
|
||||
astro-scripts: workspace:*
|
||||
server-destroy: ^1.0.1
|
||||
dependencies:
|
||||
'@astrojs/webapi': link:../../webapi
|
||||
server-destroy: 1.0.1
|
||||
devDependencies:
|
||||
'@types/server-destroy': 1.0.1
|
||||
astro: link:../../astro
|
||||
astro-scripts: link:../../../scripts
|
||||
|
||||
packages/integrations/turbolinks:
|
||||
specifiers:
|
||||
astro: workspace:*
|
||||
|
|
|
@ -4,3 +4,4 @@ packages:
|
|||
- 'smoke/**/*'
|
||||
- 'scripts'
|
||||
- 'benchmark'
|
||||
- 'benchmark/packages/*'
|
||||
|
|
Loading…
Reference in a new issue