@typeberry/jam 0.1.2-80d53fd → 0.1.2-953c012

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.
@@ -25234,6 +25234,7 @@ var compatibility_GpVersion;
25234
25234
  GpVersion["V0_6_7"] = "0.6.7";
25235
25235
  GpVersion["V0_7_0"] = "0.7.0";
25236
25236
  GpVersion["V0_7_1"] = "0.7.1-preview";
25237
+ GpVersion["V0_7_2"] = "0.7.2-preview";
25237
25238
  })(compatibility_GpVersion || (compatibility_GpVersion = {}));
25238
25239
  var TestSuite;
25239
25240
  (function (TestSuite) {
@@ -25241,7 +25242,7 @@ var TestSuite;
25241
25242
  TestSuite["JAMDUNA"] = "jamduna";
25242
25243
  })(TestSuite || (TestSuite = {}));
25243
25244
  const DEFAULT_SUITE = TestSuite.W3F_DAVXY;
25244
- const ALL_VERSIONS_IN_ORDER = [compatibility_GpVersion.V0_6_7, compatibility_GpVersion.V0_7_0, compatibility_GpVersion.V0_7_1];
25245
+ const ALL_VERSIONS_IN_ORDER = [compatibility_GpVersion.V0_6_7, compatibility_GpVersion.V0_7_0, compatibility_GpVersion.V0_7_1, compatibility_GpVersion.V0_7_2];
25245
25246
  const env = typeof process === "undefined" ? {} : process.env;
25246
25247
  const DEFAULT_VERSION = compatibility_GpVersion.V0_7_0;
25247
25248
  let CURRENT_VERSION = parseCurrentVersion(env.GP_VERSION) ?? DEFAULT_VERSION;
@@ -25250,20 +25251,26 @@ function parseCurrentVersion(env) {
25250
25251
  if (env === undefined) {
25251
25252
  return undefined;
25252
25253
  }
25253
- const version = env;
25254
- if (!Object.values(compatibility_GpVersion).includes(version)) {
25255
- throw new Error(`Configured environment variable GP_VERSION is unknown: '${env}'. Use one of: ${ALL_VERSIONS_IN_ORDER}`);
25254
+ switch (env) {
25255
+ case compatibility_GpVersion.V0_6_7:
25256
+ case compatibility_GpVersion.V0_7_0:
25257
+ case compatibility_GpVersion.V0_7_1:
25258
+ case compatibility_GpVersion.V0_7_2:
25259
+ return env;
25260
+ default:
25261
+ throw new Error(`Configured environment variable GP_VERSION is unknown: '${env}'. Use one of: ${ALL_VERSIONS_IN_ORDER}`);
25256
25262
  }
25257
- return version;
25258
25263
  }
25259
25264
  function parseCurrentSuite(env) {
25260
25265
  if (env === undefined)
25261
25266
  return undefined;
25262
- const val = env;
25263
- if (!Object.values(TestSuite).includes(val)) {
25264
- throw new Error(`Configured environment variable TEST_SUITE is unknown: '${env}'. Use one of: ${Object.values(TestSuite)}`);
25267
+ switch (env) {
25268
+ case TestSuite.W3F_DAVXY:
25269
+ case TestSuite.JAMDUNA:
25270
+ return env;
25271
+ default:
25272
+ throw new Error(`Configured environment variable TEST_SUITE is unknown: '${env}'. Use one of: ${Object.values(TestSuite)}`);
25265
25273
  }
25266
- return val;
25267
25274
  }
25268
25275
  class compatibility_Compatibility {
25269
25276
  static override(version) {
@@ -32170,8 +32177,8 @@ function print(level, levelAndName, strings, data) {
32170
32177
  return;
32171
32178
  }
32172
32179
  const lvlText = Level[level].padEnd(5);
32173
- const val = strings.map((v, idx) => `${v}${data[idx]}`);
32174
- const msg = `${lvlText} [${levelAndName[1]}] ${val}`;
32180
+ const val = strings.map((v, idx) => `${v}${idx < data.length ? data[idx] : ""}`);
32181
+ const msg = `${lvlText} [${levelAndName[1]}] ${val.join("")}`;
32175
32182
  if (level === Level.WARN) {
32176
32183
  console.warn(msg);
32177
32184
  }