diff --git a/generators/app/templates/ext-colortheme/github/workflows/publish.yml b/generators/app/templates/ext-colortheme/github/workflows/publish.yml index 42dbc6e3..2d76273c 100644 --- a/generators/app/templates/ext-colortheme/github/workflows/publish.yml +++ b/generators/app/templates/ext-colortheme/github/workflows/publish.yml @@ -16,10 +16,9 @@ jobs: tag=${GITHUB_REF#refs/tags/} echo "Setting package version $tag" npm --no-git-tag-version version "$tag" - npm install -g vsce - vsce package + npx vsce package - name: Publish extension to marketplace env: AZURE_TOKEN: ${{ secrets.AZURE_TOKEN }} run: | - vsce publish -p "$AZURE_TOKEN" + npx vsce publish -p "$AZURE_TOKEN" diff --git a/generators/app/templates/ext-colortheme/package.json b/generators/app/templates/ext-colortheme/package.json index 6d6dfda0..ae74586c 100644 --- a/generators/app/templates/ext-colortheme/package.json +++ b/generators/app/templates/ext-colortheme/package.json @@ -2,7 +2,7 @@ "name": <%- JSON.stringify(name) %>, "displayName": <%- JSON.stringify(displayName) %>, "description": <%- JSON.stringify(description) %>, - "version": "0.0.1", + "version": "<% if (gitHubWorkFlowInit) { %>0.0.0<% } else { %>0.0.1<% } %>", "engines": { "vscode": <%- JSON.stringify(vsCodeEngine) %> }, @@ -18,4 +18,4 @@ } ] } -} \ No newline at end of file +} diff --git a/generators/app/templates/ext-command-js/github/workflows/test-publish.yml b/generators/app/templates/ext-command-js/github/workflows/test-publish.yml index 9f82a746..35d9ee86 100644 --- a/generators/app/templates/ext-command-js/github/workflows/test-publish.yml +++ b/generators/app/templates/ext-command-js/github/workflows/test-publish.yml @@ -43,10 +43,9 @@ jobs: tag=${GITHUB_REF#refs/tags/} echo "Setting package version $tag" npm --no-git-tag-version version "$tag" - npm install -g vsce - vsce package + npx vsce package - name: Publish extension to marketplace env: AZURE_TOKEN: ${{ secrets.AZURE_TOKEN }} run: | - vsce publish -p "$AZURE_TOKEN" + npx vsce publish -p "$AZURE_TOKEN" diff --git a/generators/app/templates/ext-command-js/package.json b/generators/app/templates/ext-command-js/package.json index a75820d0..75db9958 100644 --- a/generators/app/templates/ext-command-js/package.json +++ b/generators/app/templates/ext-command-js/package.json @@ -2,7 +2,7 @@ "name": <%- JSON.stringify(name) %>, "displayName": <%- JSON.stringify(displayName) %>, "description": <%- JSON.stringify(description) %>, - "version": "0.0.1", + "version": "<% if (gitHubWorkFlowInit) { %>0.0.0<% } else { %>0.0.1<% } %>", "engines": { "vscode": <%- JSON.stringify(vsCodeEngine) %> }, diff --git a/generators/app/templates/ext-command-ts/github/workflows/test-publish.yml b/generators/app/templates/ext-command-ts/github/workflows/test-publish.yml index 9f82a746..35d9ee86 100644 --- a/generators/app/templates/ext-command-ts/github/workflows/test-publish.yml +++ b/generators/app/templates/ext-command-ts/github/workflows/test-publish.yml @@ -43,10 +43,9 @@ jobs: tag=${GITHUB_REF#refs/tags/} echo "Setting package version $tag" npm --no-git-tag-version version "$tag" - npm install -g vsce - vsce package + npx vsce package - name: Publish extension to marketplace env: AZURE_TOKEN: ${{ secrets.AZURE_TOKEN }} run: | - vsce publish -p "$AZURE_TOKEN" + npx vsce publish -p "$AZURE_TOKEN" diff --git a/generators/app/templates/ext-command-ts/package.json b/generators/app/templates/ext-command-ts/package.json index 16d870fd..3f8f0631 100644 --- a/generators/app/templates/ext-command-ts/package.json +++ b/generators/app/templates/ext-command-ts/package.json @@ -2,7 +2,7 @@ "name": <%- JSON.stringify(name) %>, "displayName": <%- JSON.stringify(displayName) %>, "description": <%- JSON.stringify(description) %>, - "version": "0.0.1", + "version": "<% if (gitHubWorkFlowInit) { %>0.0.0<% } else { %>0.0.1<% } %>", "engines": { "vscode": <%- JSON.stringify(vsCodeEngine) %> }, diff --git a/generators/app/templates/ext-extensionpack/github/workflows/publish.yml b/generators/app/templates/ext-extensionpack/github/workflows/publish.yml index 42dbc6e3..2d76273c 100644 --- a/generators/app/templates/ext-extensionpack/github/workflows/publish.yml +++ b/generators/app/templates/ext-extensionpack/github/workflows/publish.yml @@ -16,10 +16,9 @@ jobs: tag=${GITHUB_REF#refs/tags/} echo "Setting package version $tag" npm --no-git-tag-version version "$tag" - npm install -g vsce - vsce package + npx vsce package - name: Publish extension to marketplace env: AZURE_TOKEN: ${{ secrets.AZURE_TOKEN }} run: | - vsce publish -p "$AZURE_TOKEN" + npx vsce publish -p "$AZURE_TOKEN" diff --git a/generators/app/templates/ext-extensionpack/package.json b/generators/app/templates/ext-extensionpack/package.json index 7091963e..2d6b3bc9 100644 --- a/generators/app/templates/ext-extensionpack/package.json +++ b/generators/app/templates/ext-extensionpack/package.json @@ -2,7 +2,7 @@ "name": <%- JSON.stringify(name) %>, "displayName": <%- JSON.stringify(displayName) %>, "description": <%- JSON.stringify(description) %>, - "version": "0.0.1", + "version": "<% if (gitHubWorkFlowInit) { %>0.0.0<% } else { %>0.0.1<% } %>", "engines": { "vscode": <%- JSON.stringify(vsCodeEngine) %> }, @@ -13,4 +13,4 @@ "<%- extensionList[i] %>", <%}%> "<%- extensionList[extensionList.length-1]%>" ] -} \ No newline at end of file +} diff --git a/generators/app/templates/ext-keymap/github/workflows/publish.yml b/generators/app/templates/ext-keymap/github/workflows/publish.yml index 42dbc6e3..2d76273c 100644 --- a/generators/app/templates/ext-keymap/github/workflows/publish.yml +++ b/generators/app/templates/ext-keymap/github/workflows/publish.yml @@ -16,10 +16,9 @@ jobs: tag=${GITHUB_REF#refs/tags/} echo "Setting package version $tag" npm --no-git-tag-version version "$tag" - npm install -g vsce - vsce package + npx vsce package - name: Publish extension to marketplace env: AZURE_TOKEN: ${{ secrets.AZURE_TOKEN }} run: | - vsce publish -p "$AZURE_TOKEN" + npx vsce publish -p "$AZURE_TOKEN" diff --git a/generators/app/templates/ext-keymap/package.json b/generators/app/templates/ext-keymap/package.json index b7971900..c6edbfaf 100644 --- a/generators/app/templates/ext-keymap/package.json +++ b/generators/app/templates/ext-keymap/package.json @@ -2,7 +2,7 @@ "name": <%- JSON.stringify(name) %>, "displayName": <%- JSON.stringify(displayName) %>, "description": <%- JSON.stringify(description) %>, - "version": "0.0.1", + "version": "<% if (gitHubWorkFlowInit) { %>0.0.0<% } else { %>0.0.1<% } %>", "engines": { "vscode": <%- JSON.stringify(vsCodeEngine) %> }, @@ -17,4 +17,4 @@ } ] } -} \ No newline at end of file +} diff --git a/generators/app/templates/ext-language/github/workflows/publish.yml b/generators/app/templates/ext-language/github/workflows/publish.yml index 42dbc6e3..2d76273c 100644 --- a/generators/app/templates/ext-language/github/workflows/publish.yml +++ b/generators/app/templates/ext-language/github/workflows/publish.yml @@ -16,10 +16,9 @@ jobs: tag=${GITHUB_REF#refs/tags/} echo "Setting package version $tag" npm --no-git-tag-version version "$tag" - npm install -g vsce - vsce package + npx vsce package - name: Publish extension to marketplace env: AZURE_TOKEN: ${{ secrets.AZURE_TOKEN }} run: | - vsce publish -p "$AZURE_TOKEN" + npx vsce publish -p "$AZURE_TOKEN" diff --git a/generators/app/templates/ext-language/package.json b/generators/app/templates/ext-language/package.json index f344cb3d..e4fb60b3 100644 --- a/generators/app/templates/ext-language/package.json +++ b/generators/app/templates/ext-language/package.json @@ -2,7 +2,7 @@ "name": <%- JSON.stringify(name) %>, "displayName": <%- JSON.stringify(displayName) %>, "description": <%- JSON.stringify(description) %>, - "version": "0.0.1", + "version": "<% if (gitHubWorkFlowInit) { %>0.0.0<% } else { %>0.0.1<% } %>", "engines": { "vscode": <%- JSON.stringify(vsCodeEngine) %> }, @@ -22,4 +22,4 @@ "path": <%- JSON.stringify("./syntaxes/" + languageFileName) %> }] } -} \ No newline at end of file +} diff --git a/generators/app/templates/ext-localization/github/workflows/publish.yml b/generators/app/templates/ext-localization/github/workflows/publish.yml index 42dbc6e3..2d76273c 100644 --- a/generators/app/templates/ext-localization/github/workflows/publish.yml +++ b/generators/app/templates/ext-localization/github/workflows/publish.yml @@ -16,10 +16,9 @@ jobs: tag=${GITHUB_REF#refs/tags/} echo "Setting package version $tag" npm --no-git-tag-version version "$tag" - npm install -g vsce - vsce package + npx vsce package - name: Publish extension to marketplace env: AZURE_TOKEN: ${{ secrets.AZURE_TOKEN }} run: | - vsce publish -p "$AZURE_TOKEN" + npx vsce publish -p "$AZURE_TOKEN" diff --git a/generators/app/templates/ext-localization/package.json b/generators/app/templates/ext-localization/package.json index dda55e0a..e80ab860 100644 --- a/generators/app/templates/ext-localization/package.json +++ b/generators/app/templates/ext-localization/package.json @@ -2,7 +2,7 @@ "name": <%- JSON.stringify(name) %>, "displayName": <%- JSON.stringify(displayName) %>, "description": <%- JSON.stringify(description) %>, - "version": "0.0.1", + "version": "<% if (gitHubWorkFlowInit) { %>0.0.0<% } else { %>0.0.1<% } %>", "engines": { "vscode": <%- JSON.stringify(vsCodeEngine) %> }, diff --git a/generators/app/templates/ext-snippets/github/workflows/publish.yml b/generators/app/templates/ext-snippets/github/workflows/publish.yml index 42dbc6e3..2d76273c 100644 --- a/generators/app/templates/ext-snippets/github/workflows/publish.yml +++ b/generators/app/templates/ext-snippets/github/workflows/publish.yml @@ -16,10 +16,9 @@ jobs: tag=${GITHUB_REF#refs/tags/} echo "Setting package version $tag" npm --no-git-tag-version version "$tag" - npm install -g vsce - vsce package + npx vsce package - name: Publish extension to marketplace env: AZURE_TOKEN: ${{ secrets.AZURE_TOKEN }} run: | - vsce publish -p "$AZURE_TOKEN" + npx vsce publish -p "$AZURE_TOKEN" diff --git a/generators/app/templates/ext-snippets/package.json b/generators/app/templates/ext-snippets/package.json index 7f944e49..896cd398 100644 --- a/generators/app/templates/ext-snippets/package.json +++ b/generators/app/templates/ext-snippets/package.json @@ -2,7 +2,7 @@ "name": <%- JSON.stringify(name) %>, "displayName": <%- JSON.stringify(displayName) %>, "description": <%- JSON.stringify(description) %>, - "version": "0.0.1", + "version": "<% if (gitHubWorkFlowInit) { %>0.0.0<% } else { %>0.0.1<% } %>", "engines": { "vscode": <%- JSON.stringify(vsCodeEngine) %> }, diff --git a/test/test.js b/test/test.js index 2b4e8939..a74719ff 100644 --- a/test/test.js +++ b/test/test.js @@ -66,7 +66,7 @@ describe('test code generator', function () { "name": "testTheme", "displayName": "Test Theme", "description": "My TestTheme", - "version": "0.0.1", + "version": "0.0.0", "engines": { "vscode": engineVersion }, @@ -125,6 +125,7 @@ describe('test code generator', function () { description: 'My TestTheme', themeName: 'Green', themeBase: 'vs-dark', + gitHubWorkFlowInit: false, }) // Mock the prompt answers .toPromise().then(function () { var expectedPackageJSON = { @@ -190,6 +191,7 @@ describe('test code generator', function () { description: 'Theme SeventyFour', themeName: 'Theme 74', themeBase: 'vs-dark', + gitHubWorkFlowInit: false, }) // Mock the prompt answers .toPromise().then(function () { var expectedPackageJSON = { @@ -273,6 +275,7 @@ describe('test code generator', function () { description: 'My TestTheme', themeName: 'Funky', themeBase: 'vs', + gitHubWorkFlowInit: false, }) // Mock the prompt answers .toPromise().then(function () { var expectedPackageJSON = { @@ -330,14 +333,14 @@ describe('test code generator', function () { languageName: 'ANT', languageScopeName: 'text.xml.ant', languageExtensions: '.ant', - gitHubWorkFlowInit: true + gitHubWorkFlowInit: true, }) // Mock the prompt answers .toPromise().then(function () { var expected = { "name": "testLan", "displayName": "Test Lan", "description": "My TestLan", - "version": "0.0.1", + "version": "0.0.0", "engines": { "vscode": engineVersion }, @@ -385,7 +388,8 @@ describe('test code generator', function () { languageId: 'foo', languageName: 'FOO', languageScopeName: 'source.foo', - languageExtensions: '.foo' + languageExtensions: '.foo', + gitHubWorkFlowInit: false, }) // Mock the prompt answers .toPromise().then(function () { var expected = { @@ -440,7 +444,8 @@ describe('test code generator', function () { languageId: 'crusty', languageName: 'Crusty', languageScopeName: 'source.crusty', - languageExtensions: '.crusty' + languageExtensions: '.crusty', + gitHubWorkFlowInit: false, }) // Mock the prompt answers .toPromise().then(function () { var expected = { @@ -500,14 +505,14 @@ describe('test code generator', function () { displayName: 'Test Snip', description: 'My TestSnip', languageId: 'python', - gitHubWorkFlowInit: true + gitHubWorkFlowInit: true, }) // Mock the prompt answers .toPromise().then(function () { var expected = { "name": "testSnip", "displayName": 'Test Snip', "description": "My TestSnip", - "version": "0.0.1", + "version": "0.0.0", "engines": { "vscode": engineVersion }, @@ -547,7 +552,8 @@ describe('test code generator', function () { name: 'testSnip', displayName: 'Test Snip', description: 'My TestSnip', - languageId: 'python' + languageId: 'python', + gitHubWorkFlowInit: false, }) // Mock the prompt answers .toPromise().then(function () { var expected = { @@ -623,14 +629,14 @@ describe('test code generator', function () { name: 'testKeym', displayName: 'Test Keym', description: 'My TestKeym', - gitHubWorkFlowInit: true + gitHubWorkFlowInit: true, }) // Mock the prompt answers .toPromise().then(function () { var expected = { "name": "testKeym", "displayName": 'Test Keym', "description": "My TestKeym", - "version": "0.0.1", + "version": "0.0.0", "engines": { "vscode": engineVersion }, @@ -670,15 +676,15 @@ describe('test code generator', function () { displayName: 'Test Com', description: 'My TestCom', gitInit: true, + pkgManager: 'npm', gitHubWorkFlowInit: true, - pkgManager: 'npm' }) // Mock the prompt answers .toPromise().then(function () { var expectedPackageJSON = { "name": "testCom", "displayName": 'Test Com', "description": "My TestCom", - "version": "0.0.1", + "version": "0.0.0", "engines": { "vscode": engineVersion }, @@ -741,7 +747,8 @@ describe('test code generator', function () { description: 'My TestCom', tslint: true, gitInit: false, - pkgManager: 'yarn' + pkgManager: 'yarn', + gitHubWorkFlowInit: false, }) // Mock the prompt answers .toPromise().then(function () { var expectedPackageJSON = { @@ -831,15 +838,15 @@ describe('test code generator', function () { description: 'My TestCom', checkJavaScript: false, gitInit: false, + pkgManager: 'npm', gitHubWorkFlowInit: true, - pkgManager: 'npm' }) // Mock the prompt answers .toPromise().then(function () { var expected = { "name": "testCom", "displayName": 'Test Com', "description": "My TestCom", - "version": "0.0.1", + "version": "0.0.0", "engines": { "vscode": engineVersion }, @@ -899,7 +906,8 @@ describe('test code generator', function () { description: 'My TestCom', checkJavaScript: true, gitInit: false, - pkgManager: 'yarn' + pkgManager: 'yarn', + gitHubWorkFlowInit: false, }) // Mock the prompt answers .toPromise().then(function () { var expected = { @@ -937,14 +945,14 @@ describe('test code generator', function () { name: 'testExtensionPack', displayName: 'Test Extension Pack', description: 'My Test Extension Pack', - gitHubWorkFlowInit: true + gitHubWorkFlowInit: true, }) // Mock the prompt answers .toPromise().then(function () { var expected = { "name": "testExtensionPack", "displayName": "Test Extension Pack", "description": "My Test Extension Pack", - "version": "0.0.1", + "version": "0.0.0", "engines": { "vscode": engineVersion }, @@ -978,13 +986,13 @@ describe('test code generator', function () { lpLanguageName: 'Russian', lpLocalizedLanguageName: 'русский', pkgManager: 'npm', - gitHubWorkFlowInit: true + gitHubWorkFlowInit: true, }).toPromise().then(function () { var expected = { "name": "vscode-language-pack-ru", "displayName": "Russian Language Pack", "description": "Language pack extension for Russian", - "version": "0.0.1", + "version": "0.0.0", "engines": { "vscode": engineVersion }, @@ -1024,7 +1032,8 @@ describe('test code generator', function () { lpLanguageId: 'ru', lpLanguageName: 'Russian', lpLocalizedLanguageName: 'русский', - pkgManager: 'yarn' + pkgManager: 'yarn', + gitHubWorkFlowInit: false, }).toPromise().then(function () { var expected = { "name": "vscode-language-pack-ru",