Skip to content

Commit 797db37

Browse files
authored
Merge branch 'main' into feat/simpler-image-scale-ios
2 parents 4d8705a + 2f4c318 commit 797db37

File tree

80 files changed

+2395
-843
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

80 files changed

+2395
-843
lines changed

.github/workflows/apps_automated.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
java-version: '11'
3030

3131
- name: Install Python
32-
uses: actions/setup-python@v1
32+
uses: actions/setup-python@v4
3333

3434
- name: Install NativeScript
3535
run: |
@@ -53,7 +53,7 @@ jobs:
5353

5454
- name: Start iOS Simulator
5555
if: ${{ always() && !cancelled() }} # run iOS tests even if Android tests failed
56-
uses: futureware-tech/simulator-action@v1
56+
uses: futureware-tech/simulator-action@v2
5757
with:
5858
model: 'iPhone 13 Pro Max'
5959
os_version: '>=15.0'

README.md

Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<p>
88

99
[![Automated Tests Passing](https://github.com/NativeScript/NativeScript/actions/workflows/apps_automated.yml/badge.svg)](https://github.com/NativeScript/NativeScript/actions/workflows/apps_automated.yml)
10-
[![License](https://img.shields.io/badge/License-MIT-blue.svg)](https://github.com/NativeScript/NativeScript/blob/master/LICENSE)
10+
[![License](https://img.shields.io/badge/License-MIT-blue.svg)](https://github.com/NativeScript/NativeScript/blob/main/LICENSE)
1111
[![NPM Version](https://badge.fury.io/js/%40nativescript%2Fcore.svg)](https://www.npmjs.com/@nativescript/core)
1212
[![Discord](https://badgen.net/badge/icon/discord?icon=discord&label)](https://nativescript.org/discord)
1313

@@ -32,23 +32,23 @@ $ npm run setup
3232
$ npm start
3333
```
3434

35-
We love you and your pull requests 🤗. Please follow our [contributing guide](https://github.com/NativeScript/NativeScript/blob/master/tools/notes/CONTRIBUTING.md) and see [our code of governance](https://github.com/NativeScript/management/blob/master/nativescript-governance.md) to become as involved as you want to be.
35+
We love you and your pull requests 🤗. Please follow our [contributing guide](https://github.com/NativeScript/NativeScript/blob/main/tools/notes/CONTRIBUTING.md) and see [our code of governance](https://github.com/NativeScript/management/blob/master/nativescript-governance.md) to become as involved as you want to be.
3636

3737
## @nativescript/*
3838

39-
* [@nativescript/core](https://github.com/NativeScript/NativeScript/tree/master/packages/core)
39+
* [@nativescript/core](https://github.com/NativeScript/NativeScript/tree/main/packages/core)
4040
* Core iOS/Android for NativeScript.
4141
* [@nativescript/types](https://www.npmjs.com/package/@nativescript/types)
4242
* Types for both iOS/Android below wrapped up as a convenience. *Most commonly used.*
43-
* [@nativescript/types-ios](https://github.com/NativeScript/NativeScript/tree/master/packages/types-ios)
43+
* [@nativescript/types-ios](https://github.com/NativeScript/NativeScript/tree/main/packages/types-ios)
4444
* Types for iOS.
45-
* [@nativescript/types-android](https://github.com/NativeScript/NativeScript/tree/master/packages/types-android)
45+
* [@nativescript/types-android](https://github.com/NativeScript/NativeScript/tree/main/packages/types-android)
4646
* Types for Android.
47-
* [@nativescript/types-minimal](https://github.com/NativeScript/NativeScript/tree/master/packages/types-minimal)
47+
* [@nativescript/types-minimal](https://github.com/NativeScript/NativeScript/tree/main/packages/types-minimal)
4848
* A very minimal set of types for only the latest Android and iOS sdks. Most commonly used to optimize Web-based IDE's which auto load all type declarations from node_modules.
49-
* [@nativescript/ui-mobile-base](https://github.com/NativeScript/NativeScript/tree/master/packages/ui-mobile-base)
49+
* [@nativescript/ui-mobile-base](https://github.com/NativeScript/NativeScript/tree/main/packages/ui-mobile-base)
5050
* UI mobile base native classes used by core.
51-
* [@nativescript/webpack](https://github.com/NativeScript/NativeScript/tree/master/packages/webpack)
51+
* [@nativescript/webpack](https://github.com/NativeScript/NativeScript/tree/main/packages/webpack5)
5252
* Webpack build utilities and configs used by NativeScript apps.
5353

5454
## Quick Links
@@ -78,7 +78,15 @@ Outside the source centralized in this repo, NativeScript consists of a few othe
7878
- This repo contains the NativeScript command-line interface, which lets you create, build, and run apps using NativeScript. The CLI is written in TypeScript.
7979
- **[Docs](//github.com/NativeScript/docs-new)**
8080
- This repo contains NativeScript documentation, which is available at <http://docs.nativescript.org/>. The docs are written in Markdown.
81-
- **[Official Plugins](https://github.com/NativeScript/plugins)
82-
- This repo contains a [plugin workspace](https://docs.nativescript.org/plugins/plugin-workspace-guide.html) the TSC (Technical Steering Committee) maintains offering several often useful plugins.
81+
- **[Plugins](https://github.com/NativeScript/plugins)**
82+
- This repo contains a [plugin workspace](https://docs.nativescript.org/plugins/plugin-workspace-guide.html) with several often useful plugins.
83+
- **[Firebase](https://github.com/NativeScript/firebase)**
84+
- Modular Firebase 🔥 implementation for iOS & Android.
85+
- **[ML Kit](https://github.com/NativeScript/mlkit)**
86+
- Google's [ML Kit SDKs for iOS and Android](https://developers.google.com/ml-kit).
87+
- **[Payments](https://github.com/NativeScript/payments)**
88+
- In-App Purchase, Subscriptions, Google Pay and Apple Pay.
89+
- **[Artwork](https://github.com/NativeScript/artwork)**
90+
- Want to use our logo or colors? This repo contains ready to use media material.
8391

8492
<h3 align="center">Made with ❤️</h3>

apps/automated/.npmrc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,6 @@
11
legacy-peer-deps=true
2+
3+
# npm 9+ this defaults to `true` meaning `file:` dependencies are packed and then installed
4+
# but since we want to link the source files in this case, we disable this behavior and
5+
# opt to link the dependency as-is instead. (eg. @nativescript/core)
6+
install-links=false

apps/automated/src/application/application-tests-common.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ export function testInitialized() {
1919

2020
export function testDisplayedEvent() {
2121
// global.isDisplayedEventFired flag is set in app.ts application.displayedEvent handler
22-
TKUnit.assert((<any>global).isDisplayedEventFired, 'application.displayedEvent not fired');
22+
TKUnit.assert(global.isDisplayedEventFired, 'application.displayedEvent not fired');
2323
}
2424

2525
export function testOrientation() {

apps/automated/src/fetch/fetch-tests.ts

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ export var test_fetch_defined = function () {
88

99
export var test_fetch = function (done: (err: Error, res?: string) => void) {
1010
// >> fetch-response
11-
fetch('https://httpbin.org/get')
11+
fetch('https://http-echo.nativescript.org/get')
1212
.then(function (r) {
1313
// Argument (r) is Response!
1414
// >> (hide)
@@ -22,7 +22,7 @@ export var test_fetch = function (done: (err: Error, res?: string) => void) {
2222

2323
export var test_fetch_text = function (done: (err: Error, res?: string) => void) {
2424
// >> fetch-string
25-
fetch('https://httpbin.org/get')
25+
fetch('https://http-echo.nativescript.org/get')
2626
.then((response) => response.text())
2727
.then(function (r) {
2828
// Argument (r) is string!
@@ -37,7 +37,7 @@ export var test_fetch_text = function (done: (err: Error, res?: string) => void)
3737

3838
export var test_fetch_json = function (done: (err: Error, res?: string) => void) {
3939
// >> fetch-json
40-
fetch('https://httpbin.org/get')
40+
fetch('https://http-echo.nativescript.org/get')
4141
.then((response) => response.json())
4242
.then(function (r) {
4343
// Argument (r) is JSON object!
@@ -52,7 +52,7 @@ export var test_fetch_json = function (done: (err: Error, res?: string) => void)
5252

5353
export var test_fetch_formData = function (done: (err: Error, res?: string) => void) {
5454
// >> fetch-formdata
55-
fetch('https://httpbin.org/get')
55+
fetch('https://http-echo.nativescript.org/get')
5656
.then((response) => response.formData())
5757
.then(function (r) {
5858
// Argument (r) is FormData object!
@@ -67,7 +67,7 @@ export var test_fetch_formData = function (done: (err: Error, res?: string) => v
6767

6868
export var test_fetch_blob = function (done: (err: Error, res?: string) => void) {
6969
// >> fetch-blob
70-
fetch('https://httpbin.org/get')
70+
fetch('https://http-echo.nativescript.org/get')
7171
.then((response) => response.blob())
7272
.then(function (r) {
7373
// Argument (r) is Blob object!
@@ -82,7 +82,7 @@ export var test_fetch_blob = function (done: (err: Error, res?: string) => void)
8282

8383
export var test_fetch_arraybuffer = function (done: (err: Error, res?: string) => void) {
8484
// >> fetch-arraybuffer
85-
fetch('https://httpbin.org/get')
85+
fetch('https://http-echo.nativescript.org/get')
8686
.then((response) => response.arrayBuffer())
8787
.then(function (r) {
8888
// Argument (r) is ArrayBuffer object!
@@ -101,7 +101,7 @@ export var test_fetch_fail_invalid_url = function (done) {
101101
return completed;
102102
};
103103

104-
fetch('hgfttp://httpbin.org/get')
104+
fetch('hgfttp://http-echo.nativescript.org/get')
105105
.catch(function (e) {
106106
completed = true;
107107
done(null);
@@ -111,15 +111,15 @@ export var test_fetch_fail_invalid_url = function (done) {
111111

112112
// Note: fetch is unable to do url validation
113113
// export var test_fetch_invalid_url_fail_message = function (done) {
114-
// fetch("hgfttp://httpbin.org/get").catch(function (e: TypeError) {
114+
// fetch("hgfttp://http-echo.nativescript.org/get").catch(function (e: TypeError) {
115115
// TKUnit.assert(e.message.match(/Network request failed:.{2,}/), "Failure message should contain details on the failure. Actual message was: " + e.message);
116116
// done(null);
117117
// }).catch(failOnError(done));
118118
// };
119119

120120
export var test_fetch_response_status = function (done) {
121121
// >> fetch-status-response
122-
fetch('https://httpbin.org/get')
122+
fetch('https://http-echo.nativescript.org/get')
123123
.then(function (response) {
124124
// Argument (response) is Response!
125125
var statusCode = response.status;
@@ -134,7 +134,7 @@ export var test_fetch_response_status = function (done) {
134134

135135
export var test_fetch_response_headers = function (done) {
136136
// >> fetch-headers-response
137-
fetch('https://httpbin.org/get')
137+
fetch('https://http-echo.nativescript.org/get')
138138
.then(function (response) {
139139
// Argument (response) is Response!
140140
// var all = response.headers.getAll();
@@ -148,7 +148,7 @@ export var test_fetch_response_headers = function (done) {
148148
};
149149

150150
export var test_fetch_headers_sent = function (done) {
151-
fetch('https://httpbin.org/get', {
151+
fetch('https://http-echo.nativescript.org/get', {
152152
method: 'GET',
153153
headers: new Headers({ 'Content-Type': 'application/json' }),
154154
})
@@ -165,7 +165,7 @@ export var test_fetch_post_form_data = function (done) {
165165
data.append('MyVariableOne', 'ValueOne');
166166
data.append('MyVariableTwo', 'ValueTwo');
167167

168-
fetch('https://httpbin.org/post', {
168+
fetch('https://http-echo.nativescript.org/post', {
169169
method: 'POST',
170170
headers: new Headers({ 'Content-Type': 'application/x-www-form-urlencoded' }),
171171
body: data,
@@ -182,7 +182,7 @@ export var test_fetch_post_form_data = function (done) {
182182

183183
export var test_fetch_post_json = function (done) {
184184
// >> fetch-post-json
185-
fetch('https://httpbin.org/post', {
185+
fetch('https://http-echo.nativescript.org/post', {
186186
method: 'POST',
187187
headers: new Headers({ 'Content-Type': 'application/json' }),
188188
body: JSON.stringify({ MyVariableOne: 'ValueOne', MyVariableTwo: 'ValueTwo' }),

apps/automated/src/globals/globals-tests.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ export function test_global_system_import() {
66
TKUnit.assert(System, 'System not defined');
77
TKUnit.assert(typeof System.import === 'function', 'System.import not a function');
88

9-
TKUnit.assert((<any>global).System, 'global.System not defined');
10-
TKUnit.assert(typeof (<any>global).System.import === 'function', 'global.System.import not a function');
9+
TKUnit.assert(global.System, 'global.System not defined');
10+
TKUnit.assert(typeof global.System.import === 'function', 'global.System.import not a function');
1111
}
1212

1313
export function test_global_zonedCallback() {

apps/automated/src/http/http-string-worker.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ postMessage('stub');
55
//
66
// import { getString } from '@nativescript/core/http';
77
//
8-
// getString('https://httpbin.org/get').then(
8+
// getString('https://http-echo.nativescript.org/get').then(
99
// function (r) {
1010
// postMessage(r);
1111
// },

0 commit comments

Comments
 (0)