Skip to content

Commit

Permalink
Merge pull request #596 from cloudflare/jsnell/nodejs-compat-unflag-s…
Browse files Browse the repository at this point in the history
…treams
  • Loading branch information
jasnell authored May 4, 2023
2 parents 07ed029 + 9d8b62c commit 91ff6b7
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 26 deletions.
21 changes: 1 addition & 20 deletions samples/nodejs-compat-streams/config.capnp
Original file line number Diff line number Diff line change
@@ -1,35 +1,16 @@
# Imports the base schema for workerd configuration files.

# Refer to the comments in /src/workerd/server/workerd.capnp for more details.

using Workerd = import "/workerd/workerd.capnp";

# A constant of type Workerd.Config defines the top-level configuration for an
# instance of the workerd runtime. A single config file can contain multiple
# Workerd.Config definitions and must have at least one.
const helloWorldExample :Workerd.Config = (

# Every workerd instance consists of a set of named services. A worker, for instance,
# is a type of service. Other types of services can include external servers, the
# ability to talk to a network, or accessing a disk directory. Here we create a single
# worker service. The configuration details for the worker are defined below.
services = [ (name = "main", worker = .helloWorld) ],

# Every configuration defines the one or more sockets on which the server will listene.
# Here, we create a single socket that will listen on localhost port 8080, and will
# dispatch to the "main" service that we defined above.
sockets = [ ( name = "http", address = "*:8080", http = (), service = "main" ) ]
);

# The definition of the actual helloWorld worker exposed using the "main" service.
# In this example the worker is implemented as a single simple script (see worker.js).
# The compatibilityDate is required. For more details on compatibility dates see:
# https://developers.cloudflare.com/workers/platform/compatibility-dates/

const helloWorld :Workerd.Worker = (
modules = [
(name = "worker", esModule = embed "worker.js")
],
compatibilityDate = "2022-11-08",
compatibilityFlags = ["nodejs_compat", "experimental"]
compatibilityFlags = ["nodejs_compat"]
);
6 changes: 0 additions & 6 deletions src/node/stream.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,6 @@

/* eslint-disable */

// TODO(soon): Remove this once assert is out of experimental
import { default as CompatibilityFlags } from 'workerd:compatibility-flags';
if (!CompatibilityFlags.workerdExperimental) {
throw new Error('node:stream is experimental.');
}

import { pipeline } from 'node-internal:streams_pipeline';
import {
destroyer,
Expand Down

0 comments on commit 91ff6b7

Please # to comment.