Skip to content

Commit

Permalink
Update build
Browse files Browse the repository at this point in the history
  • Loading branch information
fasttime committed Jul 6, 2024
1 parent 019f45f commit 5243dde
Show file tree
Hide file tree
Showing 15 changed files with 53 additions and 23 deletions.
7 changes: 6 additions & 1 deletion .github/workflows/JScrewIt.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
name: JScrewIt Node.js CI

on: [push, pull_request]
on:
push:
branches: '**'
tags-ignore: '**'
pull_request:
branches: '**'

jobs:

Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/~feature-hub.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
name: ~feature-hub Node.js CI

on: [push, pull_request]
on:
push:
branches: '**'
tags-ignore: '**'
pull_request:
branches: '**'

defaults:

Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/~result-format.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
name: ~result-format Node.js CI

on: [push, pull_request]
on:
push:
branches: '**'
tags-ignore: '**'
pull_request:
branches: '**'

defaults:

Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/~solution.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
name: ~solution Node.js CI

on: [push, pull_request]
on:
push:
branches: '**'
tags-ignore: '**'
pull_request:
branches: '**'

defaults:

Expand Down
8 changes: 4 additions & 4 deletions api-doc/interfaces/FeatureConstructor.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,6 @@ If no arguments are specified, the new feature object will be equivalent to

[`CustomFeature`](CustomFeature.md)

#### Inherited from

`FeatureAll.constructor`

#### Example

The following statements are equivalent, and will all construct a new feature object
Expand All @@ -92,6 +88,10 @@ JScrewIt.Feature([JScrewIt.Feature.ANY_DOCUMENT, JScrewIt.Feature.ANY_WINDOW]);

An error is thrown if any of the specified features are not mutually compatible.

#### Inherited from

`FeatureAll.constructor`

## Properties

### ALL
Expand Down
2 changes: 1 addition & 1 deletion api-doc/type-aliases/ElementaryFeatureName.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

***

# Type alias: ElementaryFeatureName
# Type Alias: ElementaryFeatureName

> **ElementaryFeatureName**: `"ANY_DOCUMENT"` \| `"ANY_WINDOW"` \| `"ARRAY_ITERATOR"` \| `"ARROW"` \| `"AT"` \| `"ATOB"` \| `"BARPROP"` \| `"CAPITAL_HTML"` \| `"CONSOLE"` \| `"DOCUMENT"` \| `"DOMWINDOW"` \| `"ESC_HTML_ALL"` \| `"ESC_HTML_QUOT"` \| `"ESC_HTML_QUOT_ONLY"` \| `"ESC_REGEXP_LF"` \| `"ESC_REGEXP_SLASH"` \| `"FF_SRC"` \| `"FILL"` \| `"FLAT"` \| `"FROM_CODE_POINT"` \| `"FUNCTION_19_LF"` \| `"FUNCTION_22_LF"` \| `"GENERIC_ARRAY_TO_STRING"` \| `"GLOBAL_UNDEFINED"` \| `"GMT"` \| `"HISTORY"` \| `"HTMLAUDIOELEMENT"` \| `"HTMLDOCUMENT"` \| `"IE_SRC"` \| `"INCR_CHAR"` \| `"INTL"` \| `"LOCALE_INFINITY"` \| `"LOCALE_NUMERALS"` \| `"LOCALE_NUMERALS_EXT"` \| `"LOCATION"` \| `"NAME"` \| `"NODECONSTRUCTOR"` \| `"NO_FF_SRC"` \| `"NO_IE_SRC"` \| `"NO_OLD_SAFARI_ARRAY_ITERATOR"` \| `"NO_V8_SRC"` \| `"OBJECT_ARRAY_ENTRIES_CTOR"` \| `"OBJECT_L_LOCATION_CTOR"` \| `"OBJECT_UNDEFINED"` \| `"OBJECT_W_CTOR"` \| `"OLD_SAFARI_LOCATION_CTOR"` \| `"PLAIN_INTL"` \| `"REGEXP_STRING_ITERATOR"` \| `"SELF_OBJ"` \| `"SHORT_LOCALES"` \| `"STATUS"` \| `"UNDEFINED"` \| `"V8_SRC"` \| `"WINDOW"`

Expand Down
2 changes: 1 addition & 1 deletion api-doc/type-aliases/FeatureElement.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

***

# Type alias: FeatureElement
# Type Alias: FeatureElement

> **FeatureElement**: [`Feature`](../interfaces/Feature.md) \| keyof [`FeatureAll`](../interfaces/FeatureAll.md)
Expand Down
2 changes: 1 addition & 1 deletion api-doc/type-aliases/FeatureElementOrCompatibleArray.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

***

# Type alias: FeatureElementOrCompatibleArray
# Type Alias: FeatureElementOrCompatibleArray

> **FeatureElementOrCompatibleArray**: [`FeatureElement`](FeatureElement.md) \| readonly [`FeatureElement`](FeatureElement.md)[]
Expand Down
2 changes: 1 addition & 1 deletion api-doc/type-aliases/PredefinedFeatureName.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

***

# Type alias: PredefinedFeatureName
# Type Alias: PredefinedFeatureName

> **PredefinedFeatureName**: [`ElementaryFeatureName`](ElementaryFeatureName.md) \| `"ANDRO_4_0"` \| `"ANDRO_4_1"` \| `"ANDRO_4_4"` \| `"AUTO"` \| `"BROWSER"` \| `"CHROME_122"` \| `"COMPACT"` \| `"DEFAULT"` \| `"FF_90"` \| `"IE_10"` \| `"IE_11"` \| `"IE_11_WIN_10"` \| `"IE_9"` \| `"NODE_0_10"` \| `"NODE_0_12"` \| `"NODE_10"` \| `"NODE_11"` \| `"NODE_12"` \| `"NODE_13"` \| `"NODE_15"` \| `"NODE_16_0"` \| `"NODE_16_6"` \| `"NODE_22"` \| `"NODE_4"` \| `"NODE_5"` \| `"SAFARI_10"` \| `"SAFARI_12"` \| `"SAFARI_13"` \| `"SAFARI_14_0_1"` \| `"SAFARI_14_1"` \| `"SAFARI_15_4"` \| `"SAFARI_17_4"` \| `"SAFARI_7_0"` \| `"SAFARI_7_1"` \| `"SAFARI_9"`
Expand Down
2 changes: 1 addition & 1 deletion api-doc/type-aliases/RunAs.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

***

# Type alias: RunAs
# Type Alias: RunAs

> **RunAs**: `"call"` \| `"eval"` \| `"express"` \| `"express-call"` \| `"express-eval"` \| `"none"`
Expand Down
12 changes: 8 additions & 4 deletions packages/~feature-hub/src/feature.ts
Original file line number Diff line number Diff line change
Expand Up @@ -367,13 +367,11 @@ FeatureConstructor
let utilInspect: typeof util.inspect | undefined;
try
{
/* eslint-disable
@typescript-eslint/no-require-imports, @typescript-eslint/no-var-requires */
/* eslint-disable @typescript-eslint/no-require-imports */

utilInspect = (require('util') as typeof util).inspect;

/* eslint-enable
@typescript-eslint/no-require-imports, @typescript-eslint/no-var-requires */
/* eslint-enable @typescript-eslint/no-require-imports */
}
catch
{ }
Expand Down Expand Up @@ -484,9 +482,15 @@ FeatureConstructor
{
const info = featureInfos[name];
const getInfoStringField =

/* eslint-disable @typescript-eslint/no-unnecessary-type-parameters */

<FieldNameType extends string>(fieldName: FieldNameType): string | undefined =>
fieldName in info ?
esToString((info as { [Name in FieldNameType]: unknown; })[fieldName]) : undefined;

/* eslint-enable @typescript-eslint/no-unnecessary-type-parameters */

let description = getInfoStringField('description');
let featureObj: PredefinedFeature;
if ('aliasFor' in info)
Expand Down
4 changes: 2 additions & 2 deletions packages/~feature-hub/test/spec/feature.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ from '../../src/mask';
import assert from 'assert';
import type util from 'util';

/* eslint-disable @typescript-eslint/no-require-imports, @typescript-eslint/no-var-requires */
/* eslint-disable @typescript-eslint/no-require-imports */

const getNodeUtil = (): typeof util => require('util') as typeof util;

/* eslint-enable @typescript-eslint/no-require-imports, @typescript-eslint/no-var-requires */
/* eslint-enable @typescript-eslint/no-require-imports */

const noop =
(): void =>
Expand Down
3 changes: 2 additions & 1 deletion packages/~feature-hub/test/spec/mask.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ from '../../src/mask';
import assert, { AssertionError } from 'assert';

function assertFail
(message: string, stackStartFn: Function, actual?: unknown, expected?: unknown): never
(message: string, stackStartFn: (...args: never) => unknown, actual?: unknown, expected?: unknown):
never
{
const options = { message, actual, expected, stackStartFn, stackStartFunction: stackStartFn };
const error = new AssertionError(options);
Expand Down
4 changes: 2 additions & 2 deletions packages/~solution/src/eval.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ export function evalExpr(expr: string): unknown

export function tryEvalExpr(expr: string): unknown
{
let fn: Function;
let fn: () => unknown;
try
{
fn = Function(`return(${expr});`);
fn = Function(`return(${expr});`) as () => unknown;
}
catch
{
Expand Down
7 changes: 6 additions & 1 deletion src/package.yml.hbs
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
name: {{package}} Node.js CI

on: [push, pull_request]
on:
push:
branches: '**'
tags-ignore: '**'
pull_request:
branches: '**'

defaults:

Expand Down

0 comments on commit 5243dde

Please sign in to comment.