Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
26b74ac
feat(vite): improve workspace resolutions
NathanWalker Nov 23, 2025
2abf7bc
fix(vite): windows path handling
NathanWalker Nov 24, 2025
03f7d26
fix: cross platform file paths
NathanWalker Nov 25, 2025
40788e3
chore: dep cleanup
NathanWalker Dec 4, 2025
92fcb87
fix(vite): global flags for hmr
NathanWalker Dec 13, 2025
414ce43
chore: log cleanup
NathanWalker Dec 13, 2025
49a16c5
feat(vite): onHmrUpdate for custom app hmr update handling
NathanWalker Dec 13, 2025
60b2f3d
feat: improve hmr vite server ip connection cases
NathanWalker Dec 13, 2025
9df273f
feat: improvements for import.meta.hot
NathanWalker Dec 17, 2025
e8e1778
Merge remote-tracking branch 'origin/main' into feat/vite-improvements
NathanWalker Dec 21, 2025
8c57189
chore: oidc workflow improvements
NathanWalker Dec 21, 2025
d472881
fix(vite): ensure angular tsconfig prefers .app.json and falls back t…
NathanWalker Dec 21, 2025
5083f68
fix: init without debug logs by default
NathanWalker Dec 22, 2025
3ebbb4c
Merge branch 'main' into feat/vite-improvements
NathanWalker Jan 7, 2026
f5db360
fix(vite): dynamic and static import mixed usage (#11042)
NathanWalker Jan 7, 2026
d6caa43
feat(vite): support custom android activites and application classes …
NathanWalker Jan 7, 2026
d9276c1
chore: 1.0.6-rc.2
NathanWalker Jan 7, 2026
e910eed
Merge remote-tracking branch 'origin/main' into feat/vite-improvements
NathanWalker Jan 31, 2026
5aba012
fix: nativeclass handling in esbuild
NathanWalker Jan 31, 2026
4995388
fix: init for windows
NathanWalker Jan 31, 2026
91b53ba
chore: vite 1.0.6-rc.3
NathanWalker Jan 31, 2026
98a5b6b
Merge remote-tracking branch 'origin/main' into feat/vite-improvements
NathanWalker Jan 31, 2026
3a85edc
chore: use exports with vite
NathanWalker Feb 13, 2026
4eef367
chore: wip hmr in toolbox with vite
NathanWalker Feb 13, 2026
c02bf90
Merge remote-tracking branch 'origin/main' into feat/vite-improvements
NathanWalker Feb 25, 2026
98007c1
Merge remote-tracking branch 'origin/main' into feat/vite-improvements
NathanWalker Feb 25, 2026
fb490ad
Merge branch 'main' into feat/vite-improvements
NathanWalker Mar 8, 2026
de0551b
Merge remote-tracking branch 'origin/main' into feat/vite-improvements
NathanWalker Mar 11, 2026
e88e796
chore: use latest cli
NathanWalker Mar 11, 2026
1019725
chore: adjust vscode setting for local TS version and add default tas…
NathanWalker Mar 11, 2026
4395ab5
fix(vite): NativeClass decorator
NathanWalker Mar 11, 2026
84766dc
fix(vite): default chunkSizeWarningLimit
NathanWalker Mar 11, 2026
05736f0
fix(vite): type checking during builds
NathanWalker Mar 11, 2026
8c91c7a
chore: vitest 4
NathanWalker Mar 11, 2026
fb43a87
chore: webpack snapshot unit tests
NathanWalker Mar 11, 2026
8ed1e65
tests: automated test type checking improvements
NathanWalker Mar 11, 2026
a6ecbe6
tests: automated passing 100% with vite
NathanWalker Mar 12, 2026
e88b19a
tests: automated 100% android with vite
NathanWalker Mar 12, 2026
5a70fa7
fix: framework config helpers in explicit subpaths
NathanWalker Mar 12, 2026
65f139e
chore: vite 1.0.6-rc.7
NathanWalker Mar 12, 2026
f6ad8e8
feat: allow typeCheck control
NathanWalker Mar 12, 2026
0e886e2
chore: cleanup type
NathanWalker Mar 15, 2026
5f9d619
Merge branch 'main' into feat/vite-improvements
NathanWalker Mar 16, 2026
ba53172
Merge remote-tracking branch 'origin/main' into feat/vite-improvements
NathanWalker Mar 21, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 27 additions & 7 deletions .github/workflows/secure_nx_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -386,19 +386,39 @@ jobs:
rm -f "$NPM_CONFIG_USERCONFIG" || true
fi

npx nx release publish \
--projects "${{ steps.taginfo.outputs.project }}" \
--tag "${{ steps.taginfo.outputs.dist_tag }}" \
--access public \
--verbose
project="${{ steps.taginfo.outputs.project }}"
dist_tag="${{ steps.taginfo.outputs.dist_tag }}"

echo "Building $project..."
npx nx build "$project" --skip-nx-cache

echo "Publishing from dist/packages/$project..."
cd "dist/packages/$project"

npm pack
tgz_file=$(ls *.tgz | head -n 1)
npm publish "$tgz_file" --tag "$dist_tag" --access public --verbose

- name: nx release publish (tag, token)
- name: Build and Publish (tag, token)
if: ${{ steps.ctx.outputs.mode == 'tag' && vars.USE_NPM_TOKEN == 'true' }}
shell: bash
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}
NPM_CONFIG_PROVENANCE: true
run: |
npx nx release publish --projects "${{ steps.taginfo.outputs.project }}" --tag "${{ steps.taginfo.outputs.dist_tag }}" --access public --verbose
set -euo pipefail
project="${{ steps.taginfo.outputs.project }}"
dist_tag="${{ steps.taginfo.outputs.dist_tag }}"

echo "Building $project..."
npx nx build "$project" --skip-nx-cache

echo "Publishing from dist/packages/$project..."
cd "dist/packages/$project"

npm pack
tgz_file=$(ls *.tgz | head -n 1)
npm publish "$tgz_file" --tag "$dist_tag" --access public --verbose

- name: Summary
if: always()
Expand Down
3 changes: 2 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,6 @@
"**/*.js": true,
"**/*.js.map": true
},
"eslint.validate": ["json"]
"eslint.validate": ["json"],
"js/ts.tsdk.path": "./node_modules/typescript/lib"
}
23 changes: 22 additions & 1 deletion .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,28 @@
"type": "shell",
"problemMatcher": "$tsc",
"command": "./node_modules/.bin/tsc",
"args": [ "-p", "unit-tests/tsconfig.json" ],
"args": [ "-p", "unit-tests/tsconfig.json" ]
},
{
"label": "apps-toolbox-prepare-ios",
"type": "shell",
"command": "npx",
"args": ["nx", "prepare", "apps-toolbox", "ios"],
"problemMatcher": [
{
"owner": "typescript",
"fileLocation": ["relative", "apps/toolbox"],
"pattern": {
"regexp": "^(.*):(\\d+):(\\d+) - error TS(\\d+): (.*)$",
"file": 1,
"line": 2,
"column": 3,
"code": 4,
"message": 5
}
}
],
"group": "build"
}
]
}
4 changes: 2 additions & 2 deletions apps/automated/nativescript.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ export default {
packageManager: 'npm',
additionalPathsToClean: ['.ns-vite-build'],
},
// bundler: 'vite',
// bundlerConfigPath: 'vite.config.ts',
bundler: 'vite',
bundlerConfigPath: 'vite.config.ts',
} as NativeScriptConfig;
2 changes: 1 addition & 1 deletion apps/automated/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"@nativescript/vite": "file:../../dist/packages/vite",
"@nativescript/webpack": "file:../../dist/packages/webpack5",
"circular-dependency-plugin": "^5.2.2",
"typescript": "~5.8.0"
"typescript": "~5.9.3"
},
"gitHead": "c06800e52ee1a184ea2dffd12a6702aaa43be4e3",
"readme": "NativeScript Application"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ export function test_iosAccessibilityAdjustsFontSize_property() {
layout.style.iosAccessibilityAdjustsFontSize = false;
layout.style.fontScaleInternal = deviceFontScaleMock;

const nativeFontSize = testView.nativeTextViewProtected.font.pointSize;
const nativeFontSize = (testView.nativeTextViewProtected as unknown as TNSLabel).font.pointSize;
layout.style.iosAccessibilityAdjustsFontSize = true;
const nativeFontSizeWithAdjust = testView.nativeTextViewProtected.font.pointSize;
const nativeFontSizeWithAdjust = (testView.nativeTextViewProtected as unknown as TNSLabel).font.pointSize;

TKUnit.assertEqual(nativeFontSize, testView.style.fontInternal.fontSize, 'View font size was scaled even though iosAccessibilityAdjustsFontSize is disabled');
TKUnit.assertEqual(nativeFontSizeWithAdjust, testView.style.fontInternal.fontSize * deviceFontScaleMock, 'View font size was not scaled even though iosAccessibilityAdjustsFontSize is enabled');
Expand All @@ -41,7 +41,7 @@ export function test_iosAccessibilityMinFontScale_property() {

testView.style.iosAccessibilityMinFontScale = 2.0;

const nativeFontSize = testView.nativeTextViewProtected.font.pointSize;
const nativeFontSize = (testView.nativeTextViewProtected as unknown as TNSLabel).font.pointSize;
const expectedNativeFontSize = testView.style.fontInternal.fontSize * testView.style.iosAccessibilityMinFontScale;
TKUnit.assertEqual(nativeFontSize, expectedNativeFontSize, 'View font size scaling does not respect iosAccessibilityMinFontScale');
}
Expand All @@ -63,7 +63,7 @@ export function test_iosAccessibilityMaxFontScale_property() {

testView.style.iosAccessibilityMaxFontScale = 2.0;

const nativeFontSize = testView.nativeTextViewProtected.font.pointSize;
const nativeFontSize = (testView.nativeTextViewProtected as unknown as TNSLabel).font.pointSize;
const expectedNativeFontSize = testView.style.fontInternal.fontSize * testView.style.iosAccessibilityMaxFontScale;
TKUnit.assertEqual(nativeFontSize, expectedNativeFontSize, 'View font size scaling does not respect iosAccessibilityMaxFontScale');
}
Expand Down
2 changes: 1 addition & 1 deletion apps/automated/src/debugger/dom-node-tests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ export function test_property_change_from_native_calls_attributeModified() {
callbackCalled = true;
};

textProperty.nativeValueChange(tv, 'new value');
textProperty.nativeValueChange(tv as any, 'new value');

assert(callbackCalled, 'attributeModified not called');
}
Expand Down
18 changes: 9 additions & 9 deletions apps/automated/src/image-source/image-source-tests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,15 @@ export function testDrawableSetNativeSource() {

// >> imagesource-setNativeSource
const img = new ImageSource();
img.setNativeSource(icon);
img.setNativeSource(icon as any);
// << imagesource-setNativeSource

TKUnit.assert(img.height > 0, `image ${type} setNativeSource failed`);

type = splashScreen?.getClass?.().toString?.() ?? '';

// >> imagesource-setNativeSource
img.setNativeSource(splashScreen);
img.setNativeSource(splashScreen as any);
// << imagesource-setNativeSource

TKUnit.assert(img.height > 0, `image ${type} setNativeSource failed`);
Expand Down Expand Up @@ -69,7 +69,7 @@ export function testFromUrl(done) {
// console.log("Error loading image: " + error);
//completed = true;
done(error);
}
},
);
}

Expand Down Expand Up @@ -123,7 +123,7 @@ export function testFromAssetFileNotFound(done) {
(error) => {
TKUnit.assertNotNull(error);
done();
}
},
);
}

Expand All @@ -143,7 +143,7 @@ export function testFromAssetSimple(done) {
},
(error) => {
done(error);
}
},
);
}

Expand Down Expand Up @@ -181,7 +181,7 @@ export function testFromAssetWithExactScaling(done) {
},
(error) => {
done(error);
}
},
);
}

Expand All @@ -203,7 +203,7 @@ export function testFromAssetWithScalingAndAspectRatio(done) {
},
(error) => {
done(error);
}
},
);
}

Expand All @@ -222,7 +222,7 @@ export function testFromAssetWithScalingAndDefaultAspectRatio(done) {
},
(error) => {
done(error);
}
},
);
}

Expand All @@ -244,7 +244,7 @@ export function testFromAssetWithBiggerScaling(done) {
},
(error) => {
done(error);
}
},
);
}

Expand Down
2 changes: 1 addition & 1 deletion apps/automated/src/livesync/livesync-tests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,6 @@ function livesync(context: ModuleContext) {
ls(context);
}

function waitUntilLivesyncComplete(frame: Frame) {
function waitUntilLivesyncComplete(frame: { navigationQueueIsEmpty(): boolean }) {
TKUnit.waitUntilReady(() => frame.navigationQueueIsEmpty());
}
2 changes: 1 addition & 1 deletion apps/automated/src/navigation/custom-transition.android.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { PageTransition, Transition } from '@nativescript/core';

export class CustomTransition extends Transition {
constructor(duration: number, curve: any) {
constructor(duration?: number, curve?: any) {
super(duration, curve);
}

Expand Down
2 changes: 1 addition & 1 deletion apps/automated/src/navigation/custom-transition.ios.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { PageTransition, SharedTransition, SharedTransitionAnimationType, SharedTransitionHelper, Transition, Utils } from '@nativescript/core';

export class CustomTransition extends Transition {
constructor(duration: number, curve: any) {
constructor(duration?: number, curve?: any) {
super(duration, curve);
}

Expand Down
2 changes: 1 addition & 1 deletion apps/automated/src/navigation/navigation-tests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ function attachEventListeners(page: Page, events: Array<string>) {
});
}

function attachFrameEventListeners(frame: Frame, events: Array<string>) {
function attachFrameEventListeners(frame: { on(eventName: string, callback: (...args: any[]) => void): void }, events: Array<string>) {
let argsToString = (args: frame.NavigationData) => {
return `${(<frame.BackstackEntry>args.entry).resolvedPage.id} ${args.eventName} ${args.isBack ? 'back' : 'forward'}`;
};
Expand Down
2 changes: 1 addition & 1 deletion apps/automated/src/profiling/profiling-tests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class TestClass {
}
}

const testFunction1 = profile(function testFunction1() {
const testFunction1 = profile('testFunction1', function testFunction1() {
// noop
});
const testFunction2 = profile('testFunction2', () => {
Expand Down
4 changes: 2 additions & 2 deletions apps/automated/src/ui-helper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ export function waitUntilNavigatedTo(page: Page, action: Function) {
TKUnit.waitUntilReady(() => completed, 5);
}

export function waitUntilNavigatedFrom(action: Function, topFrame?: Frame) {
export function waitUntilNavigatedFrom(action: Function, topFrame?: { currentPage: Page }) {
const currentPage = topFrame ? topFrame.currentPage : Frame.topmost().currentPage;
let completed = false;
function navigatedFrom(args) {
Expand Down Expand Up @@ -292,7 +292,7 @@ export function _generateFormattedString(): FormattedString {
return formattedString;
}

export function nativeView_recycling_test(createNew: () => View, createLayout?: () => LayoutBase, nativeGetters?: Map<string, (view) => any>, customSetters?: Map<string, any>) {
export function nativeView_recycling_test(createNew: () => View, createLayout?: () => View, nativeGetters?: Map<string, (view) => any>, customSetters?: Map<string, any>) {
return;

// if (__APPLE__) {
Expand Down
2 changes: 1 addition & 1 deletion apps/automated/src/ui/action-bar/action-bar-tests.ios.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ export function test_actionItem_visibility() {
}

export function test_navigationButton_visibility() {
var actionItem = new actionBar.ActionItem();
var actionItem = new actionBar.NavigationButton();
actionItem.text = 'Test';
var page = createPageAndNavigate();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,8 @@ export function test_set_color() {
ai.color = new color.Color('red');

function testAction(views: Array<viewModule.View>) {
TKUnit.assertEqual(ai.color.ios.CGColor, ai.nativeViewProtected.color.CGColor, 'ai.color');
const nativeView = ai.nativeViewProtected as unknown as UIActivityIndicatorView;
TKUnit.assertEqual(ai.color.ios.CGColor, nativeView.color.CGColor, 'ai.color');
}

helper.buildUIAndRunTest(ai, testAction);
Expand Down
14 changes: 7 additions & 7 deletions apps/automated/src/ui/frame/frame-tests-common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { Page } from '@nativescript/core/ui/page';
import * as TKUnit from '../../tk-unit';

const NAV_WAIT = 15;
function emptyNavigationQueue(frame: Frame) {
function emptyNavigationQueue(frame: { navigationQueueIsEmpty(): boolean }) {
TKUnit.waitUntilReady(() => frame.navigationQueueIsEmpty(), NAV_WAIT);
}

Expand Down Expand Up @@ -242,8 +242,8 @@ export function test_frame_retrieval_API_when_navigating() {
const initialTopmost = Frame.topmost();
const initialFrameById = Frame.getFrameById('initialFrame');

TKUnit.assertEqual(initialTopmost, initialFrame);
TKUnit.assertEqual(initialFrameById, initialFrame);
TKUnit.assertEqual(initialTopmost as any, initialFrame as any);
TKUnit.assertEqual(initialFrameById as any, initialFrame as any);

const newFrame = new Frame();
newFrame.id = 'newFrame';
Expand All @@ -252,16 +252,16 @@ export function test_frame_retrieval_API_when_navigating() {
const newTopmost = Frame.topmost();
const newFrameById = Frame.getFrameById('newFrame');

TKUnit.assertEqual(newTopmost, newFrame);
TKUnit.assertEqual(newFrameById, newFrame);
TKUnit.assertEqual(newTopmost as any, newFrame as any);
TKUnit.assertEqual(newFrameById as any, newFrame as any);

initialFrame.navigate(() => new Page());

const previousTopmost = Frame.topmost();
const previousFrameById = Frame.getFrameById('initialFrame');

TKUnit.assertEqual(previousTopmost, initialFrame);
TKUnit.assertEqual(previousFrameById, initialFrame);
TKUnit.assertEqual(previousTopmost as any, initialFrame as any);
TKUnit.assertEqual(previousFrameById as any, initialFrame as any);

// clean up the frame stack
initialFrame._removeFromFrameStack();
Expand Down
4 changes: 2 additions & 2 deletions apps/automated/src/ui/label/label-tests.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as TKUnit from '../../tk-unit';
import * as testModule from '../../ui-test';
import { Label, GridLayout, LayoutBase, StackLayout, BindingOptions, CoreTypes, Span, FormattedString, Utils, Color, Observable, path } from '@nativescript/core';
import { Label, GridLayout, StackLayout, BindingOptions, CoreTypes, Span, FormattedString, Utils, Color, Observable, path, View } from '@nativescript/core';
import * as labelTestsNative from './label-tests-native';
import * as helper from '../../ui-helper';

Expand Down Expand Up @@ -588,7 +588,7 @@ export class LabelTest extends testModule.UITest<Label> {
TKUnit.assertEqual(view.style.letterSpacing, 1, 'LetterSpacing');
}

private requestLayoutFixture(expectRequestLayout: boolean, initialValue: string, setup: (label: Label) => LayoutBase): void {
private requestLayoutFixture<T extends View & { addChild(view: Label): void }>(expectRequestLayout: boolean, initialValue: string, setup: (label: Label) => T): void {
if (!__APPLE__) {
return;
}
Expand Down
Loading
Loading