update all deps (#80)

This commit is contained in:
Adam Matthiesen 2024-04-26 03:10:17 -07:00 committed by GitHub
parent f43db76966
commit c968b374a2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 565 additions and 904 deletions

View File

@ -0,0 +1,5 @@
---
"@matthiesenxyz/astro-gists": patch
---
update dependencies

View File

@ -41,22 +41,21 @@
"scripts": {}, "scripts": {},
"type": "module", "type": "module",
"peerDependencies": { "peerDependencies": {
"astro": ">=4.4.1" "astro": ">=4.5.0"
}, },
"devDependencies": { "devDependencies": {
"@octokit/types": "^12.6.0" "@octokit/types": "^13.4.1"
}, },
"dependencies": { "dependencies": {
"@expressive-code/core": "^0.33.5", "@expressive-code/core": "^0.35.2",
"@expressive-code/plugin-frames": "0.33.5", "@expressive-code/plugin-frames": "^0.35.2",
"@expressive-code/plugin-shiki": "0.33.5", "@expressive-code/plugin-shiki": "^0.35.2",
"@expressive-code/plugin-text-markers": "0.33.5", "@expressive-code/plugin-text-markers": "^0.35.2",
"@expressive-code/plugin-line-numbers": "^0.33.5", "@expressive-code/plugin-line-numbers": "^0.35.2",
"astro-integration-kit": "^0.8.0", "astro-integration-kit": "^0.12.0",
"chalk": "^5.3.0", "chalk": "^5.3.0",
"hast-util-to-html": "8.0.4", "p-retry": "^6.2.0",
"p-retry": "6.2.0", "octokit": "^3.2.0",
"octokit": "^3.1.2", "vite": "^5.2.10"
"vite": "^5.2.7"
} }
} }

View File

@ -1,5 +1,5 @@
--- ---
import { toHtml } from 'hast-util-to-html' import { toHtml } from '@expressive-code/core/hast'
import { getPageData } from './page-data'; import { getPageData } from './page-data';
import { engine } from '../index' import { engine } from '../index'

View File

@ -25,31 +25,29 @@ export const TOKEN_MISSING_ERROR = "GITHUB_PERSONAL_TOKEN not found. Please add
export default defineIntegration({ export default defineIntegration({
name: "@matthiesenxyz/astro-gists", name: "@matthiesenxyz/astro-gists",
optionsSchema: z.custom<astroGistsUserConfig>().optional().default({ verbose: false }), optionsSchema: z.custom<astroGistsUserConfig>().optional().default({ verbose: false }),
setup({ setup({ name, options }) {
name,
options,
options: { verbose: isVerbose }
}) {
return { return {
hooks: {
"astro:config:setup": ( params ) => { "astro:config:setup": ( params ) => {
const { verbose } = options;
const { logger } = params; const { logger } = params;
// Create a logger for the setup events // Create a logger for the setup events
const configLogger = logger.fork("astro-gists : setup"); const configLogger = logger.fork("astro-gists : setup");
const configDone = logger.fork("astro-gists : setup-done") const configDone = logger.fork("astro-gists : setup-done")
gistLogger(configLogger, isVerbose, "info", "Setting up Astro Gists Integration.", false); gistLogger(configLogger, verbose, "info", "Setting up Astro Gists Integration.", false);
gistLogger(configLogger, isVerbose, "warn", "Verbose logging is enabled.", true); gistLogger(configLogger, verbose, "warn", "Verbose logging is enabled.", true);
// Check for GITHUB_PERSONAL_TOKEN // Check for GITHUB_PERSONAL_TOKEN
if (!isThereAToken()) { if (!isThereAToken()) {
gistLogger(configLogger, isVerbose, "error",TOKEN_MISSING_ERROR, false) gistLogger(configLogger, verbose, "error",TOKEN_MISSING_ERROR, false)
} }
// Add virtual imports // Add virtual imports
gistLogger(configLogger, isVerbose, "info", "Adding virtual imports.", true); gistLogger(configLogger, verbose, "info", "Adding virtual imports.", true);
addVirtualImports(params, { addVirtualImports(params, {
name, name,
imports: { imports: {
@ -58,7 +56,7 @@ export default defineIntegration({
}}); }});
// Add .d.ts file // Add .d.ts file
gistLogger(configLogger, isVerbose, "info", "Injecting astro-gists.d.ts file.", true); gistLogger(configLogger, verbose, "info", "Injecting astro-gists.d.ts file.", true);
const gistsDTS = fileFactory(); const gistsDTS = fileFactory();
@ -76,7 +74,7 @@ export default defineIntegration({
// Log that the configuration is complete // Log that the configuration is complete
gistLogger( gistLogger(
configDone, configDone,
isVerbose, verbose,
"info", "info",
"Configuration for Astro Gists Integration is complete.", "Configuration for Astro Gists Integration is complete.",
false false
@ -84,4 +82,5 @@ export default defineIntegration({
}, },
} }
} }
}
}) })

View File

@ -11,13 +11,13 @@
"astro": "astro" "astro": "astro"
}, },
"dependencies": { "dependencies": {
"astro": "^4.5.12", "astro": "^4.7.0",
"@matthiesenxyz/astro-gists": "workspace:*" "@matthiesenxyz/astro-gists": "workspace:*"
}, },
"devDependencies": { "devDependencies": {
"@astrojs/mdx": "^2.2.2", "@astrojs/mdx": "^2.3.1",
"@astrojs/check": "^0.5.10", "@astrojs/check": "^0.5.10",
"@types/node": "^20.12.2", "@types/node": "^20.12.7",
"typescript": "^5.4.3" "typescript": "^5.4.5"
} }
} }

File diff suppressed because it is too large Load Diff