8000 Merge pull request #7839 from NativeScript/merge-release-in-master · NativeScript/NativeScript@3b57851 · GitHub
[go: up one dir, main page]

Skip to content

Commit 3b57851

Browse files
Merge pull request #7839 from NativeScript/merge-release-in-master
chore: merge release in master
2 parents 4f421ff + e6c7e0c commit 3b57851

File tree

14 files changed

+216
-788
lines changed

14 files changed

+216
-788
lines changed

CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
## [6.1.1](https://github.com/NativeScript/NativeScript/compare/6.1.0...6.1.1) (2019-09-11)
2+
3+
4+
### Bug Fixes
5+
6+
* **android-list-picker:** NoSuchFieldException on api29 ([#7790](https://github.com/NativeScript/NativeScript/issues/7790)) ([997d6de](https://github.com/NativeScript/NativeScript/commit/997d6de))
7+
* **css-calc:** reduce_css_calc_1.default is not a function ([#7787](https://github.com/NativeScript/NativeScript/issues/7787)) ([#7801](https://github.com/NativeScript/NativeScript/issues/7801)) ([20c0773](https://github.com/NativeScript/NativeScript/commit/20c0773))
8+
9+
10+
111
<a name="6.1.0"></a>
212
# [6.1.0](https://github.com/NativeScript/NativeScript/compare/6.0.7...6.1.0) (2019-09-02)
313

build/clear-private-definitions.js

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
const path = require("path");
2+
const fs = require("fs");
3+
const readdirp = require("readdirp");
4+
5+
const inputFolder = path.resolve(process.argv[2]);
6+
7+
console.log(`Clearing private definitions in ${inputFolder}`);
8+
9+
function filterTypeScriptFiles(content) {
10+
var leadingPrivate = /^.*@private/ig;
11+
if (leadingPrivate.test(content)) {
12+
return { shouldDelete: true };
13+
}
14+
15+
let blockCommentPrivate = /\/\*\*([^](?!\*\/))*@module([^](?!\*\/))*@private[^]*?\*\//g;
16+
if (blockCommentPrivate.test(content)) {
17+
return { shouldDelete: true };
18+
}
19+
20+
let newContent = content;
21+
newContent = newContent.replace(/\/\/[\/\s]*@private[^]*?\/\/[\/\s]*?@endprivate/gm, "");
22+
23+
if (newContent !== content) {
24+
return { shouldReplace: true, newContent: newContent };
25+
}
26+
27+
return { shouldReplace: false, shouldDelete: false };
28+
};
29+
30+
readdirp(inputFolder, {
31+
fileFilter: ["*.d.ts"],
32+
directoryFilter: function (di) { return !di.path.includes("node_modules"); }
33+
}).on("data", (entry) => {
34+
const { fullPath } = entry;
35+
const content = fs.readFileSync(fullPath, "utf8");
36+
const { shouldDelete, shouldReplace, newContent } = filterTypeScriptFiles(content);
37+
38+
if (shouldDelete) {
39+
console.log("[Delete]", fullPath)
40+
fs.unlinkSync(fullPath);
41+
} else if (shouldReplace) {
42+
console.log("[Cleared]", fullPath)
43+
fs.writeFileSync(fullPath, newContent, "utf8", (err) => {
44+
console.log("ERROR writing file: " + fullPath, error);
45+
})
46+
}
47+
})
48+
.on("warn", error => console.error("non-fatal error", error))
49+
.on("error", error => console.error("fatal error", error))
50+
.on("end", () => console.log("done"));
51+

build/create-release-changelog-pr.js

Lines changed: 0 additions & 18 deletions
This file was deleted.

build/pack-dist.sh

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
#!/bin/bash
2+
set -x
3+
set -e
4+
5+
DIST=dist;
6+
ROOT_DIR=$(cd `dirname $0` && pwd)/..;
7+
cd "$ROOT_DIR"
8+
9+
(
10+
cd "$DIST/tns-platform-declarations"
11+
TGZ="$(npm pack)"
12+
mv "$TGZ" "../$TGZ"
13+
)
14+
15+
(
16+
cd "$DIST/tns-core-modules"
17+
TGZ="$(npm pack)"
18+
mv "$TGZ" "../$TGZ"
19+
)

build/prepare-dist.sh

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
#!/bin/bash
2+
set -x
3+
set -e
4+
5+
DIST=dist;
6+
ROOT_DIR=$(cd `dirname $0` && pwd)/..;
7+
cd "$ROOT_DIR"
8+
9+
mkdir -p "$DIST"
10+
11+
## NPM INSTALL
12+
(
13+
echo "NPM install in root of the repo"
14+
cd "$ROOT_DIR"
15+
npm install
16+
)
17+
18+
## Prepare Platfrom Declarations
19+
(
20+
PACKAGE=tns-platform-declarations;
21+
22+
echo "Clearing $DIST/$PACKAGE"
23+
npx rimraf "$DIST/$PACKAGE"
24+
npx rimraf "$DIST/$PACKAGE*.tgz"
25+
26+
echo "Copying $PACKAGE $DIST/$PACKAGE..."
27+
npx ncp "$PACKAGE" "$DIST/$PACKAGE"
28+
29+
echo "Copying README and LICENSE to $DIST/$PACKAGE"
30+
npx ncp LICENSE "$DIST/$PACKAGE"/LICENSE
31+
32+
cd "$DIST/$PACKAGE"
33+
34+
echo 'Running npm install...'
35+
npm install
36+
37+
echo 'Running npm test...'
38+
npm test
39+
)
40+
41+
## Prepare Core Modules
42+
(
43+
PACKAGE=tns-core-modules;
44+
45+
echo "Clearing $DIST/$PACKAGE"
46+
npx rimraf "$DIST/$PACKAGE"
47+
npx rimraf "$DIST/$PACKAGE*.tgz"
48+
49+
echo "Copying $PACKAGE $DIST/$PACKAGE..."
50+
npx ncp "$PACKAGE" "$DIST/$PACKAGE"
51+
52+
echo "Cleaning inner readme.md-s ..."
53+
npx rimraf "$DIST/$PACKAGE/**/README.md"
54+
npx rimraf "$DIST/$PACKAGE/**/Readme.md"
55+
56+
echo "Copying README and LICENSE to $DIST/$PACKAGE"
57+
npx ncp LICENSE "$DIST"/"$PACKAGE"/LICENSE
58+
npx ncp README.md "$DIST"/"$PACKAGE"/README.md
59+
60+
(
61+
echo 'TypeScript transpile...'
62+
cd "$DIST/$PACKAGE"
63+
npm install
64+
npx tsc
65+
)
66+
67+
echo "Clearing typescript definitions from private APIs..."
68+
node build/clear-private-definitions "$DIST/$PACKAGE"
69+
)

0 commit comments

Comments
 (0)
0