chore: TypeScript 5.8, nx migrate, dep updates - bundler resolution

This commit is contained in:
Nathan Walker
2025-07-05 10:48:10 -07:00
parent 32f2dd14e1
commit 48b02ffd1f
23 changed files with 2733 additions and 1396 deletions

2
.gitignore vendored
View File

@ -60,3 +60,5 @@ ios-typings-prj
.nx/workspace-data
vite.config.*.timestamp*
vitest.config.*.timestamp*
.cursor/rules/nx-rules.mdc
.github/instructions/nx.instructions.md

View File

@ -11,12 +11,12 @@
"nativescript-theme-core": "file:../../node_modules/nativescript-theme-core"
},
"devDependencies": {
"@nativescript/android": "~8.8.0",
"@nativescript/ios": "~8.8.0",
"@nativescript/visionos": "~8.8.0",
"@nativescript/android": "~8.9.0",
"@nativescript/ios": "~8.9.0",
"@nativescript/visionos": "~8.9.0",
"@nativescript/webpack": "file:../../dist/packages/webpack5",
"circular-dependency-plugin": "^5.2.2",
"typescript": "~5.6.0"
"typescript": "~5.8.0"
},
"gitHead": "c06800e52ee1a184ea2dffd12a6702aaa43be4e3",
"readme": "NativeScript Application"

View File

@ -12,10 +12,10 @@
"nativescript-theme-core": "file:../../node_modules/nativescript-theme-core"
},
"devDependencies": {
"@nativescript/android": "~8.8.0",
"@nativescript/ios": "~8.8.0",
"@nativescript/visionos": "~8.8.0",
"@nativescript/android": "~8.9.0",
"@nativescript/ios": "~8.9.0",
"@nativescript/visionos": "~8.9.0",
"@nativescript/webpack": "file:../../dist/packages/webpack5",
"typescript": "~5.6.0"
"typescript": "~5.8.0"
}
}

View File

@ -11,11 +11,11 @@
"nativescript-theme-core": "file:../../node_modules/nativescript-theme-core"
},
"devDependencies": {
"@nativescript/android": "~8.8.0",
"@nativescript/ios": "~8.8.0",
"@nativescript/visionos": "~8.8.0",
"@nativescript/android": "~8.9.0",
"@nativescript/ios": "~8.9.0",
"@nativescript/visionos": "~8.9.0",
"@nativescript/webpack": "file:../../dist/packages/webpack5",
"typescript": "~5.6.0"
"typescript": "~5.8.0"
},
"gitHead": "8ab7726d1ee9991706069c1359c552e67ee0d1a4",
"readme": "NativeScript Application",

View File

@ -1,7 +1,14 @@
{
"migrations": [
{ "version": "20.0.0-beta.7", "description": "Migration for v20.0.0-beta.7", "implementation": "./src/migrations/update-20-0-0/move-use-daemon-process", "package": "nx", "name": "move-use-daemon-process" },
{ "version": "20.0.1", "description": "Set `useLegacyCache` to true for migrating workspaces", "implementation": "./src/migrations/update-20-0-1/use-legacy-cache", "x-repair-skip": true, "package": "nx", "name": "use-legacy-cache" },
{ "cli": "nx", "version": "20.0.0-beta.5", "description": "replace getJestProjects with getJestProjectsAsync", "implementation": "./src/migrations/update-20-0-0/replace-getJestProjects-with-getJestProjectsAsync", "package": "@nx/jest", "name": "replace-getJestProjects-with-getJestProjectsAsync" }
{ "version": "21.0.0-beta.8", "description": "Removes the legacy cache configuration from nx.json", "implementation": "./src/migrations/update-21-0-0/remove-legacy-cache", "package": "nx", "name": "remove-legacy-cache" },
{ "version": "21.0.0-beta.8", "description": "Removes the legacy cache configuration from nx.json", "implementation": "./src/migrations/update-21-0-0/remove-custom-tasks-runner", "package": "nx", "name": "remove-custom-tasks-runner" },
{ "version": "21.0.0-beta.11", "description": "Updates release version config based on the breaking changes in Nx v21", "implementation": "./src/migrations/update-21-0-0/release-version-config-changes", "package": "nx", "name": "release-version-config-changes" },
{ "version": "21.0.0-beta.11", "description": "Updates release changelog config based on the breaking changes in Nx v21", "implementation": "./src/migrations/update-21-0-0/release-changelog-config-changes", "package": "nx", "name": "release-changelog-config-changes" },
{ "version": "21.1.0-beta.2", "description": "Adds **/nx-rules.mdc and **/nx.instructions.md to .gitignore if not present", "implementation": "./src/migrations/update-21-1-0/add-gitignore-entry", "package": "nx", "name": "21-1-0-add-ignore-entries-for-nx-rule-files" },
{ "version": "20.5.0-beta.2", "description": "Install jiti as a devDependency to allow vite to parse TS postcss files.", "implementation": "./src/migrations/update-20-5-0/install-jiti", "package": "@nx/vite", "name": "update-20-5-0-install-jiti" },
{ "version": "20.5.0-beta.3", "description": "Update resolve.conditions to include defaults that are no longer provided by Vite.", "implementation": "./src/migrations/update-20-5-0/update-resolve-conditions", "package": "@nx/vite", "name": "update-20-5-0-update-resolve-conditions" },
{ "version": "20.5.0-beta.3", "description": "Add vite config temporary files to the ESLint configuration ignore patterns if ESLint is used.", "implementation": "./src/migrations/update-20-5-0/eslint-ignore-vite-temp-files", "package": "@nx/vite", "name": "eslint-ignore-vite-temp-files" },
{ "cli": "nx", "version": "21.0.0-beta.9", "description": "Replace usage of `getJestProjects` with `getJestProjectsAsync`.", "implementation": "./src/migrations/update-21-0-0/replace-getJestProjects-with-getJestProjectsAsync", "package": "@nx/jest", "name": "replace-getJestProjects-with-getJestProjectsAsync-v21" },
{ "version": "21.0.0-beta.10", "description": "Remove the previously deprecated and unused `tsConfig` option from the `@nx/jest:jest` executor.", "implementation": "./src/migrations/update-21-0-0/remove-tsconfig-option-from-jest-executor", "package": "@nx/jest", "name": "remove-tsconfig-option-from-jest-executor" }
]
}

49
nx.json
View File

@ -69,37 +69,17 @@
},
"$schema": "./node_modules/nx/schemas/nx-schema.json",
"namedInputs": {
"default": [
"{projectRoot}/**/*",
"sharedGlobals"
],
"sharedGlobals": [
"{workspaceRoot}/workspace.json",
"{workspaceRoot}/tsconfig.json",
"{workspaceRoot}/nx.json"
],
"production": [
"default",
"!{projectRoot}/**/?(*.)+(spec|test).[jt]s?(x)?(.snap)",
"!{projectRoot}/tsconfig.spec.json",
"!{projectRoot}/jest.config.[jt]s",
"!{projectRoot}/src/test-setup.[jt]s"
]
"default": ["{projectRoot}/**/*", "sharedGlobals"],
"sharedGlobals": ["{workspaceRoot}/workspace.json", "{workspaceRoot}/tsconfig.json", "{workspaceRoot}/nx.json"],
"production": ["default", "!{projectRoot}/**/?(*.)+(spec|test).[jt]s?(x)?(.snap)", "!{projectRoot}/tsconfig.spec.json", "!{projectRoot}/jest.config.[jt]s", "!{projectRoot}/src/test-setup.[jt]s"]
},
"targetDefaults": {
"build": {
"inputs": [
"production",
"^production"
],
"inputs": ["production", "^production"],
"cache": true
},
"test": {
"inputs": [
"default",
"^production",
"{workspaceRoot}/jest.preset.js"
],
"inputs": ["default", "^production", "{workspaceRoot}/jest.preset.js"],
"cache": true
},
"lint": {
@ -115,11 +95,7 @@
"cache": true
},
"@nx/jest:jest": {
"inputs": [
"default",
"^production",
"{workspaceRoot}/jest.preset.js"
],
"inputs": ["default", "^production", "{workspaceRoot}/jest.preset.js"],
"cache": true,
"options": {
"passWithNoTests": true
@ -133,25 +109,16 @@
},
"@nx/vite:test": {
"cache": true,
"inputs": [
"default",
"^production"
]
"inputs": ["default", "^production"]
}
},
"useDaemonProcess": false,
"parallel": 1,
"useInferencePlugins": false,
"defaultBase": "master",
"useLegacyCache": true,
"release": {
"releaseTagPattern": "{version}-{projectName}",
"projects": [
"packages/*",
"!packages/ui-mobile-base",
"!packages/types-minimal",
"!packages/winter-tc"
],
"projects": ["packages/*", "!packages/ui-mobile-base", "!packages/types-minimal", "!packages/winter-tc"],
"projectsRelationship": "independent",
"changelog": {
"workspaceChangelog": false,

3683
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -25,80 +25,81 @@
"@csstools/css-parser-algorithms": "^3.0.4",
"@csstools/css-tokenizer": "^3.0.3",
"@nativescript/hook": "^2.0.0",
"@nativescript/nx": "^20.0.0",
"@nativescript/nx": "^21.0.0",
"@nstudio/focus": "^20.0.2",
"@nstudio/nps-i": "~2.0.0",
"@nx/devkit": "20.3.0",
"@nx/eslint-plugin": "20.3.0",
"@nx/jest": "20.3.0",
"@nx/js": "20.3.0",
"@nx/node": "20.3.0",
"@nx/plugin": "20.3.0",
"@nx/vite": "20.3.0",
"@nx/web": "20.3.0",
"@nx/workspace": "20.3.0",
"@nx/devkit": "21.2.1",
"@nx/eslint-plugin": "21.2.1",
"@nx/jest": "21.2.1",
"@nx/js": "21.2.1",
"@nx/node": "21.2.1",
"@nx/plugin": "21.2.1",
"@nx/vite": "21.2.1",
"@nx/web": "21.2.1",
"@nx/workspace": "21.2.1",
"@prettier/plugin-xml": "^3.4.1",
"@swc-node/register": "~1.9.1",
"@swc/core": "~1.5.7",
"@swc/helpers": "~0.5.11",
"@swc-node/register": "~1.10.1",
"@swc/core": "~1.12.7",
"@swc/helpers": "~0.5.17",
"@types/jest": "~29.5.0",
"@types/node": "^20.0.0",
"@typescript-eslint/eslint-plugin": "^8.6.0",
"@typescript-eslint/parser": "^8.6.0",
"@vitest/coverage-v8": "^1.0.4",
"@vitest/ui": "^1.3.1",
"@typescript-eslint/eslint-plugin": "^8.35.0",
"@typescript-eslint/parser": "^8.35.0",
"@vitest/coverage-v8": "^2.0.0",
"@vitest/ui": "^2.0.0",
"acorn": "^8.15.0",
"acorn-stage3": "^4.0.0",
"acorn": "^8.7.0",
"copy-webpack-plugin": "^9.0.0",
"copy-webpack-plugin": "^13.0.0",
"copyfiles": "^2.4.0",
"css": "^3.0.0",
"css-tree": "^1.1.2",
"css-what": "^6.1.0",
"dotenv-webpack": "^7.0.0",
"dotenv": "~16.4.0",
"dotenv-webpack": "^7.0.0",
"emoji-regex": "^10.3.0",
"enhanced-resolve": "^5.8.3",
"eslint": "~8.57.0",
"eslint-config-prettier": "~9.1.0",
"eslint-config-prettier": "^10.0.0",
"fork-ts-checker-webpack-plugin": "^7.0.0",
"gonzales": "^1.0.7",
"husky": "^9.0.0",
"jest": "~29.7.0",
"jest-environment-jsdom": "~29.7.0",
"jiti": "2.4.2",
"jsdom": "~22.1.0",
"lint-staged": "^15.2.0",
"loader-utils": "^2.0.0 || ^3.0.0",
"module-alias": "^2.2.2",
"nativescript": "~8.9.0",
"nativescript-typedoc-theme": "1.1.0",
"nx": "20.3.0",
"nx": "21.2.1",
"parse-css": "git+https://github.com/tabatkins/parse-css.git",
"parserlib": "^1.1.1",
"postcss": "^8.0.0",
"postcss-import": "^14.0.0",
"postcss-loader": "^7.0.0",
"postcss-import": "^16.0.0",
"postcss-loader": "^8.0.0",
"prettier": "^3.2.5",
"sass": "^1.72.0",
"shady-css-parser": "^0.1.0",
"terser-webpack-plugin": "^5.0.0",
"tree-kill": "^1.2.2",
"ts-dedent": "^2.2.0",
"ts-jest": "29.2.5",
"ts-jest": "29.4.0",
"ts-loader": "^9.0.0",
"ts-node": "10.9.2",
"ts-patch": "^3.0.0",
"tslib": "^2.6.0",
"typedoc": "^0.27.6",
"typescript": "~5.6.0",
"vite": "^5.0.0",
"vitest": "^1.3.1",
"typedoc": "^0.28.6",
"typescript": "5.8.3",
"vite": "^6.0.0",
"vitest": "^2.0.0",
"vue-loader": "^15.0.0 <= 15.9.8",
"webpack": "^5.30.0 <= 5.50.0 || ^5.51.2",
"webpack-bundle-analyzer": "^4.0.0",
"webpack-chain": "^6.0.0",
"webpack-cli": "^4.0.0",
"webpack-merge": "^5.0.0",
"webpack-virtual-modules": "^0.4.0",
"webpack": "^5.30.0 <= 5.50.0 || ^5.51.2",
"zx": "^8.3.0"
},
"lint-staged": {

View File

@ -1,7 +1,7 @@
{
"extends": "../../.eslintrc.json",
"rules": {},
"ignorePatterns": ["!**/*", "**/global-types.d.ts", "**/node_modules/**/*", "**/__tests__/**/*"],
"ignorePatterns": ["!**/*", "**/global-types.d.ts", "**/node_modules/**/*", "**/__tests__/**/*", "**/vite.config.*.timestamp*", "**/vitest.config.*.timestamp*"],
"overrides": [
{
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"],

View File

@ -25,7 +25,7 @@ export interface HttpRequestOptions {
/**
* Gets or sets the request body.
*/
content?: string | FormData | ArrayBuffer;
content?: string | FormData | ArrayBuffer | Uint8Array<ArrayBufferLike>;
/**
* Gets or sets the request timeout in milliseconds.
@ -110,7 +110,7 @@ export function getString(arg: any): Promise<string> {
reject(e);
}
},
(e) => reject(e)
(e) => reject(e),
);
});
}
@ -126,7 +126,7 @@ export function getJSON<T>(arg: any): Promise<T> {
reject(e);
}
},
(e) => reject(e)
(e) => reject(e),
);
});
}
@ -143,7 +143,7 @@ export function getImage(arg: any): Promise<ImageSource> {
},
(err) => {
reject(err);
}
},
);
});
}
@ -159,7 +159,7 @@ export function getFile(arg: any, destinationFilePath?: string): Promise<any> {
reject(e);
}
},
(e) => reject(e)
(e) => reject(e),
);
});
}
@ -175,7 +175,7 @@ export function getBinary(arg: any): Promise<ArrayBuffer> {
reject(e);
}
},
(e) => reject(e)
(e) => reject(e),
);
});
}

View File

@ -110,8 +110,7 @@ function countersProfileFunctionFactory<F extends Function>(fn: F, name: string,
}
function timelineProfileFunctionFactory<F extends Function>(fn: F, name: string, type: MemberType = MemberType.Instance): F {
return type === MemberType.Instance
? <any>function () {
return type === MemberType.Instance ? <any>function () {
const start = time();
try {
return fn.apply(this, arguments);
@ -119,8 +118,7 @@ function timelineProfileFunctionFactory<F extends Function>(fn: F, name: string,
const end = time();
console.log(`Timeline: Modules: ${name} ${this} (${start}ms. - ${end}ms.)`);
}
}
: function () {
} : <any>function () {
const start = time();
try {
return fn.apply(this, arguments);

View File

@ -196,7 +196,7 @@ export class Property<T extends ViewBase, U> implements TypedPropertyDescriptor<
public readonly key: symbol;
public readonly getDefault: symbol;
public readonly setNative: symbol;
public readonly setNative: any;
public readonly defaultValueKey: symbol;
public readonly defaultValue: U;
@ -397,7 +397,7 @@ export class CoercibleProperty<T extends ViewBase, U> extends Property<T, U> imp
const propertyName = options.name;
const key = this.key;
const getDefault: symbol = this.getDefault;
const setNative: symbol = this.setNative;
const setNative: any = this.setNative;
const defaultValueKey = this.defaultValueKey;
const defaultValue: U = this.defaultValue;
@ -598,7 +598,7 @@ export class InheritedProperty<T extends ViewBase, U> extends Property<T, U> imp
}
}
export class CssProperty<T extends Style, U> implements CssProperty<T, U> {
export class CssProperty<T extends Style, U> {
private registered: boolean;
public readonly name: string;
@ -612,7 +612,7 @@ export class CssProperty<T extends Style, U> implements CssProperty<T, U> {
public readonly key: symbol;
public readonly getDefault: symbol;
public readonly setNative: symbol;
public readonly setNative: any;
public readonly sourceKey: symbol;
public readonly defaultValueKey: symbol;
public readonly defaultValue: U;
@ -879,7 +879,7 @@ export class CssAnimationProperty<T extends Style, U> implements CssAnimationPro
public readonly cssLocalName: string;
public readonly getDefault: symbol;
public readonly setNative: symbol;
public readonly setNative: any;
public readonly register: (cls: { prototype }) => void;

View File

@ -833,6 +833,7 @@ export class View extends ViewCommon {
this.setAccessibilityIdentifier(this.nativeViewProtected, value);
}
// @ts-expect-error
[accessibilityRoleProperty.setNative](value: AccessibilityRole): void {
this.accessibilityRole = value;
updateAccessibilityProperties(this);
@ -865,6 +866,7 @@ export class View extends ViewCommon {
}
}
// @ts-expect-error
[accessibilityLiveRegionProperty.setNative](value: AccessibilityLiveRegion): void {
switch (value) {
case AccessibilityLiveRegion.Assertive: {
@ -882,6 +884,7 @@ export class View extends ViewCommon {
}
}
// @ts-expect-error
[accessibilityStateProperty.setNative](value: AccessibilityState): void {
this.accessibilityState = value;
updateAccessibilityProperties(this);
@ -974,6 +977,7 @@ export class View extends ViewCommon {
[horizontalAlignmentProperty.getDefault](): CoreTypes.HorizontalAlignmentType {
return <CoreTypes.HorizontalAlignmentType>org.nativescript.widgets.ViewHelper.getHorizontalAlignment(this.nativeViewProtected);
}
// @ts-expect-error
[horizontalAlignmentProperty.setNative](value: CoreTypes.HorizontalAlignmentType) {
const nativeView = this.nativeViewProtected;
const lp: any = nativeView.getLayoutParams() || new org.nativescript.widgets.CommonLayoutParams();
@ -1014,6 +1018,7 @@ export class View extends ViewCommon {
[verticalAlignmentProperty.getDefault](): CoreTypes.VerticalAlignmentType {
return <CoreTypes.VerticalAlignmentType>org.nativescript.widgets.ViewHelper.getVerticalAlignment(this.nativeViewProtected);
}
// @ts-expect-error
[verticalAlignmentProperty.setNative](value: CoreTypes.VerticalAlignmentType) {
const nativeView = this.nativeViewProtected;
const lp: any = nativeView.getLayoutParams() || new org.nativescript.widgets.CommonLayoutParams();

View File

@ -219,6 +219,7 @@ export class Image extends ImageBase {
}
}
// @ts-expect-error
[iosSymbolScaleProperty.setNative](value: iosSymbolScaleType) {
// reset src to configure scale
this._setSrc(this.src);

View File

@ -234,6 +234,7 @@ export class SearchBar extends SearchBarBase {
[textProperty.getDefault](): string {
return '';
}
// @ts-expect-error
[textProperty.setNative](value: string) {
const text = value === null || value === undefined ? '' : value.toString();
this.nativeViewProtected.setQuery(text, false);
@ -241,6 +242,7 @@ export class SearchBar extends SearchBarBase {
[hintProperty.getDefault](): string {
return null;
}
// @ts-expect-error
[hintProperty.setNative](value: string) {
if (value === null || value === undefined) {
this.nativeViewProtected.setQueryHint(null);

View File

@ -3,12 +3,10 @@ import { SearchBarBase, textProperty, hintProperty, textFieldHintColorProperty,
import { isEnabledProperty } from '../core/view';
import { Color } from '../../color';
import { colorProperty, backgroundColorProperty, backgroundInternalProperty, fontInternalProperty } from '../styling/style-properties';
import { iOSNativeHelper } from '../../utils';
import { SDK_VERSION } from '../../utils/constants';
export * from './search-bar-common';
const majorVersion = iOSNativeHelper.MajorVersion;
@NativeClass
class UISearchBarDelegateImpl extends NSObject implements UISearchBarDelegate {
public static ObjCProtocols = [UISearchBarDelegate];
@ -62,7 +60,7 @@ class UISearchBarImpl extends UISearchBar {
sizeThatFits(size: CGSize): CGSize {
// iOS11 SDK does not support passing sizeThatFits(...) non-finite width value;
// iOS layout system will take care to size the element properly when passed 0
if (majorVersion >= 11 && size.width === Number.POSITIVE_INFINITY) {
if (SDK_VERSION >= 11 && size.width === Number.POSITIVE_INFINITY) {
size.width = 0;
}
@ -167,6 +165,7 @@ export class SearchBar extends SearchBarBase {
[textProperty.getDefault](): string {
return '';
}
// @ts-expect-error
[textProperty.setNative](value: string) {
const text = value === null || value === undefined ? '' : value.toString();
this.ios.text = text;
@ -175,6 +174,7 @@ export class SearchBar extends SearchBarBase {
[hintProperty.getDefault](): string {
return '';
}
// @ts-expect-error
[hintProperty.setNative](value: string) {
this._updateAttributedPlaceholder();
}

View File

@ -1,4 +1,3 @@
import { Style as StyleDefinition } from '.';
import { Color } from '../../../color';
import { Font, FontStyleType, FontWeightType, FontVariationSettingsType } from '../font';
import { Background } from '../background';
@ -35,7 +34,7 @@ export interface CommonLayoutParams {
verticalAlignment: CoreTypes.VerticalAlignmentType;
}
export class Style extends Observable implements StyleDefinition {
export class Style extends Observable {
private unscopedCssVariables = new Map<string, string>();
private scopedCssVariables = new Map<string, string>();

View File

@ -458,6 +458,7 @@ export class TextBase extends TextBaseCommon {
[paddingTopProperty.getDefault](): CoreTypes.LengthType {
return { value: this._defaultPaddingTop, unit: 'px' };
}
// @ts-expect-error
[paddingTopProperty.setNative](value: CoreTypes.LengthType) {
org.nativescript.widgets.ViewHelper.setPaddingTop(this.nativeTextViewProtected, Length.toDevicePixels(value, 0) + Length.toDevicePixels(this.style.borderTopWidth, 0));
}
@ -465,6 +466,7 @@ export class TextBase extends TextBaseCommon {
[paddingRightProperty.getDefault](): CoreTypes.LengthType {
return { value: this._defaultPaddingRight, unit: 'px' };
}
// @ts-expect-error
[paddingRightProperty.setNative](value: CoreTypes.LengthType) {
org.nativescript.widgets.ViewHelper.setPaddingRight(this.nativeTextViewProtected, Length.toDevicePixels(value, 0) + Length.toDevicePixels(this.style.borderRightWidth, 0));
}
@ -472,6 +474,7 @@ export class TextBase extends TextBaseCommon {
[paddingBottomProperty.getDefault](): CoreTypes.LengthType {
return { value: this._defaultPaddingBottom, unit: 'px' };
}
// @ts-expect-error
[paddingBottomProperty.setNative](value: CoreTypes.LengthType) {
org.nativescript.widgets.ViewHelper.setPaddingBottom(this.nativeTextViewProtected, Length.toDevicePixels(value, 0) + Length.toDevicePixels(this.style.borderBottomWidth, 0));
}
@ -479,6 +482,7 @@ export class TextBase extends TextBaseCommon {
[paddingLeftProperty.getDefault](): CoreTypes.LengthType {
return { value: this._defaultPaddingLeft, unit: 'px' };
}
// @ts-expect-error
[paddingLeftProperty.setNative](value: CoreTypes.LengthType) {
org.nativescript.widgets.ViewHelper.setPaddingLeft(this.nativeTextViewProtected, Length.toDevicePixels(value, 0) + Length.toDevicePixels(this.style.borderLeftWidth, 0));
}

View File

@ -432,7 +432,7 @@ export class Blob {
}
}
public arrayBuffer(): Promise<ArrayBuffer> {
public arrayBuffer() {
return Promise.resolve(this._buffer);
}
@ -497,7 +497,7 @@ export class FileReader {
public onprogress: (...args: any[]) => void;
private _readyState: number;
private _result: string | ArrayBuffer | null;
private _result: string | ArrayBuffer | SharedArrayBuffer | null;
private _listeners: Map<string, Array<Function>> = new Map<string, Array<Function>>();
@ -505,7 +505,7 @@ export class FileReader {
return this._readyState;
}
public get result(): string | ArrayBuffer | null {
public get result(): string | ArrayBuffer | SharedArrayBuffer | null {
return this._result;
}

View File

@ -4,7 +4,7 @@
"baseUrl": ".",
"target": "ES2020",
"module": "esnext",
"moduleResolution": "node",
"moduleResolution": "bundler",
"outDir": "./dist",
"declaration": true,
"emitDecoratorMetadata": true,

View File

@ -17,58 +17,58 @@
},
"dependencies": {
"@babel/core": "^7.0.0",
"@pmmmwh/react-refresh-webpack-plugin": "~0.5.7",
"@pmmmwh/react-refresh-webpack-plugin": "~0.6.1",
"acorn": "^8.0.0",
"acorn-stage3": "^4.0.0",
"ansi-colors": "^4.1.3",
"babel-loader": "^8.0.0",
"babel-loader": "^10.0.0",
"cli-highlight": "^2.0.0",
"commander": "^8.0.0",
"copy-webpack-plugin": "^9.0.0",
"commander": "^14.0.0",
"copy-webpack-plugin": "^13.0.0",
"css": "^3.0.0",
"css-loader": "^6.0.0",
"dotenv-webpack": "^7.0.0",
"fork-ts-checker-webpack-plugin": "^7.0.0",
"css-loader": "^7.0.0",
"dotenv-webpack": "^8.0.0",
"fork-ts-checker-webpack-plugin": "^9.0.0",
"loader-utils": "^2.0.0 || ^3.0.0",
"lodash.get": "^4.0.0",
"micromatch": "^4.0.0",
"postcss": "^8.0.0",
"postcss-import": "^14.0.0",
"postcss-loader": "^7.0.0",
"postcss-import": "^16.0.0",
"postcss-loader": "^8.0.0",
"raw-loader": "^4.0.0",
"react-refresh": "~0.14.0",
"react-refresh": "~0.17.0",
"sass": "^1.0.0",
"sass-loader": "^13.0.0",
"sass-loader": "^16.0.0",
"sax": "^1.0.0",
"semver": "^7.0.0 || ^6.0.0",
"source-map": "^0.7.0",
"terser-webpack-plugin": "^5.0.0",
"ts-dedent": "^2.0.0",
"ts-loader": "^9.0.0",
"vue-loader": "^15.0.0 <= 15.9.8",
"vue-loader": "^17.0.0",
"webpack": "^5.30.0 <= 5.50.0 || ^5.51.2",
"webpack-bundle-analyzer": "^4.0.0",
"webpack-chain": "^6.0.0",
"webpack-cli": "^4.0.0",
"webpack-merge": "^5.0.0",
"webpack-cli": "^6.0.0",
"webpack-merge": "^6.0.0",
"webpack-virtual-modules": "^0.4.0"
},
"devDependencies": {
"@angular/compiler-cli": "^19.0.0",
"@angular-devkit/build-angular": "^19.0.0",
"@types/css": "0.0.33",
"@angular/compiler-cli": "^20.0.0",
"@angular-devkit/build-angular": "^20.0.0",
"@types/css": "0.0.38",
"@types/jest": "29.5.4",
"@types/loader-utils": "2.0.3",
"@types/lodash.get": "4.4.7",
"@types/micromatch": "4.0.2",
"@types/sax": "1.2.4",
"@types/loader-utils": "2.0.6",
"@types/lodash.get": "4.4.9",
"@types/micromatch": "4.0.9",
"@types/sax": "1.2.7",
"@types/terser-webpack-plugin": "5.2.0",
"@types/webpack-virtual-modules": "0.1.1",
"@types/webpack-virtual-modules": "0.4.2",
"jest": "~29.7.0",
"jest-matcher-utils": "~29.7.0",
"nativescript-vue-template-compiler": "2.9.3",
"ts-jest": "29.2.5",
"typescript": "~5.6.0"
"ts-jest": "29.4.0",
"typescript": "~5.8.0"
},
"peerDependencies": {
"nativescript-vue-template-compiler": "^2.8.1"

View File

@ -13,18 +13,18 @@ const packageJson = JSON.parse(fs.readFileSync(packagePath));
const npmPackageName = packageJson.name;
console.log(`Building ${npmPackageName}...${publish ? 'and publishing.' : ''}`);
function cleanPackage() {
// helps remove unwanted properties which may be added by other tooling
const packageJsonPath = path.resolve(rootDir, 'dist', 'packages', packageName, 'package.json');
let packageJson = fs.readFileSync(packageJsonPath, { encoding: 'utf-8' });
if (packageJson) {
packageJson = parseJson(packageJson);
// we don't need module or type properties at the moment
delete packageJson['module'];
delete packageJson['type'];
fs.writeFileSync(packageJsonPath, serializeJson(packageJson));
}
}
// function cleanPackage() {
// // helps remove unwanted properties which may be added by other tooling
// const packageJsonPath = path.resolve(rootDir, 'dist', 'packages', packageName, 'package.json');
// let packageJson = fs.readFileSync(packageJsonPath, { encoding: 'utf-8' });
// if (packageJson) {
// packageJson = parseJson(packageJson);
// // we don't need module or type properties at the moment
// delete packageJson['module'];
// delete packageJson['type'];
// fs.writeFileSync(packageJsonPath, serializeJson(packageJson));
// }
// }
cleanPackage();
// cleanPackage();
console.log(`${npmPackageName} ready to publish.`);

View File

@ -6,7 +6,7 @@
"module": "esnext",
"sourceMap": true,
"declaration": true,
"moduleResolution": "node",
"moduleResolution": "bundler",
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"noEmitOnError": true,