Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@astrojs/deno

Package Overview
Dependencies
Maintainers
4
Versions
57
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@astrojs/deno - npm Package Compare versions

Comparing version 0.0.0-rc-20220722032928 to 0.0.0-rc-20220725043302

27

CHANGELOG.md
# @astrojs/node
## 0.0.0-rc-20220722032928
## 0.0.0-rc-20220725043302
### Minor Changes
- [#3973](https://github.com/withastro/astro/pull/3973) [`5a23483ef`](https://github.com/withastro/astro/commit/5a23483efb3ba614b05a00064f84415620605204) Thanks [@matthewp](https://github.com/matthewp)! - Adds support for Astro.clientAddress
- [#4015](https://github.com/withastro/astro/pull/4015) [`6fd161d76`](https://github.com/withastro/astro/commit/6fd161d7691cbf9d3ffa4646e46059dfd0940010) Thanks [@matthewp](https://github.com/matthewp)! - New `output` configuration option
This change introduces a new "output target" configuration option (`output`). Setting the output target lets you decide the format of your final build, either:
- `"static"` (default): A static site. Your final build will be a collection of static assets (HTML, CSS, JS) that you can deploy to any static site host.
- `"server"`: A dynamic server application. Your final build will be an application that will run in a hosted server environment, generating HTML dynamically for different requests.
If `output` is omitted from your config, the default value `"static"` will be used.
When using the `"server"` output target, you must also include a runtime adapter via the `adapter` configuration. An adapter will _adapt_ your final build to run on the deployed platform of your choice (Netlify, Vercel, Node.js, Deno, etc).
To migrate: No action is required for most users. If you currently define an `adapter`, you will need to also add `output: 'server'` to your config file to make it explicit that you are building a server. Here is an example of what that change would look like for someone deploying to Netlify:
```diff
import { defineConfig } from 'astro/config';
import netlify from '@astrojs/netlify/functions';
export default defineConfig({
adapter: netlify(),
+ output: 'server',
});
```
* [#3973](https://github.com/withastro/astro/pull/3973) [`5a23483ef`](https://github.com/withastro/astro/commit/5a23483efb3ba614b05a00064f84415620605204) Thanks [@matthewp](https://github.com/matthewp)! - Adds support for Astro.clientAddress
The new `Astro.clientAddress` property allows you to get the IP address of the requested user.

@@ -10,0 +33,0 @@

@@ -23,4 +23,8 @@ import esbuild from "esbuild";

hooks: {
"astro:config:done": ({ setAdapter }) => {
"astro:config:done": ({ setAdapter, config }) => {
setAdapter(getAdapter(args));
if (config.output === "static") {
console.warn(`[@astrojs/deno] \`output: "server"\` is required to use this adapter.`);
console.warn(`[@astrojs/deno] Otherwise, this adapter is not required to deploy a static site to Deno.`);
}
},

@@ -27,0 +31,0 @@ "astro:build:start": ({ buildConfig }) => {

4

package.json
{
"name": "@astrojs/deno",
"description": "Deploy your site to a Deno server",
"version": "0.0.0-rc-20220722032928",
"version": "0.0.0-rc-20220725043302",
"type": "module",

@@ -28,3 +28,3 @@ "types": "./dist/index.d.ts",

"devDependencies": {
"astro": "0.0.0-rc-20220722032928",
"astro": "0.0.0-rc-20220725043302",
"astro-scripts": "0.0.6"

@@ -31,0 +31,0 @@ },

@@ -40,2 +40,3 @@ # @astrojs/deno 🦖

// ...
output: 'server',
adapter: deno()

@@ -73,2 +74,3 @@ });

export default defineConfig({
output: 'server',
adapter: deno({

@@ -90,2 +92,3 @@ //options go here

export default defineConfig({
output: 'server',
adapter: deno({

@@ -121,2 +124,3 @@ start: false

export default defineConfig({
output: 'server',
adapter: deno({

@@ -123,0 +127,0 @@ port: 8081,

@@ -32,4 +32,11 @@ import type { AstroAdapter, AstroIntegration } from 'astro';

hooks: {
'astro:config:done': ({ setAdapter }) => {
'astro:config:done': ({ setAdapter, config }) => {
setAdapter(getAdapter(args));
if (config.output === 'static') {
console.warn(`[@astrojs/deno] \`output: "server"\` is required to use this adapter.`);
console.warn(
`[@astrojs/deno] Otherwise, this adapter is not required to deploy a static site to Deno.`
);
}
},

@@ -36,0 +43,0 @@ 'astro:build:start': ({ buildConfig }) => {

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc