@openfn/language-common 1.7.7 → 1.8.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -147,6 +147,7 @@ function expandRequestReferences(params) {
147
147
  const [toKeep, toExpand] = splitKeys(params || {}, [
148
148
  "agentOptions",
149
149
  "body",
150
+ "json",
150
151
  "data",
151
152
  "form",
152
153
  "formData",
@@ -410,10 +411,10 @@ function scrubEmojis(text, replacementChars) {
410
411
  "It's better to replace than remove.",
411
412
  "See https://www.unicode.org/reports/tr36/#Deletion_of_Noncharacters"
412
413
  );
413
- } else if (!replacementChars)
414
- replacementChars = "\uFFFD";
414
+ }
415
+ const newChars = replacementChars || replacementChars == "" ? replacementChars : "\uFFFD";
415
416
  const emojisPattern = /(\uFE0F|\u00a9|\u00ae|[\u2000-\u3300]|\ud83c[\ud000-\udfff]|\ud83d[\ud000-\udfff]|\ud83e[\ud000-\udfff])/g;
416
- return text.replace(emojisPattern, replacementChars);
417
+ return text.replace(emojisPattern, newChars);
417
418
  }
418
419
  function chunk(array, chunkSize) {
419
420
  const output = [];
package/dist/index.js CHANGED
@@ -92,6 +92,7 @@ function expandRequestReferences(params) {
92
92
  const [toKeep, toExpand] = splitKeys(params || {}, [
93
93
  "agentOptions",
94
94
  "body",
95
+ "json",
95
96
  "data",
96
97
  "form",
97
98
  "formData",
@@ -355,10 +356,10 @@ function scrubEmojis(text, replacementChars) {
355
356
  "It's better to replace than remove.",
356
357
  "See https://www.unicode.org/reports/tr36/#Deletion_of_Noncharacters"
357
358
  );
358
- } else if (!replacementChars)
359
- replacementChars = "\uFFFD";
359
+ }
360
+ const newChars = replacementChars || replacementChars == "" ? replacementChars : "\uFFFD";
360
361
  const emojisPattern = /(\uFE0F|\u00a9|\u00ae|[\u2000-\u3300]|\ud83c[\ud000-\udfff]|\ud83d[\ud000-\udfff]|\ud83e[\ud000-\udfff])/g;
361
- return text.replace(emojisPattern, replacementChars);
362
+ return text.replace(emojisPattern, newChars);
362
363
  }
363
364
  function chunk(array, chunkSize) {
364
365
  const output = [];
package/dist/metadata.cjs CHANGED
@@ -23,7 +23,7 @@ __export(metadata_exports, {
23
23
  });
24
24
  module.exports = __toCommonJS(metadata_exports);
25
25
  var createEntity = (name, type, props = {}, children) => {
26
- const { label, datatype, value, ...meta } = props;
26
+ const { label, datatype, ...meta } = props;
27
27
  const e = {
28
28
  name,
29
29
  type,
package/dist/metadata.js CHANGED
@@ -1,6 +1,6 @@
1
1
  // src/metadata.js
2
2
  var createEntity = (name, type, props = {}, children) => {
3
- const { label, datatype, value, ...meta } = props;
3
+ const { label, datatype, ...meta } = props;
4
4
  const e = {
5
5
  name,
6
6
  type,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openfn/language-common",
3
- "version": "1.7.7",
3
+ "version": "1.8.1",
4
4
  "description": "Common Expressions for OpenFn",
5
5
  "homepage": "https://docs.openfn.org",
6
6
  "repository": {
@@ -50,6 +50,7 @@
50
50
  "test": "mocha --experimental-specifier-resolution=node --no-warnings",
51
51
  "test:watch": "mocha -w --experimental-specifier-resolution=node --no-warnings",
52
52
  "clean": "rimraf dist types docs",
53
- "pack": "pnpm pack --pack-destination ../../dist"
53
+ "pack": "pnpm pack --pack-destination ../../dist",
54
+ "lint": "eslint src"
54
55
  }
55
56
  }