Skip to content

Commit

Permalink
fix: fix references to constants - remove .js extension (#200)
Browse files Browse the repository at this point in the history
Signed-off-by: Lance Ball <lball@redhat.com>
  • Loading branch information
lance authored Jun 1, 2020
1 parent edad2a6 commit c757a2b
Show file tree
Hide file tree
Showing 14 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ yarn-error.log*
# Generated files
*.d.ts
index.js
lib
/lib

# Runtime data
pids
Expand Down
2 changes: 1 addition & 1 deletion src/lib/bindings/http/emitter_binary.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const {
DATA_ATTRIBUTE,
SPEC_V1,
SPEC_V03
} = require("./constants.js");
} = require("./constants");

const defaults = {
[HEADERS]: {
Expand Down
2 changes: 1 addition & 1 deletion src/lib/bindings/http/emitter_structured.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const {
DEFAULT_CE_CONTENT_TYPE,
HEADERS,
HEADER_CONTENT_TYPE
} = require("./constants.js");
} = require("./constants");

const defaults = {
[HEADERS]: {
Expand Down
2 changes: 1 addition & 1 deletion src/lib/bindings/http/receiver_binary.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const ReceiverV1 = require("./v1/receiver_binary_1.js");
const ReceiverV3 = require("./v03/receiver_binary_0_3.js");

const { SPEC_V03, SPEC_V1 } = require("./constants.js");
const { SPEC_V03, SPEC_V1 } = require("./constants");
const { check, parse } = require("./validation/binary.js");

/** @typedef {import("../../cloudevent")} CloudEvent */
Expand Down
2 changes: 1 addition & 1 deletion src/lib/bindings/http/receiver_structured.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const ReceiverV1 = require("./v1/receiver_structured_1.js");
const ReceiverV3 = require("./v03/receiver_structured_0_3.js");

const { SPEC_V03, SPEC_V1 } = require("./constants.js");
const { SPEC_V03, SPEC_V1 } = require("./constants");
const { check, parse } = require("./validation/structured.js");

/** @typedef {import("../../cloudevent")} CloudEvent */
Expand Down
2 changes: 1 addition & 1 deletion src/lib/bindings/http/v03/emitter_binary_0_3.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const {
TIME,
SCHEMA_URL
}
} = require("../constants.js");
} = require("../constants");

function parser(header, parser = (v) => v) {
return { headerName: header, parse: parser };
Expand Down
2 changes: 1 addition & 1 deletion src/lib/bindings/http/v03/receiver_binary_0_3.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const {
ENCODING_BASE64,
HEADER_CONTENT_TYPE,
BINARY_HEADERS_03
} = require("../constants.js");
} = require("../constants");
const Spec = require("./spec_0_3.js");

const JSONParser = require("../../../formats/json/parser.js");
Expand Down
2 changes: 1 addition & 1 deletion src/lib/bindings/http/v03/receiver_structured_0_3.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const {
SUBJECT,
DATA
}
} = require("../constants.js");
} = require("../constants");
const Spec = require("./spec_0_3.js");
const JSONParser = require("../../../formats/json/parser.js");

Expand Down
2 changes: 1 addition & 1 deletion src/lib/bindings/http/v1/emitter_binary_1.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const {
TIME,
DATA_SCHEMA
}
} = require("../constants.js");
} = require("../constants");

function parser(header, parser = (v) => v) {
return { headerName: header, parse: parser };
Expand Down
2 changes: 1 addition & 1 deletion src/lib/bindings/http/v1/receiver_structured_1.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const {
DATA_BASE64,
MIME_JSON
}
} = require("../constants.js");
} = require("../constants");

const Spec = require("./spec_1.js");
const JSONParser = require("../../../formats/json/parser.js");
Expand Down
2 changes: 1 addition & 1 deletion src/lib/bindings/http/validation/binary.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const {
HEADER_CONTENT_TYPE,
MIME_JSON,
DEFAULT_SPEC_VERSION_HEADER
} = require("../constants.js");
} = require("../constants");

const {
isString,
Expand Down
2 changes: 1 addition & 1 deletion src/lib/bindings/http/validation/commons.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const ValidationError = require("./validation_error.js");
const Constants = require("../constants.js");
const Constants = require("../constants");
const {
isDefinedOrThrow,
isStringOrObjectOrThrow
Expand Down
2 changes: 1 addition & 1 deletion src/lib/bindings/http/validation/structured.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const {
} = require("./commons.js");
const {
HEADER_CONTENT_TYPE
} = require("../constants.js");
} = require("../constants");

function check(payload, headers, receiver) {
validateArgs(payload, headers);
Expand Down
2 changes: 1 addition & 1 deletion src/lib/cloudevent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import Spec03 from "./bindings/http/v03/spec_0_3.js";
import Formatter from "./formats/json/formatter.js";
import { isBinary } from "./bindings/http/validation/fun.js";

const { SPEC_V1, SPEC_V03 } = require("./bindings/http/constants.js");
const { SPEC_V1, SPEC_V03 } = require("./bindings/http/constants");

export type CE = CloudEventV1 | CloudEventV1Attributes | CloudEventV03 | CloudEventV03Attributes

Expand Down

0 comments on commit c757a2b

Please sign in to comment.