Skip to content

chore: merge release into master #5041

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Sep 27, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/man_pages/project/creation/create.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ Template | Command
`Angular - Tabs` | tns create --template tns-template-tab-navigation-ng
`Vue.js - Blank`, `--vue`, `--vuejs` | tns create --template tns-template-blank-vue
`Vue.js - SideDrawer`, | tns create --template tns-template-drawer-navigation-vue
`Vue.js - Tabs` | tns create --template tns-template-tab-navigation-vue

### Related Commands

Expand Down
5 changes: 5 additions & 0 deletions lib/commands/create-project.ts
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,11 @@ or --js flags.)
key: CreateProjectCommand.DrawerTemplateKey,
value: "tns-template-drawer-navigation-vue",
description: CreateProjectCommand.DrawerTemplateDescription
},
{
key: CreateProjectCommand.TabsTemplateKey,
value: "tns-template-tab-navigation-vue",
description: CreateProjectCommand.TabsTemplateDescription
}];

return templates;
Expand Down
4 changes: 2 additions & 2 deletions lib/common/test/unit-tests/logger.ts
Original file line number Diff line number Diff line change
Expand Up @@ -162,14 +162,14 @@ describe("logger", () => {
[undefined, null, false, "string value", 42, { obj: 1 }, ["string value 1", "string value 2"]].forEach(value => {
it(`handles formatted message with '${value}' value in one of the args`, () => {
logger.info("test %s", value);
assert.equal(outputs.info, `test ${value}`);
assert.equal(outputs.info, util.format("test %s", value));
assert.deepEqual(outputs.context, {}, "Nothing should be added to logger context.");
assert.deepEqual(outputs.removedContext, {}, "Removed context should be empty.");
});

it(`handles formatted message with '${value}' value in one of the args and additional values passed to context`, () => {
logger.info("test %s", value, { [LoggerConfigData.skipNewLine]: true });
assert.equal(outputs.info, `test ${value}`);
assert.equal(outputs.info, util.format("test %s", value));
assert.deepEqual(outputs.context, { [LoggerConfigData.skipNewLine]: true }, `${LoggerConfigData.skipNewLine} should be set with value true.`);
assert.deepEqual(outputs.removedContext, { [LoggerConfigData.skipNewLine]: true }, `Removed context should contain ${LoggerConfigData.skipNewLine}`);
});
Expand Down
17 changes: 8 additions & 9 deletions test/project-commands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,14 @@ const expectedFlavorChoices = [
{ key: "Plain TypeScript", description: "Learn more at https://nativescript.org/typescript" },
{ key: "Plain JavaScript", description: "Use NativeScript without any framework" }
];
const expectedTemplateChoices = [
{ key: "Hello World", description: "A Hello World app" },
{ key: "SideDrawer", description: "An app with pre-built pages that uses a drawer for navigation" },
{ key: "Tabs", description: "An app with pre-built pages that uses tabs for navigation" }
];
const expectedTemplateChoicesVue = [
{ key: "Blank", description: "A blank app" },
{ key: "SideDrawer", description: "An app with pre-built pages that uses a drawer for navigation" }
];
const templateChoises = {
helloWorld: { key: "Hello World", description: "A Hello World app" },
blank: { key: "Blank", description: "A blank app" },
sideDrawer: { key: "SideDrawer", description: "An app with pre-built pages that uses a drawer for navigation" },
tabs: { key: "Tabs", description: "An app with pre-built pages that uses tabs for navigation" }
};
const expectedTemplateChoices = [templateChoises.helloWorld, templateChoises.sideDrawer, templateChoises.tabs];
const expectedTemplateChoicesVue = [templateChoises.blank, templateChoises.sideDrawer, templateChoises.tabs];

class ProjectServiceMock implements IProjectService {
async validateProjectName(opts: { projectName: string, force: boolean, pathToProject: string }): Promise<string> {
Expand Down