Skip to content

Commit d354220

Browse files
committed
Merge remote-tracking branch 'Nativescript/main'
# Conflicts: # NativeScript/ada/ada.cpp # NativeScript/ada/ada.h # NativeScript/runtime/Console.cpp # NativeScript/runtime/Helpers.h # NativeScript/runtime/ModuleBinding.hpp # NativeScript/runtime/Runtime.mm # NativeScript/runtime/URLImpl.cpp # TestRunner/app/tests/URL.js # TestRunner/app/tests/index.js # package.json # v8ios.xcodeproj/project.pbxproj
2 parents 3f44c0b + b12d552 commit d354220

Some content is hidden

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

59 files changed

+6114
-3782
lines changed

.clang-format

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# uses the same styling as V8
2+
BasedOnStyle: Google
3+
DerivePointerAlignment: false
4+
MaxEmptyLinesToKeep: 1

.clang-format-ignore

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# clang format doesn't work properly with * and **
2+
NativeScript/include/*
3+
NativeScript/include/*/*
4+
NativeScript/include/*/*/*
5+
NativeScript/include/*/*/*/*
6+
NativeScript/include/*/*/*/*/*
7+
NativeScript/ada/*
8+
NativeScript/inspector/third_party/*
9+
NativeScript/inspector/third_party/*/*
10+
NativeScript/inspector/third_party/*/*/*
11+
NativeScript/inspector/third_party/*/*/*/*

.github/dependabot.yml

Lines changed: 146 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,146 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: github-actions
4+
directory: /
5+
schedule:
6+
interval: monthly
7+
8+
- package-ecosystem: npm
9+
directory: /AppWithModules/app
10+
schedule:
11+
interval: monthly
12+
time: "23:00"
13+
open-pull-requests-limit: 10
14+
ignore:
15+
- dependency-name: "*"
16+
update-types: ["version-update:semver-major"]
17+
18+
- package-ecosystem: npm
19+
directory: /TestRunner/app
20+
schedule:
21+
interval: monthly
22+
time: "23:00"
23+
open-pull-requests-limit: 10
24+
ignore:
25+
- dependency-name: "*"
26+
update-types: ["version-update:semver-major"]
27+
28+
- package-ecosystem: npm
29+
directory: /TestRunner/app/tests
30+
schedule:
31+
interval: monthly
32+
time: "23:00"
33+
open-pull-requests-limit: 10
34+
ignore:
35+
- dependency-name: "*"
36+
update-types: ["version-update:semver-major"]
37+
38+
- package-ecosystem: npm
39+
directory: /TestRunner/app/tests/shared/Require/PackageJsonApp/io
40+
schedule:
41+
interval: monthly
42+
time: "23:00"
43+
open-pull-requests-limit: 10
44+
ignore:
45+
- dependency-name: "*"
46+
update-types: ["version-update:semver-major"]
47+
48+
- package-ecosystem: npm
49+
directory: /TestRunner/app/tests/shared/Require/PackageJsonAppNoMain/io
50+
schedule:
51+
interval: monthly
52+
time: "23:00"
53+
open-pull-requests-limit: 10
54+
ignore:
55+
- dependency-name: "*"
56+
update-types: ["version-update:semver-major"]
57+
58+
- package-ecosystem: npm
59+
directory: /TestRunner/app/tests/shared/Require/PackageJsonAppWithoutExtension/io
60+
schedule:
61+
interval: monthly
62+
time: "23:00"
63+
open-pull-requests-limit: 10
64+
ignore:
65+
- dependency-name: "*"
66+
update-types: ["version-update:semver-major"]
67+
68+
- package-ecosystem: npm
69+
directory: /TestRunner/app/tests/shared/Require/PackageJsonMainPointsToDir
70+
schedule:
71+
interval: monthly
72+
time: "23:00"
73+
open-pull-requests-limit: 10
74+
ignore:
75+
- dependency-name: "*"
76+
update-types: ["version-update:semver-major"]
77+
78+
- package-ecosystem: npm
79+
directory: /TestRunner/app/tests/shared/Require/PackageJsonSyntaxError/io
80+
schedule:
81+
interval: monthly
82+
time: "23:00"
83+
open-pull-requests-limit: 10
84+
ignore:
85+
- dependency-name: "*"
86+
update-types: ["version-update:semver-major"]
87+
88+
- package-ecosystem: npm
89+
directory: /TestRunner/app/tests/shared/Require/ResolveCanonicalPath
90+
schedule:
91+
interval: monthly
92+
time: "23:00"
93+
open-pull-requests-limit: 10
94+
ignore:
95+
- dependency-name: "*"
96+
update-types: ["version-update:semver-major"]
97+
98+
- package-ecosystem: npm
99+
directory: /TestRunner/app/tests/shared
100+
schedule:
101+
interval: monthly
102+
time: "23:00"
103+
open-pull-requests-limit: 10
104+
ignore:
105+
- dependency-name: "*"
106+
update-types: ["version-update:semver-major"]
107+
108+
- package-ecosystem: npm
109+
directory: /TestRunner/app/tns_modules/dummy-package
110+
schedule:
111+
interval: monthly
112+
time: "23:00"
113+
open-pull-requests-limit: 10
114+
ignore:
115+
- dependency-name: "*"
116+
update-types: ["version-update:semver-major"]
117+
118+
- package-ecosystem: npm
119+
directory: /TestRunner/app/tns_modules/tns-core-modules/shared/Require/PackageJsonTns/io
120+
schedule:
121+
interval: monthly
122+
time: "23:00"
123+
open-pull-requests-limit: 10
124+
ignore:
125+
- dependency-name: "*"
126+
update-types: ["version-update:semver-major"]
127+
128+
- package-ecosystem: npm
129+
directory: /TestRunner/app/tns_modules/tns-core-modules/shared/Require/RequirePriority/dependency5
130+
schedule:
131+
interval: monthly
132+
time: "23:00"
133+
open-pull-requests-limit: 10
134+
ignore:
135+
- dependency-name: "*"
136+
update-types: ["version-update:semver-major"]
137+
138+
- package-ecosystem: npm
139+
directory: /
140+
schedule:
141+
interval: monthly
142+
time: "23:00"
143+
open-pull-requests-limit: 10
144+
ignore:
145+
- dependency-name: "*"
146+
update-types: ["version-update:semver-major"]
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Dependency Review Action
2+
#
3+
# This Action will scan dependency manifest files that change as part of a Pull Request,
4+
# surfacing known-vulnerable versions of the packages declared or updated in the PR.
5+
# Once installed, if the workflow run is marked as required,
6+
# PRs introducing known-vulnerable packages will be blocked from merging.
7+
#
8+
# Source repository: https://github.com/actions/dependency-review-action
9+
name: 'Dependency Review'
10+
on: [pull_request]
11+
12+
permissions:
13+
contents: read
14+
15+
jobs:
16+
dependency-review:
17+
runs-on: ubuntu-latest
18+
steps:
19+
- name: 'Checkout Repository'
20+
uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0
21+
- name: 'Dependency Review'
22+
uses: actions/dependency-review-action@595b5aeba73380359d98a5e087f648dbb0edce1b # v4.7.3

.github/workflows/npm_release.yml

Lines changed: 56 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
on:
22
workflow_dispatch:
3-
branches:
4-
- main
53
push:
64
branches:
75
- main
@@ -20,31 +18,42 @@ jobs:
2018
npm_version: ${{ steps.npm_version_output.outputs.NPM_VERSION }}
2119
npm_tag: ${{ steps.npm_version_output.outputs.NPM_TAG }}
2220
steps:
23-
- uses: maxim-lobanov/setup-xcode@v1
21+
- name: Harden the runner (Audit all outbound calls)
22+
uses: step-security/harden-runner@ec9f2d5744a09debf3a187a3f4f675c53b671911 # v2.13.0
23+
with:
24+
egress-policy: audit
25+
- uses: maxim-lobanov/setup-xcode@60606e260d2fc5762a71e64e74b2174e8ea3c8bd # v1.6.0
2426
with:
2527
xcode-version: ${{env.XCODE_VERSION}}
26-
- uses: actions/checkout@v3
28+
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
2729
with:
2830
fetch-depth: 0
2931
- name: LLVM cache
30-
uses: actions/cache@v3
32+
uses: actions/cache@2f8e54208210a422b2efd51efaa6bd6d7ca8920f # v3.4.3
3133
with:
3234
path: ./llvm
3335
key: ${{ hashFiles('download_llvm.sh') }}
34-
- uses: actions/setup-node@v3
36+
- uses: actions/setup-node@3235b876344d2a9aa001b8d1453c930bba69e610 # v3.9.1
3537
with:
3638
node-version: 20
3739
registry-url: "https://registry.npmjs.org"
3840
- name: Install Python
39-
uses: actions/setup-python@v4
41+
uses: actions/setup-python@7f4fc3e22c37d6ff65e88745f38bd3157c663f7c # v4.9.1
4042
with:
4143
python-version: "3"
4244
- name: Install Dependencies
4345
run: |
4446
npm install
4547
python3 -m pip install --upgrade pip six
46-
brew install cmake
47-
[ ! -f /usr/local/bin/cmake ] && ln -s /usr/local/bin/cmake $(which cmake) || true
48+
# Ensure CMake is available without conflicting with pinned Homebrew formula
49+
if ! command -v cmake >/dev/null; then
50+
brew list cmake || brew install cmake
51+
fi
52+
# Some scripts expect cmake at /usr/local/bin; create a shim if needed
53+
if [ ! -x /usr/local/bin/cmake ]; then
54+
sudo mkdir -p /usr/local/bin
55+
sudo ln -sf "$(command -v cmake)" /usr/local/bin/cmake
56+
fi
4857
- name: Get Current Version
4958
run: |
5059
NPM_VERSION=$(node -e "console.log(require('./package.json').version);")
@@ -64,12 +73,12 @@ jobs:
6473
- name: Build
6574
run: npm run build-ios
6675
- name: Upload npm package artifact
67-
uses: actions/upload-artifact@v3
76+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
6877
with:
6978
name: npm-package
7079
path: dist/akylas-nativescript-ios-runtime-${{steps.npm_version_output.outputs.NPM_VERSION}}.tgz
7180
- name: Upload dSYMs artifact
72-
uses: actions/upload-artifact@v3
81+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
7382
with:
7483
name: NativeScript-dSYMs
7584
path: dist/dSYMs
@@ -78,28 +87,39 @@ jobs:
7887
runs-on: macos-14
7988
needs: build
8089
steps:
81-
- uses: maxim-lobanov/setup-xcode@v1
90+
- name: Harden the runner (Audit all outbound calls)
91+
uses: step-security/harden-runner@ec9f2d5744a09debf3a187a3f4f675c53b671911 # v2.13.0
92+
with:
93+
egress-policy: audit
94+
- uses: maxim-lobanov/setup-xcode@60606e260d2fc5762a71e64e74b2174e8ea3c8bd # v1.6.0
8295
with:
8396
xcode-version: ${{env.XCODE_VERSION}}
84-
- uses: actions/checkout@v3
97+
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
8598
- name: LLVM cache
86-
uses: actions/cache@v3
99+
uses: actions/cache@2f8e54208210a422b2efd51efaa6bd6d7ca8920f # v3.4.3
87100
with:
88101
path: ./llvm
89102
key: ${{ hashFiles('download_llvm.sh') }}
90-
- uses: actions/setup-node@v3
103+
- uses: actions/setup-node@3235b876344d2a9aa001b8d1453c930bba69e610 # v3.9.1
91104
with:
92105
node-version: 20
93106
- name: Install Python
94-
uses: actions/setup-python@v4
107+
uses: actions/setup-python@7f4fc3e22c37d6ff65e88745f38bd3157c663f7c # v4.9.1
95108
with:
96109
python-version: "3"
97110
- name: Install Dependencies
98111
run: |
99112
npm install
100113
python3 -m pip install --upgrade pip six
101-
brew install cmake
102-
[ ! -f /usr/local/bin/cmake ] && ln -s /usr/local/bin/cmake $(which cmake) || true
114+
# Ensure CMake is available without conflicting with pinned Homebrew formula
115+
if ! command -v cmake >/dev/null; then
116+
brew list cmake || brew install cmake
117+
fi
118+
# Some scripts expect cmake at /usr/local/bin; create a shim if needed
119+
if [ ! -x /usr/local/bin/cmake ]; then
120+
sudo mkdir -p /usr/local/bin
121+
sudo ln -sf "$(command -v cmake)" /usr/local/bin/cmake
122+
fi
103123
brew install chargepoint/xcparse/xcparse
104124
npm install -g @edusperoni/junit-cli-report-viewer verify-junit-xml
105125
- name: Prepare
@@ -109,7 +129,7 @@ jobs:
109129
mkdir -p dist-test
110130
echo TEST_FOLDER=$(pwd)/dist-test >> $GITHUB_ENV
111131
- name: Xcode Tests
112-
uses: nick-fields/retry@v2
132+
uses: nick-fields/retry@14672906e672a08bd6eeb15720e9ed3ce869cdd4 # v2.9.0
113133
# try to run the tests with xcpretty. If it fails then try again without xcpretty twice for better log output
114134
# the xcode tests are a bit flaky and they should never fail on this step, as this step only collects the JS test results as junit xml
115135
with:
@@ -125,7 +145,7 @@ jobs:
125145
find $TEST_FOLDER/test-out -name "*junit*.xml" -maxdepth 1 -print0 | xargs -n 1 -0 npx verify-junit-xml
126146
- name: Archive Test Result Data
127147
if: always()
128-
uses: actions/upload-artifact@v3
148+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
129149
with:
130150
name: test-results
131151
path: ${{env.TEST_FOLDER}}/test_results.xcresult
@@ -141,11 +161,15 @@ jobs:
141161
NPM_VERSION: ${{needs.build.outputs.npm_version}}
142162
NPM_TAG: ${{needs.build.outputs.npm_tag}}
143163
steps:
144-
- uses: actions/setup-node@v3
164+
- name: Harden the runner (Audit all outbound calls)
165+
uses: step-security/harden-runner@ec9f2d5744a09debf3a187a3f4f675c53b671911 # v2.13.0
166+
with:
167+
egress-policy: audit
168+
- uses: actions/setup-node@3235b876344d2a9aa001b8d1453c930bba69e610 # v3.9.1
145169
with:
146170
node-version: 20
147171
registry-url: "https://registry.npmjs.org"
148-
- uses: actions/download-artifact@v3
172+
- uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e # v4.1.7
149173
with:
150174
name: npm-package
151175
path: dist
@@ -167,19 +191,23 @@ jobs:
167191
env:
168192
NPM_VERSION: ${{needs.build.outputs.npm_version}}
169193
steps:
170-
- uses: actions/checkout@v3
194+
- name: Harden the runner (Audit all outbound calls)
195+
uses: step-security/harden-runner@ec9f2d5744a09debf3a187a3f4f675c53b671911 # v2.13.0
196+
with:
197+
egress-policy: audit
198+
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
171199
with:
172200
fetch-depth: 0
173-
- uses: actions/setup-node@v3
201+
- uses: actions/setup-node@3235b876344d2a9aa001b8d1453c930bba69e610 # v3.9.1
174202
with:
175203
node-version: 20
176204
- name: Setup
177205
run: npm install
178-
- uses: actions/download-artifact@v3
206+
- uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e # v4.1.7
179207
with:
180208
name: npm-package
181209
path: dist
182-
- uses: actions/download-artifact@v3
210+
- uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e # v4.1.7
183211
with:
184212
name: NativeScript-dSYMs
185213
path: dist/dSYMs
@@ -188,8 +216,9 @@ jobs:
188216
run: find . -maxdepth 1 -name '*.dSYM' -print | xargs -I@ zip -r @.zip @
189217
- name: Partial Changelog
190218
run: npx conventional-changelog -p angular -r2 > body.md
191-
- uses: ncipollo/release-action@v1
219+
- uses: ncipollo/release-action@b7eabc95ff50cbeeedec83973935c8f306dfcd0b # v1.20.0
192220
with:
193221
artifacts: "dist/akylas-nativescript-ios-runtime-*.tgz,dist/dSYMs/*.zip"
194222
bodyFile: "body.md"
195223
prerelease: ${{needs.build.outputs.npm_tag != 'latest'}}
224+
allowUpdates: true

0 commit comments

Comments
 (0)