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

@fastly/compute-js-static-publish

Package Overview
Dependencies
Maintainers
3
Versions
51
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@fastly/compute-js-static-publish - npm Package Compare versions

Comparing version 3.4.0 to 3.5.0

10

build/init-app.js

@@ -177,3 +177,3 @@ // This program creates a Compute@Edge JavaScript application

"devDependencies": {
"@fastly/compute-js-static-publish": "^3.0.1",
"@fastly/compute-js-static-publish": "^3.5.0",
"@fastly/expressly": "^1.0.0-beta.2",

@@ -184,3 +184,3 @@ "webpack": "^5.75.0",

"dependencies": {
"@fastly/js-compute": "^1.0.1"
"@fastly/js-compute": "^1.3.4"
},

@@ -194,3 +194,5 @@ "engines": {

"scripts": {
"deploy": "fastly compute deploy"
"deploy": "fastly compute deploy",
"prebuild": "npx @fastly/compute-js-static-publish --build-static && webpack",
"build": "js-compute-runtime ./bin/index.js ./bin/main.wasm"
},

@@ -216,3 +218,3 @@ "version": "0.2.1"

[scripts]
build = "npx @fastly/compute-js-static-publish --build-static && npx webpack && npx js-compute-runtime ./bin/index.js ./bin/main.wasm"
build = "npm run build"
`;

@@ -219,0 +221,0 @@ const fastlyTomlPath = path.resolve(computeJsDir, 'fastly.toml');

4

package.json
{
"name": "@fastly/compute-js-static-publish",
"type": "module",
"version": "3.4.0",
"version": "3.5.0",
"description": "Static Publisher for Compute@Edge JavaScript",

@@ -33,3 +33,3 @@ "main": "./build/index.js",

"dependencies": {
"@fastly/js-compute": "^1.0.1",
"@fastly/js-compute": "^1.3.4",
"command-line-args": "^5.2.1"

@@ -36,0 +36,0 @@ },

@@ -32,3 +32,3 @@ # Static Publisher for JavaScript on Compute@Edge

The build process will generate a `/src/statics.js` file (in `./compute-js`) that holds references to your project's public files.
The build process will generate a `/src/statics.js` and accompanying `/src/statics.d.ts` file (in `./compute-js`) that holds references to your project's public files.

@@ -105,9 +105,7 @@ ### 3. When you're ready to go live, [deploy your Compute@Edge service](https://developer.fastly.com/reference/cli/compute/publish/)

If you've updated your project to 3.0.0 or newer of `@fastly/compute-js-static-publish`, and it was scaffolded a version of this tool older than 3.0.0, you'll need to either re-scaffold your project, or make some changes to your application.
To update `@fastly/compute-js-static-publish` to a new major version, we recommend that you re-scaffold your application. However, we know that's not always possible, so the following is provided to help you overcome any breaking changes.
If you wish to modify your application, make the following changes:
* `webpack.config.js`
* Add a new `externals` array to the bottom if it doesn't exist already, and add the following entry:
* Starting `v3.0.0`, we depend on `v1.0.0` of the `js-compute` library. You'll need to add a new `externals` array to the bottom if it doesn't exist already, and add the following entry:

@@ -128,3 +126,3 @@ ```javascript

* Remove the following code from the `module.rules` array.
* Starting `v3.0.0`, we are able to produce more size-efficient Wasm files by using the [`includeBytes` function](https://js-compute-reference-docs.edgecompute.app/docs/fastly:experimental/includeBytes) to include the contents of static files instead of Webpack static assets. The following code can safely be removed from the `module.rules` array.

@@ -156,21 +154,26 @@ ```javascript

* Add the following entry:
* Add any of the following entries that may be missing from your `.gitignore` file:
```gitignore
/src/statics.js
/src/statics.d.ts
/src/static-content
```
* Various versions of `@fastly/compute-js-static-publish` have specified different build scripts. At the current time, the following is the recommended setup, regardless of the version of `@fastly/compute-js-static-publish` or Fastly CLI.
## Troubleshooting
* The build script listed in `compute-js/fastly.toml` should look like this:
```toml
[scripts]
build = "npm run build"
```
If you're using Fastly CLI 4.0.0 or newer, and your project was scaffolded using a version
of this tool older than 2.1.0, then you'll need to either re-scaffold your project, or add the following to the
`fastly.toml` file that is in your `compute-js` directory.
* The `scripts` section of `compute-js/package.json` should contain the following lines:
```json
{
"prebuild": "npx @fastly/compute-js-static-publish --build-static && webpack",
"build": "js-compute-runtime ./bin/index.js ./bin/main.wasm"
}
```
```toml
[scripts]
build = "npx @fastly/compute-js-static-publish --build-static && npx webpack && npx js-compute-runtime ./bin/index.js ./bin/main.wasm"
```
If Fastly CLI has already added `build = "npx webpack && npx js-compute-runtime ./bin/index.js ./bin/main.wasm"`, then replace it with the above.
## Issues

@@ -177,0 +180,0 @@

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