Skip to content
This repository was archived by the owner on Aug 7, 2021. It is now read-only.

fix: resolve appComponents and xml namespaces absolute paths on Windows #578

Merged
merged 20 commits into from
Jun 26, 2018

Conversation

vchimev
Copy link
Contributor

@vchimev vchimev commented Jun 21, 2018

Fixes #573.

@vchimev vchimev force-pushed the vchimev/component-resolve-windows branch from 78305d6 to adb67b4 Compare June 21, 2018 21:59
@vchimev vchimev requested a review from sis0k0 June 21, 2018 22:00
@vchimev vchimev self-assigned this Jun 21, 2018
@vchimev vchimev requested a review from manoldonev June 22, 2018 05:52
@vchimev vchimev force-pushed the vchimev/component-resolve-windows branch 2 times, most recently from 2d06055 to ba89c28 Compare June 22, 2018 13:39
this.cacheable();
const { modules } = this.query;
const imports = modules.map(m => `require("${m}");`).join("\n");
const imports = modules.map(m => convertSlashesInPath(m))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

.map(m => convertSlashesInPath(m)) can be simplified to .map(convertSlashesInPath)

@@ -0,0 +1,2 @@
/// <reference path="./node_modules/tns-platform-declarations/ios.d.ts" />
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this needed?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because of native API - otherwise, transpilation fails.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cast to any? I mean, it's a test app.

@@ -0,0 +1,35 @@
let frame = require("ui/frame");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

const

@@ -0,0 +1,35 @@
let frame = require("ui/frame");

let superProto = android.app.Activity.prototype;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

const

let frame = require("ui/frame");

let superProto = android.app.Activity.prototype;
let Activity = android.app.Activity.extend("org.myApp.MainActivity", {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

const. Maybe it's not even needed to assign this to a variable.

@@ -0,0 +1,16 @@
var superProto = android.app.Application.prototype;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

const

@@ -0,0 +1,16 @@
var superProto = android.app.Application.prototype;
// the first parameter of the `extend` call defines the package and the name for the native *.JAVA file generated.
var Application = android.app.Application.extend("org.myApp.Application", {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same comment as for the activity

@@ -0,0 +1,18 @@
// the `JavaProxy` decorator specifies the package and the name for the native *.JAVA file generated.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove the comments.

@@ -67,6 +68,11 @@ module.exports = function(source) {
parser.parse(source);

const moduleRegisters = namespaces
.map(function (n) {
let obj = n;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This variable is not needed. Also extract that function.

vchimev added 3 commits June 25, 2018 22:10
The nativescript-dev-appium plugin gets it automatically, no need to declare it in the `appium.capabilities.json` file.
@vchimev vchimev force-pushed the vchimev/component-resolve-windows branch from aef8202 to bbb9716 Compare June 25, 2018 19:10
@vchimev vchimev merged commit 14de7e1 into master Jun 26, 2018
@RoyiNamir
Copy link

@sis0k0 @vchimev
Hi.How can we know to which version is it merged to ?
I mean - say I want to use this merged fix - what should I install ? which version ?

@sis0k0
Copy link
Contributor

sis0k0 commented Jul 2, 2018

Hi, @RoyiNamir! For this plugin, usually the best place is the changelog.

@RoyiNamir
Copy link

RoyiNamir commented Jul 2, 2018

@sis0k0 Hey :) Thanks for the info 👍 . (So I guess there's still a problem) after the merge .

@sis0k0
Copy link
Contributor

sis0k0 commented Jul 2, 2018

No problem :) We'll investigate the issue you opened.

@vchimev vchimev deleted the vchimev/component-resolve-windows branch December 17, 2018 16:01
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants