Skip to content

Commit fde6b3b

Browse files
committed
chore: core updates and adjustments
1 parent 54ddc93 commit fde6b3b

File tree

14 files changed

+134
-118
lines changed

14 files changed

+134
-118
lines changed

angular-tutorial/package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
"@angular/platform-browser-dynamic": "~20.2.0",
4040
"@angular/router": "~20.2.0",
4141
"@nativescript/angular": "^20.0.0",
42-
"@nativescript/core": "~8.9.0",
42+
"@nativescript/core": "~9.0.0",
4343
"@nativescript/tailwind": "^2.1.0",
4444
"@nativescript/theme": "~3.0.1",
4545
"rxjs": "^7.8.0",
@@ -48,9 +48,9 @@
4848
"devDependencies": {
4949
"@angular-devkit/build-angular": "~20.2.0",
5050
"@angular/compiler-cli": "~20.2.0",
51-
"@nativescript/android": "~8.9.0",
52-
"@nativescript/ios": "~8.9.0",
53-
"@nativescript/types": "~8.9.0",
51+
"@nativescript/android": "~9.0.0",
52+
"@nativescript/ios": "~9.0.0",
53+
"@nativescript/types": "~9.0.0",
5454
"@nativescript/webpack": "~5.0.0",
5555
"@ngtools/webpack": "~20.2.0",
5656
"tailwindcss": "~3.2.4",

plain-js-tutorial/package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@
44
"version": "1.0.0",
55
"private": true,
66
"dependencies": {
7-
"@nativescript/core": "~8.5.0",
7+
"@nativescript/core": "~9.0.0",
88
"@nativescript/theme": "~3.0.2"
99
},
1010
"devDependencies": {
11-
"@nativescript/android": "8.4.0",
12-
"@nativescript/ios": "8.5.1",
13-
"@nativescript/webpack": "~5.0.14"
11+
"@nativescript/android": "~9.0.0",
12+
"@nativescript/ios": "~9.0.0",
13+
"@nativescript/webpack": "~5.0.31"
1414
}
1515
}

plain-tutorial/package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,13 @@
3030
},
3131
"homepage": "https://github.com/NativeScript/nativescript-app-templates",
3232
"dependencies": {
33-
"@nativescript/core": "~8.1.0",
33+
"@nativescript/core": "~9.0.0",
3434
"@nativescript/theme": "~3.0.1"
3535
},
3636
"devDependencies": {
37-
"@nativescript/types": "~8.1.0",
38-
"@nativescript/webpack": "~5.0.0",
39-
"typescript": "~4.0.0"
37+
"@nativescript/types": "~9.0.0",
38+
"@nativescript/webpack": "~5.0.31",
39+
"typescript": "~5.8.0"
4040
},
4141
"private": "true",
4242
"readme": "NativeScript Application"

react-tutorial/package.json

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -38,20 +38,20 @@
3838
"template"
3939
],
4040
"dependencies": {
41-
"@nativescript/core": "~8.1.0",
41+
"@nativescript/core": "~9.0.0",
4242
"@react-navigation/core": "^5.15.3",
43-
"react": "~16.13.1",
44-
"react-nativescript": "^3.0.0-beta.1",
45-
"react-nativescript-navigation": "3.0.0-beta.2",
46-
"react-refresh": "~0.8.3"
43+
"react": "~18.2.0",
44+
"react-nativescript": "^5.0.0",
45+
"react-nativescript-navigation": "~5.0.0",
46+
"react-refresh": "~0.18.0"
4747
},
4848
"devDependencies": {
49-
"@nativescript/types": "~8.1.0",
50-
"@nativescript/webpack": "~5.0.0",
51-
"@pmmmwh/react-refresh-webpack-plugin": "~0.4.0-beta.5",
52-
"@types/react": "16.9.34",
53-
"patch-package": "~6.2.2",
54-
"typescript": "~4.0.0"
49+
"@nativescript/types": "~9.0.0",
50+
"@nativescript/webpack": "~5.0.31",
51+
"@pmmmwh/react-refresh-webpack-plugin": "~0.6.2",
52+
"@types/react": "18.2.0",
53+
"patch-package": "~8.0.1",
54+
"typescript": "~5.8.0"
5555
},
5656
"gitHead": "1350d382fb4b0ed4c6e9685df909518b2688e004",
5757
"readme": "NativeScript Application",

svelte-tutorial/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ This app is built with the NativeScript CLI. Once you have the [CLI installed](h
1010
npm i -g nativescript
1111
```
1212

13-
> For more information on how to use Svelte with NativeScript, check out the official [Svelte-Native documentation](https://svelte-native.technology/)
13+
> For more information on how to use Svelte with NativeScript, check out the official [Svelte-Native documentation](https://svelte.nativescript.org)
1414
1515
Clone the repo and go to the project's directory:
1616

svelte-tutorial/app/app.ts

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,4 @@
1-
/*
2-
In NativeScript, the app.ts file is the entry point to your application.
3-
You can use this file to perform app-level initialization, but the primary
4-
purpose of the file is to pass control to the app’s first module.
5-
*/
1+
import { svelteNativeNoFrame } from '@nativescript-community/svelte-native';
2+
import App from './App.svelte';
63

7-
import { svelteNative } from 'svelte-native'
8-
import App from './App.svelte'
9-
svelteNative(App, {})
4+
svelteNativeNoFrame(App, {});

svelte-tutorial/app/pages/Details.svelte

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@
2929
</page>
3030

3131
<script>
32-
import { navigate } from 'svelte-native'
3332
import { FlickService } from '../services/flickService';
3433
3534
export let flickId;
Lines changed: 54 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -1,57 +1,57 @@
1-
<page>
2-
<actionBar title="NativeFlix" />
3-
<stackLayout height="100%">
4-
<listView
5-
height="100%"
6-
separatorColor="transparent"
7-
items="{flicks}"
8-
on:itemTap="{onFlickTap}">
9-
<Template let:item>
10-
<gridLayout
11-
height="280"
12-
borderRadius="10"
13-
class="bg-secondary"
14-
rows="*, auto, auto"
15-
columns="*"
16-
margin="5 10"
17-
padding="0">
18-
<image
19-
row="0"
20-
margin="0"
21-
stretch="aspectFill"
22-
src="{item.image}"/>
23-
<label
24-
row="1"
25-
margin="10 10 0 10"
26-
fontWeight="700"
27-
class="text-primary"
28-
fontSize="18"
29-
text="{item.title}"/>
30-
<label
31-
row="2"
32-
margin="0 10 10 10"
33-
class="text-secondary"
34-
fontSize="14"
35-
textWrap="true"
36-
text="{item.description}"/>
37-
</gridLayout>
38-
</Template>
39-
</listView>
40-
</stackLayout>
41-
</page>
42-
43-
<script>
44-
import { navigate } from 'svelte-native'
45-
import { Template } from 'svelte-native/components'
46-
import Details from './Details.svelte';
47-
import { FlickService } from '../services/flickService';
1+
<script>
2+
import { navigate } from "@nativescript-community/svelte-native";
3+
import { Template } from "@nativescript-community/svelte-native/components";
4+
import Details from "./Details.svelte";
5+
import { FlickService } from "../services/flickService";
486
49-
let flicks = FlickService.getInstance().getFlicks();
7+
let flicks = FlickService.getInstance().getFlicks();
508
51-
function onFlickTap(event) {
52-
navigate({
53-
page: Details,
54-
props: { flickId: flicks[event.index].id }
55-
})
56-
}
9+
function onFlickTap(event) {
10+
navigate({
11+
page: Details,
12+
props: { flickId: flicks[event.index].id },
13+
});
14+
}
5715
</script>
16+
17+
<page>
18+
<actionBar title="NativeFlix" />
19+
<stackLayout height="100%">
20+
<listView
21+
height="100%"
22+
separatorColor="transparent"
23+
items={flicks}
24+
on:itemTap={onFlickTap}
25+
>
26+
<Template let:item>
27+
<gridLayout
28+
height="280"
29+
borderRadius="10"
30+
class="bg-secondary"
31+
rows="*, auto, auto"
32+
columns="*"
33+
margin="5 10"
34+
padding="0"
35+
>
36+
<image row="0" margin="0" stretch="aspectFill" src={item.image} />
37+
<label
38+
row="1"
39+
margin="10 10 0 10"
40+
fontWeight="700"
41+
class="text-primary"
42+
fontSize="18"
43+
text={item.title}
44+
/>
45+
<label
46+
row="2"
47+
margin="0 10 10 10"
48+
class="text-secondary"
49+
fontSize="14"
50+
textWrap="true"
51+
text={item.description}
52+
/>
53+
</gridLayout>
54+
</Template>
55+
</listView>
56+
</stackLayout>
57+
</page>

svelte-tutorial/package.json

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -38,18 +38,23 @@
3838
"url": "https://github.com/NativeScript/NativeScript/issues"
3939
},
4040
"dependencies": {
41-
"@nativescript/core": "~8.1.1",
42-
"@nativescript/theme": "~3.0.1",
43-
"svelte-native": "~1.0.0"
41+
"@nativescript-community/svelte-native": "~1.0.29",
42+
"@nativescript/core": "~9.0.0",
43+
"@nativescript/theme": "~3.0.1"
4444
},
4545
"devDependencies": {
46-
"@nativescript/types": "~8.1.1",
47-
"@nativescript/webpack": "~5.0.0",
48-
"svelte": "~3.44.0",
49-
"svelte-loader": "^3.1.2",
46+
"@nativescript/ios": "9.0.3",
47+
"@nativescript/types": "~9.0.0",
48+
"@nativescript/webpack": "~5.0.31",
49+
"svelte": "~4.2.0",
50+
"svelte-loader": "^3.2.0",
5051
"svelte-native-preprocessor": "^1.0.0",
51-
"svelte-preprocess": "^4.7.0",
52-
"typescript": "~4.5.5"
52+
"svelte-preprocess": "^5.1.3",
53+
"typescript": "~5.7.0"
54+
},
55+
"overrides": {
56+
"@nativescript/core": "~9.0.0",
57+
"svelte": "~4.2.0"
5358
},
5459
"private": "true",
5560
"readme": "NativeScript Application"

svelte-tutorial/svelte.config.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
const sveltePreprocess = require('svelte-preprocess')
2+
const svelteNativePreprocessor = require('svelte-native-preprocessor')
23

34
module.exports = {
4-
preprocess: sveltePreprocess(),
5-
}
5+
compilerOptions: {
6+
namespace: "foreign"
7+
},
8+
preprocess: [ sveltePreprocess(), svelteNativePreprocessor() ]
9+
}

0 commit comments

Comments
 (0)