generator-code 1.6.1 → 1.6.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (22) hide show
  1. package/generators/app/{generate-command-ts .js → generate-command-ts.js} +14 -1
  2. package/generators/app/generate-command-web.js +13 -0
  3. package/generators/app/index.js +47 -9
  4. package/generators/app/package.json +8 -7
  5. package/generators/app/templates/ext-command-ts/package.json +1 -1
  6. package/generators/app/templates/ext-command-ts/vscode-webpack/package.json +4 -3
  7. package/generators/app/templates/ext-command-ts/vscode-webpack/tsconfig.json +1 -0
  8. package/generators/app/templates/ext-command-ts/vscode-webpack/vsc-extension-quickstart.md +47 -0
  9. package/generators/app/templates/ext-command-ts/vscode-webpack/vscode/extensions.json +3 -6
  10. package/generators/app/templates/ext-command-ts/vscode-webpack/vscode/launch.json +3 -2
  11. package/generators/app/templates/ext-command-ts/vscode-webpack/vscode/tasks.json +15 -5
  12. package/generators/app/templates/ext-command-ts/vscode-webpack/vscodeignore +1 -0
  13. package/generators/app/templates/ext-command-ts/vscode-webpack/webpack.config.js +5 -2
  14. package/generators/app/templates/ext-command-web/.yarnrc +1 -0
  15. package/generators/app/templates/ext-command-web/vsc-extension-quickstart.md +8 -8
  16. package/generators/app/templates/ext-command-web/vscode/extensions.json +3 -6
  17. package/generators/app/templates/ext-command-web/vscodeignore +2 -1
  18. package/generators/app/templates/ext-command-web/webpack.config.js +6 -2
  19. package/generators/app/templates/ext-notebook-renderer/package.json +1 -0
  20. package/generators/app/templates/ext-notebook-renderer/vscode/extensions.json +1 -4
  21. package/generators/app/templates/ext-notebook-renderer/webpack.config.js +7 -0
  22. package/package.json +9 -7
@@ -2,6 +2,7 @@
2
2
  * Copyright (C) Microsoft Corporation. All rights reserved.
3
3
  *--------------------------------------------------------*/
4
4
 
5
+ const chalk = require("chalk");
5
6
  const prompts = require("./prompts");
6
7
 
7
8
  module.exports = {
@@ -33,11 +34,13 @@ module.exports = {
33
34
  generator.fs.copyTpl(generator.templatePath('vscode-webpack/tsconfig.json'), generator.destinationPath('tsconfig.json'), extensionConfig);
34
35
  generator.fs.copyTpl(generator.templatePath('vscode-webpack/vscodeignore'), generator.destinationPath('.vscodeignore'), extensionConfig);
35
36
  generator.fs.copyTpl(generator.templatePath('vscode-webpack/webpack.config.js'), generator.destinationPath('webpack.config.js'), extensionConfig);
37
+ generator.fs.copyTpl(generator.templatePath('vscode-webpack/vsc-extension-quickstart.md'), generator.destinationPath('vsc-extension-quickstart.md'), extensionConfig);
36
38
  } else {
37
39
  generator.fs.copy(generator.templatePath('vscode'), generator.destinationPath('.vscode'));
38
40
  generator.fs.copyTpl(generator.templatePath('package.json'), generator.destinationPath('package.json'), extensionConfig);
39
41
  generator.fs.copyTpl(generator.templatePath('tsconfig.json'), generator.destinationPath('tsconfig.json'), extensionConfig);
40
42
  generator.fs.copyTpl(generator.templatePath('vscodeignore'), generator.destinationPath('.vscodeignore'), extensionConfig);
43
+ generator.fs.copyTpl(generator.templatePath('vsc-extension-quickstart.md'), generator.destinationPath('vsc-extension-quickstart.md'), extensionConfig);
41
44
  }
42
45
 
43
46
  if (extensionConfig.gitInit) {
@@ -45,7 +48,6 @@ module.exports = {
45
48
  }
46
49
  generator.fs.copyTpl(generator.templatePath('README.md'), generator.destinationPath('README.md'), extensionConfig);
47
50
  generator.fs.copyTpl(generator.templatePath('CHANGELOG.md'), generator.destinationPath('CHANGELOG.md'), extensionConfig);
48
- generator.fs.copyTpl(generator.templatePath('vsc-extension-quickstart.md'), generator.destinationPath('vsc-extension-quickstart.md'), extensionConfig);
49
51
  generator.fs.copyTpl(generator.templatePath('src/extension.ts'), generator.destinationPath('src/extension.ts'), extensionConfig);
50
52
  generator.fs.copy(generator.templatePath('src/test'), generator.destinationPath('src/test'));
51
53
  generator.fs.copy(generator.templatePath('.eslintrc.json'), generator.destinationPath('.eslintrc.json'));
@@ -56,5 +58,16 @@ module.exports = {
56
58
 
57
59
  extensionConfig.installDependencies = true;
58
60
  extensionConfig.proposedAPI = extensionConfig.insiders;
61
+ },
62
+
63
+ /**
64
+ * @param {import('yeoman-generator')} generator
65
+ * @param {Object} extensionConfig
66
+ */
67
+ endMessage: (generator, extensionConfig) => {
68
+ if (extensionConfig.webpack) {
69
+ generator.log(chalk.yellow(`To run the extension you need to install the recommended extension 'amodio.tsl-problem-matcher'.`));
70
+ generator.log('');
71
+ }
59
72
  }
60
73
  }
@@ -2,6 +2,7 @@
2
2
  * Copyright (C) Microsoft Corporation. All rights reserved.
3
3
  *--------------------------------------------------------*/
4
4
 
5
+ const chalk = require("chalk");
5
6
  const prompts = require("./prompts");
6
7
 
7
8
  module.exports = {
@@ -44,7 +45,19 @@ module.exports = {
44
45
 
45
46
  generator.fs.copy(generator.templatePath('.eslintrc.json'), generator.destinationPath('.eslintrc.json'));
46
47
 
48
+ if (extensionConfig.pkgManager === 'yarn') {
49
+ generator.fs.copyTpl(generator.templatePath('.yarnrc'), generator.destinationPath('.yarnrc'), extensionConfig);
50
+ }
51
+
47
52
  extensionConfig.installDependencies = true;
48
53
  extensionConfig.proposedAPI = false;
54
+ },
55
+ /**
56
+ * @param {import('yeoman-generator')} generator
57
+ * @param {Object} extensionConfig
58
+ */
59
+ endMessage: (generator, extensionConfig) => {
60
+ generator.log(chalk.yellow(`To run the extension you need to install the recommended extension 'amodio.tsl-problem-matcher'.`));
61
+ generator.log('');
49
62
  }
50
63
  }
@@ -8,10 +8,11 @@ const yosay = require('yosay');
8
8
 
9
9
  const path = require('path');
10
10
  const env = require('./env');
11
+ const witch = require('which');
11
12
 
12
13
  const colortheme = require('./generate-colortheme');
13
14
  const commandjs = require('./generate-command-js');
14
- const commandts = require('./generate-command-ts ');
15
+ const commandts = require('./generate-command-ts');
15
16
  const commandweb = require('./generate-command-web');
16
17
  const extensionpack = require('./generate-extensionpack');
17
18
  const keymap = require('./generate-keymap');
@@ -161,7 +162,7 @@ module.exports = class extends Generator {
161
162
  }
162
163
 
163
164
  // End
164
- end() {
165
+ async end() {
165
166
  if (this.abort) {
166
167
  return;
167
168
  }
@@ -195,6 +196,8 @@ module.exports = class extends Generator {
195
196
  this.log('Your extension ' + this.extensionConfig.name + ' has been created!');
196
197
  this.log('');
197
198
 
199
+ const [codeStableLocation, codeInsidersLocation] = await Promise.all([witch('code').catch(() => undefined), witch('code-insiders').catch(() => undefined)]);
200
+
198
201
  if (!this.extensionConfig.insiders && !this.options['open'] && !this.options['openInInsiders'] && !this.options['quick']) {
199
202
  const cdLocation = this.options['destination'] || this.extensionConfig.name;
200
203
 
@@ -203,7 +206,11 @@ module.exports = class extends Generator {
203
206
  if (cdLocation !== '.') {
204
207
  this.log(' cd ' + cdLocation);
205
208
  }
206
- this.log(' code-insiders .');
209
+ if (!this.extensionConfig.insiders) {
210
+ this.log(' code .');
211
+ } else {
212
+ this.log(' code-insiders .');
213
+ }
207
214
  this.log('');
208
215
  }
209
216
  this.log('Open vsc-extension-quickstart.md inside the new extension for further instructions');
@@ -217,12 +224,43 @@ module.exports = class extends Generator {
217
224
  this.log('For more information, also visit http://code.visualstudio.com and follow us @code.');
218
225
  this.log('\r\n');
219
226
 
220
- if (this.options['open']) {
221
- this.log(`Opening ${this.destinationPath()} in Visual Studio Code...`);
222
- this.spawnCommand('code', [this.destinationPath()]);
223
- } else if (this.extensionConfig.insiders || this.options['openInInsiders'] || this.options['quick']) {
224
- this.log(`Opening ${this.destinationPath()} with Visual Studio Code Insiders...`);
225
- this.spawnCommand('code-insiders', [this.destinationPath()]);
227
+ if (this.options["open"]) {
228
+ if (codeStableLocation) {
229
+ this.log(`Opening ${this.destinationPath()} in Visual Studio Code...`);
230
+ this.spawnCommand(codeStableLocation, [this.destinationPath()]);
231
+ } else {
232
+ this.log(`'code' command not found.`);
233
+ }
234
+ } else if (this.options["openInInsiders"]) {
235
+ if (codeInsidersLocation) {
236
+ this.log(`Opening ${this.destinationPath()} with Visual Studio Code Insiders...`);
237
+ this.spawnCommand(codeInsidersLocation, [this.destinationPath()]);
238
+ } else {
239
+ this.log(`'code-insiders' command not found.`);
240
+ }
241
+ } else if (codeInsidersLocation || codeStableLocation) {
242
+ if (this.options["quick"]) {
243
+ this.spawnCommand(codeInsidersLocation || codeStableLocation, [this.destinationPath()]);
244
+ } else {
245
+ const choices = [];
246
+ if (codeInsidersLocation) {
247
+ choices.push({ name: "Open with `code-insiders`", value: codeInsidersLocation });
248
+ }
249
+ if (codeStableLocation) {
250
+ choices.push({ name: "Open with `code`", value: codeStableLocation });
251
+ }
252
+ choices.push({ name: "Skip", value: 'skip' });
253
+
254
+ const answer = await this.prompt({
255
+ type: "list",
256
+ name: "openWith",
257
+ message: "Do you want to open the new folder with Visual Studio Code?",
258
+ choices
259
+ });
260
+ if (answer && answer.openWith && answer.openWith !== 'skip') {
261
+ this.spawnCommand(answer.openWith, [this.destinationPath()]);
262
+ }
263
+ }
226
264
  }
227
265
  }
228
266
  }
@@ -3,17 +3,17 @@
3
3
  "@types/glob": "^7.1.4",
4
4
  "@types/mocha": "^9.0.0",
5
5
  "@types/node": "14.x",
6
- "@typescript-eslint/eslint-plugin": "^4.31.1",
7
- "@typescript-eslint/parser": "^4.31.1",
8
- "eslint": "^7.32.0",
6
+ "@typescript-eslint/eslint-plugin": "^5.1.0",
7
+ "@typescript-eslint/parser": "^5.1.0",
8
+ "eslint": "^8.1.0",
9
9
  "glob": "^7.1.7",
10
- "mocha": "^9.1.1",
11
- "typescript": "^4.4.3",
10
+ "mocha": "^9.1.3",
11
+ "typescript": "^4.4.4",
12
12
  "@vscode/test-electron": "^1.6.2",
13
- "@vscode/test-web": "^0.0.12",
13
+ "@vscode/test-web": "^0.0.15",
14
14
  "@types/webpack-env": "^1.16.2",
15
15
  "@types/vscode-notebook-renderer": "^1.57.8",
16
- "concurrently": "^`5.3.0",
16
+ "concurrently": "^5.3.0",
17
17
  "css-loader": "^4.2.0",
18
18
  "fork-ts-checker-webpack-plugin": "^5.0.14",
19
19
  "style-loader": "^1.2.1",
@@ -21,6 +21,7 @@
21
21
  "vscode-dts": "^0.3.1",
22
22
  "vscode-notebook-error-overlay": "^1.0.1",
23
23
  "webpack": "^5.52.1",
24
+ "util": "^0.12.4",
24
25
  "webpack-cli": "^4.8.0",
25
26
  "webpack-dev-server": "^3.11.2",
26
27
  "assert": "^2.0.0",
@@ -13,7 +13,7 @@
13
13
  <%- JSON.stringify(`onCommand:${name}.helloWorld`) %>
14
14
  ],
15
15
  "main": "./out/extension.js",<% if (insiders) { %>
16
- "enableProposedApi": true,<% } %>
16
+ "enabledApiProposals": [],<% } %>
17
17
  "contributes": {
18
18
  "commands": [
19
19
  {
@@ -13,7 +13,7 @@
13
13
  <%- JSON.stringify(`onCommand:${name}.helloWorld`) %>
14
14
  ],
15
15
  "main": "./dist/extension.js",<% if (insiders) { %>
16
- "enableProposedApi": true,<% } %>
16
+ "enabledApiProposals": [],<% } %>
17
17
  "contributes": {
18
18
  "commands": [
19
19
  {
@@ -27,8 +27,9 @@
27
27
  "compile": "webpack",
28
28
  "watch": "webpack --watch",
29
29
  "package": "webpack --mode production --devtool hidden-source-map",
30
- "test-compile": "tsc -p . --outDir out",
31
- "pretest": "<%= pkgManager %> run test-compile && <%= pkgManager %> run compile && <%= pkgManager %> run lint",
30
+ "compile-tests": "tsc -p . --outDir out",
31
+ "watch-tests": "tsc -p . -w --outDir out",
32
+ "pretest": "<%= pkgManager %> run compile-tests && <%= pkgManager %> run compile && <%= pkgManager %> run lint",
32
33
  "lint": "eslint src --ext ts",
33
34
  "test": "node ./out/test/runTest.js"<% if (insiders) { %>,
34
35
  "update-proposed-api": "vscode-dts dev"<% } %>
@@ -5,6 +5,7 @@
5
5
  "lib": [
6
6
  "ES2020"
7
7
  ],
8
+ "sourceMap": true,
8
9
  "rootDir": "src",
9
10
  "strict": true /* enable all strict type-checking options */
10
11
  /* Additional Checks */
@@ -0,0 +1,47 @@
1
+ # Welcome to your VS Code Extension
2
+
3
+ ## What's in the folder
4
+
5
+ * This folder contains all of the files necessary for your extension.
6
+ * `package.json` - this is the manifest file in which you declare your extension and command.
7
+ * The sample plugin registers a command and defines its title and command name. With this information VS Code can show the command in the command palette. It doesn’t yet need to load the plugin.
8
+ * `src/extension.ts` - this is the main file where you will provide the implementation of your command.
9
+ * The file exports one function, `activate`, which is called the very first time your extension is activated (in this case by executing the command). Inside the `activate` function we call `registerCommand`.
10
+ * We pass the function containing the implementation of the command as the second parameter to `registerCommand`.
11
+
12
+ ## Setup
13
+
14
+ * install the recommended extensions (amodio.tsl-problem-matcher and dbaeumer.vscode-eslint)
15
+
16
+
17
+ ## Get up and running straight away
18
+
19
+ * Press `F5` to open a new window with your extension loaded.
20
+ * Run your command from the command palette by pressing (`Ctrl+Shift+P` or `Cmd+Shift+P` on Mac) and typing `Hello World`.
21
+ * Set breakpoints in your code inside `src/extension.ts` to debug your extension.
22
+ * Find output from your extension in the debug console.
23
+
24
+ ## Make changes
25
+
26
+ * You can relaunch the extension from the debug toolbar after changing code in `src/extension.ts`.
27
+ * You can also reload (`Ctrl+R` or `Cmd+R` on Mac) the VS Code window with your extension to load your changes.
28
+
29
+
30
+ ## Explore the API
31
+
32
+ * You can open the full set of our API when you open the file `node_modules/@types/vscode/index.d.ts`.
33
+
34
+ ## Run tests
35
+
36
+ * Open the debug viewlet (`Ctrl+Shift+D` or `Cmd+Shift+D` on Mac) and from the launch configuration dropdown pick `Extension Tests`.
37
+ * Press `F5` to run the tests in a new window with your extension loaded.
38
+ * See the output of the test result in the debug console.
39
+ * Make changes to `src/test/suite/extension.test.ts` or create new test files inside the `test/suite` folder.
40
+ * The provided test runner will only consider files matching the name pattern `**.test.ts`.
41
+ * You can create folders inside the `test` folder to structure your tests any way you want.
42
+
43
+ ## Go further
44
+
45
+ * Reduce the extension size and improve the startup time by [bundling your extension](https://code.visualstudio.com/api/working-with-extensions/bundling-extension).
46
+ * [Publish your extension](https://code.visualstudio.com/api/working-with-extensions/publishing-extension) on the VSCode extension marketplace.
47
+ * Automate builds by setting up [Continuous Integration](https://code.visualstudio.com/api/working-with-extensions/continuous-integration).
@@ -1,8 +1,5 @@
1
1
  {
2
- // See http://go.microsoft.com/fwlink/?LinkId=827846
3
- // for the documentation about the extensions.json format
4
- "recommendations": [
5
- "dbaeumer.vscode-eslint",
6
- "eamodio.tsl-problem-matcher"
7
- ]
2
+ // See http://go.microsoft.com/fwlink/?LinkId=827846
3
+ // for the documentation about the extensions.json format
4
+ "recommendations": ["dbaeumer.vscode-eslint", "amodio.tsl-problem-matcher"]
8
5
  }
@@ -26,9 +26,10 @@
26
26
  "--extensionTestsPath=${workspaceFolder}/out/test/suite/index"
27
27
  ],
28
28
  "outFiles": [
29
- "${workspaceFolder}/out/test/**/*.js"
29
+ "${workspaceFolder}/out/**/*.js",
30
+ "${workspaceFolder}/dist/**/*.js"
30
31
  ],
31
- "preLaunchTask": "npm: test-watch"
32
+ "preLaunchTask": "tasks: watch-tests"
32
33
  }
33
34
  ]
34
35
  }
@@ -7,12 +7,13 @@
7
7
  "type": "npm",
8
8
  "script": "watch",
9
9
  "problemMatcher": [
10
- "$ts-webpack-watch",
11
- "$tslint-webpack-watch"
10
+ "$ts-webpack-watch",
11
+ "$tslint-webpack-watch"
12
12
  ],
13
13
  "isBackground": true,
14
14
  "presentation": {
15
- "reveal": "never"
15
+ "reveal": "never",
16
+ "group": "watchers"
16
17
  },
17
18
  "group": {
18
19
  "kind": "build",
@@ -21,13 +22,22 @@
21
22
  },
22
23
  {
23
24
  "type": "npm",
24
- "script": "test-watch",
25
+ "script": "watch-tests",
25
26
  "problemMatcher": "$tsc-watch",
26
27
  "isBackground": true,
27
28
  "presentation": {
28
- "reveal": "never"
29
+ "reveal": "never",
30
+ "group": "watchers"
29
31
  },
30
32
  "group": "build"
33
+ },
34
+ {
35
+ "label": "tasks: watch-tests",
36
+ "dependsOn": [
37
+ "npm: watch",
38
+ "npm: watch-tests"
39
+ ],
40
+ "problemMatcher": []
31
41
  }
32
42
  ]
33
43
  }
@@ -5,6 +5,7 @@ node_modules/**
5
5
  src/**
6
6
  .gitignore
7
7
  .yarnrc
8
+ webpack.config.js
8
9
  vsc-extension-quickstart.md
9
10
  **/tsconfig.json
10
11
  **/.eslintrc.json
@@ -21,7 +21,7 @@ const extensionConfig = {
21
21
  },
22
22
  externals: {
23
23
  vscode: 'commonjs vscode' // the vscode-module is created on-the-fly and must be excluded. Add other modules that cannot be webpack'ed, 📖 -> https://webpack.js.org/configuration/externals/
24
- // modules added here also need to be added in the .vsceignore file
24
+ // modules added here also need to be added in the .vscodeignore file
25
25
  },
26
26
  resolve: {
27
27
  // support reading TypeScript and JavaScript files, 📖 -> https://github.com/TypeStrong/ts-loader
@@ -40,6 +40,9 @@ const extensionConfig = {
40
40
  }
41
41
  ]
42
42
  },
43
- devtool: 'nosources-source-map'
43
+ devtool: 'nosources-source-map',
44
+ infrastructureLogging: {
45
+ level: "log", // enables logging required for problem matchers
46
+ },
44
47
  };
45
48
  module.exports = [ extensionConfig ];
@@ -0,0 +1 @@
1
+ --ignore-engines true
@@ -3,13 +3,13 @@
3
3
  ## What's in the folder
4
4
 
5
5
  * This folder contains all of the files necessary for your web extension.
6
- * `package.json` - this is the manifest file in which you declare your extension and command.
7
- * `src/web/extension.ts` - this is the main file for the browser
8
- * `webpack.config.js` - the webpack config file for the web main
6
+ * `package.json` * this is the manifest file in which you declare your extension and command.
7
+ * `src/web/extension.ts` * this is the main file for the browser
8
+ * `webpack.config.js` * the webpack config file for the web main
9
9
 
10
10
  ## Setup
11
11
 
12
- * install the recommended extensions (eamodio.tsl-problem-matcher and dbaeumer.vscode-eslint)
12
+ * install the recommended extensions (amodio.tsl-problem-matcher and dbaeumer.vscode-eslint)
13
13
 
14
14
  ## Get up and running the Web Extension
15
15
 
@@ -23,7 +23,6 @@
23
23
  * You can relaunch the extension from the debug toolbar after changing code in `src/web/extension.ts`.
24
24
  * You can also reload (`Ctrl+R` or `Cmd+R` on Mac) the VS Code window with your extension to load your changes.
25
25
 
26
-
27
26
  ## Explore the API
28
27
 
29
28
  * You can open the full set of our API when you open the file `node_modules/@types/vscode/index.d.ts`.
@@ -38,6 +37,7 @@
38
37
  * You can create folders inside the `test` folder to structure your tests any way you want.
39
38
 
40
39
  ## Go further
41
- * Check out the [Web Extension Guide](https://code.visualstudio.com/api/extension-guides/web-extensions)
42
- * [Publish your extension](https://code.visualstudio.com/api/working-with-extensions/publishing-extension) on the VSCode extension marketplace.
43
- * Automate builds by setting up [Continuous Integration](https://code.visualstudio.com/api/working-with-extensions/continuous-integration).
40
+
41
+ * Check out the [Web Extension Guide](https://code.visualstudio.com/api/extension-guides/web-extensions)
42
+ * [Publish your extension](https://code.visualstudio.com/api/working-with-extensions/publishing-extension) on the VSCode extension marketplace.
43
+ * Automate builds by setting up [Continuous Integration](https://code.visualstudio.com/api/working-with-extensions/continuous-integration).
@@ -1,8 +1,5 @@
1
1
  {
2
- // See http://go.microsoft.com/fwlink/?LinkId=827846
3
- // for the documentation about the extensions.json format
4
- "recommendations": [
5
- "dbaeumer.vscode-eslint",
6
- "eamodio.tsl-problem-matcher"
7
- ]
2
+ // See http://go.microsoft.com/fwlink/?LinkId=827846
3
+ // for the documentation about the extensions.json format
4
+ "recommendations": ["dbaeumer.vscode-eslint", "amodio.tsl-problem-matcher"]
8
5
  }
@@ -3,9 +3,10 @@
3
3
  src/**
4
4
  out/**
5
5
  node_modules/**
6
- build/**
7
6
  .gitignore
8
7
  vsc-extension-quickstart.md
8
+ webpack.config.js
9
+ .yarnrc
9
10
  **/tsconfig.json
10
11
  **/.eslintrc.json
11
12
  **/*.map
@@ -23,7 +23,8 @@ const webExtensionConfig = {
23
23
  output: {
24
24
  filename: '[name].js',
25
25
  path: path.join(__dirname, './dist/web'),
26
- libraryTarget: 'commonjs'
26
+ libraryTarget: 'commonjs',
27
+ devtoolModuleFilenameTemplate: '../../[resource-path]'
27
28
  },
28
29
  resolve: {
29
30
  mainFields: ['browser', 'module', 'main'], // look for `browser` entry point in imported node modules
@@ -58,7 +59,10 @@ const webExtensionConfig = {
58
59
  performance: {
59
60
  hints: false
60
61
  },
61
- devtool: 'nosources-source-map' // create a source map that points to the original source file
62
+ devtool: 'nosources-source-map', // create a source map that points to the original source file
63
+ infrastructureLogging: {
64
+ level: "log", // enables logging required for problem matchers
65
+ },
62
66
  };
63
67
 
64
68
  module.exports = [ webExtensionConfig ];
@@ -52,6 +52,7 @@
52
52
  <%- dep("typescript") %>,
53
53
  <%- dep("vscode-notebook-error-overlay") %>,
54
54
  <%- dep("@vscode/test-electron") %>,
55
+ <%- dep("util") %>,
55
56
  <%- dep("webpack") %>,
56
57
  <%- dep("webpack-cli") %>
57
58
  }
@@ -1,8 +1,5 @@
1
1
  {
2
2
  // See http://go.microsoft.com/fwlink/?LinkId=827846
3
3
  // for the documentation about the extensions.json format
4
- "recommendations": [
5
- "dbaeumer.vscode-eslint",
6
- "eamodio.tsl-problem-matcher"
7
- ]
4
+ "recommendations": ["dbaeumer.vscode-eslint", "amodio.tsl-problem-matcher"]
8
5
  }
@@ -14,8 +14,12 @@ const makeConfig = (argv, { entry, out, target, library = 'commonjs' }) => ({
14
14
  libraryTarget: library,
15
15
  chunkFormat: library,
16
16
  },
17
+ externals: {
18
+ vscode: 'commonjs vscode',
19
+ },
17
20
  resolve: {
18
21
  extensions: ['.ts', '.tsx', '.js', '.jsx', '.css'],
22
+ fallback: { "util": require.resolve("util/") }
19
23
  },
20
24
  experiments: {
21
25
  outputModule: true,
@@ -66,6 +70,9 @@ const makeConfig = (argv, { entry, out, target, library = 'commonjs' }) => ({
66
70
  scriptUrl: 'import.meta.url',
67
71
  }),
68
72
  ],
73
+ infrastructureLogging: {
74
+ level: "log", // enables logging required for problem matchers
75
+ },
69
76
  });
70
77
 
71
78
  module.exports = (env, argv) => [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "generator-code",
3
- "version": "1.6.1",
3
+ "version": "1.6.5",
4
4
  "description": "Yeoman generator for Visual Studio Code Extensions",
5
5
  "keywords": [
6
6
  "yeoman-generator",
@@ -36,18 +36,20 @@
36
36
  "dependencies": {
37
37
  "chalk": "^4.1.2",
38
38
  "fast-plist": "^0.1.2",
39
- "request-light": "^0.5.4",
39
+ "request-light": "^0.5.5",
40
40
  "sanitize-filename": "^1.6.3",
41
+ "which": "^2.0.2",
41
42
  "yeoman-generator": "^5.4.2",
42
43
  "yosay": "^2.0.2"
43
44
  },
44
45
  "devDependencies": {
45
46
  "@types/mocha": "^9.0.0",
46
- "@types/node": "^15.12.0",
47
- "@types/yeoman-generator": "^5.2.2",
48
- "@types/yeoman-test": "^4.0.2",
49
- "mocha": "^9.1.0",
47
+ "@types/node": "^16.11.6",
48
+ "@types/yeoman-generator": "^5.2.7",
49
+ "@types/yeoman-test": "^4.0.3",
50
+ "mocha": "^9.1.3",
50
51
  "yeoman-test": "^6.2.0",
51
- "yeoman-environment": "^3.6.0"
52
+ "yeoman-environment": "^3.8.1",
53
+ "json-schema": ">=0.4.0"
52
54
  }
53
55
  }