generator-nsis 0.10.1 → 0.11.0

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.
package/README.md CHANGED
@@ -1,13 +1,11 @@
1
1
  # generator-nsis
2
2
 
3
+ > A [Yeoman](http://yeoman.io/authoring/user-interactions.html) generator for NSIS scripts.
4
+
3
5
  [![License](https://img.shields.io/github/license/idleberg/generator-nsis?color=blue&style=for-the-badge)](https://github.com/idleberg/generator-nsis/blob/main/LICENSE)
4
6
  [![Version](https://img.shields.io/npm/v/generator-nsis?style=for-the-badge)](https://www.npmjs.org/package/generator-nsis)
5
7
  [![Build](https://img.shields.io/github/actions/workflow/status/idleberg/generator-nsis/default.yml?style=for-the-badge)](https://github.com/idleberg/generator-nsis/actions)
6
8
 
7
- ## Description
8
-
9
- A [Yeoman](http://yeoman.io/authoring/user-interactions.html) generator for NSIS scripts.
10
-
11
9
  ![Screenshot](https://raw.github.com/idleberg/generator-nsis/main/screenshot.png)
12
10
 
13
11
  **Features**
@@ -17,8 +15,10 @@ A [Yeoman](http://yeoman.io/authoring/user-interactions.html) generator for NSIS
17
15
  - adds core libraries (”Useful Headers”)
18
16
  - adds callback functions
19
17
  - adds translations
20
- - adds language dialog
21
-
18
+ - adds languages (with optional dialog)
19
+ - defaults to SemVer
20
+ - SPDX license support
21
+
22
22
  ## Prerequisites
23
23
 
24
24
  You need [Node.js](https://nodejs.org/en/) installed and available in your `PATH` [environment variable](http://superuser.com/a/284351/195953). Use your preferred Node package manager to install the Yeoman CLI tool.
@@ -45,11 +45,6 @@ $ yo nsis
45
45
 
46
46
  *“That's all Folks!”*
47
47
 
48
- ## Related
49
-
50
- - [Yeoman for Atom](https://atom.io/packages/atom-yeoman)
51
- - [Yeoman for Visual Studio Code](https://marketplace.visualstudio.com/items?itemName=samverschueren.yo)
52
-
53
48
  ## License
54
49
 
55
50
  This work is licensed under the [MIT License](https://opensource.org/licenses/MIT)
@@ -1,4 +1,3 @@
1
-
2
1
  import { meta as languageData } from '@nsis/language-data';
3
2
 
4
3
  import { getAllLibraries, getLanguageChoices, licenseChoices } from '../lib/helpers.js';
@@ -18,25 +17,12 @@ export default class extends Generator {
18
17
  this.option('unlock-all', { desc: 'Unlocks all disabled features', default: false });
19
18
  this.option('debug', { desc: 'Prints debug messages', default: false });
20
19
 
21
- this.looseVersion = (this.options.looseVersion ? true : false);
22
- this.disabled = (this.options.unlockAll ? false : true);
23
- this.firstParty = (this.options.firstParty ? true : false);
24
- this.debug = (this.options.debug ? true : false);
20
+ this.looseVersion = this.options.looseVersion ? true : false;
21
+ this.disabled = this.options.unlockAll ? false : true;
22
+ this.firstParty = this.options.firstParty ? true : false;
23
+ this.debug = this.options.debug ? true : false;
25
24
  }
26
25
 
27
- // languageDialog(isUnicode) {
28
- // const languageDialog = Object.entries(languageData).map(([key, value]) => {
29
- // if (key === 'English') return;
30
-
31
- // return {
32
- // constant: `$\{LANG_${key.toUpperCase()}}`,
33
- // string: (isUnicode) ? value.native : (value.long || key)
34
- // };
35
- // });
36
-
37
- // return languageDialog;
38
- // }
39
-
40
26
  inquirer() {
41
27
  return this.prompt([
42
28
  {
@@ -44,25 +30,26 @@ export default class extends Generator {
44
30
  message: `Application name`,
45
31
  default: slugify(this.appname),
46
32
  store: true,
47
- validate: name => (name.trim().length > 0) ? true : 'Not a valid name'
33
+ validate: name => (name.trim().length > 0 ? true : 'Not a valid name'),
48
34
  },
49
35
  {
50
36
  name: 'version',
51
37
  message: `Application version`,
52
38
  default: '0.0.0',
53
39
  store: true,
54
- validate: version => (this.looseVersion === true || semver.valid(version) !== null) ? true : `Not a valid ${terminalLink('semantic version', 'https://semver.org', {
55
- fallback() {
56
- return 'semantic version';
57
- }
58
- })}`
40
+ validate: version =>
41
+ this.looseVersion === true || semver.valid(version) !== null
42
+ ? true
43
+ : `Not a valid ${terminalLink('semantic version', 'https://semver.org', {
44
+ fallback: false,
45
+ })}`,
59
46
  },
60
47
  {
61
48
  name: 'unicode',
62
49
  message: 'Unicode installer',
63
50
  type: 'confirm',
64
51
  default: 'true',
65
- store: true
52
+ store: true,
66
53
  },
67
54
  {
68
55
  name: 'elevation',
@@ -70,35 +57,33 @@ export default class extends Generator {
70
57
  type: 'list',
71
58
  default: 'user',
72
59
  store: true,
73
- choices: choices.elevation
60
+ choices: choices.elevation,
74
61
  },
75
- {
62
+ {
76
63
  name: 'compression',
77
64
  message: 'Set compression',
78
65
  type: 'list',
79
66
  default: 'lzma',
80
67
  store: true,
81
- choices: choices.compression
68
+ choices: choices.compression,
82
69
  },
83
70
  {
84
71
  name: 'pages',
85
72
  message: 'Installer pages',
86
73
  type: 'checkbox',
87
74
  store: true,
88
- default: [ 'instfiles' ],
89
- choices: choices.pages
75
+ default: ['instfiles'],
76
+ choices: choices.pages,
90
77
  },
91
78
  {
92
79
  name: 'spdxQuestion',
93
80
  message: `Choose a license from ${terminalLink('SPDX License List', 'https://spdx.org/licenses/', {
94
- fallback() {
95
- return 'SPDX License List'
96
- }
81
+ fallback: false,
97
82
  })}`,
98
83
  type: 'confirm',
99
84
  default: true,
100
85
  store: true,
101
- when: answers => answers.pages?.includes('license') ? true : false
86
+ when: answers => (answers.pages?.includes('license') ? true : false),
102
87
  },
103
88
  {
104
89
  name: 'spdxLicense',
@@ -107,14 +92,14 @@ export default class extends Generator {
107
92
  default: 'MIT',
108
93
  choices: licenseChoices,
109
94
  store: true,
110
- when: answers => answers.pages?.includes('license') && answers.spdxQuestion ? true : false
95
+ when: answers => (answers.pages?.includes('license') && answers.spdxQuestion ? true : false),
111
96
  },
112
97
  {
113
98
  name: 'sections',
114
99
  message: 'Number of sections',
115
100
  default: 1,
116
101
  store: true,
117
- validate: number => (Number.isInteger(parseInt(number)) && parseInt(number) > 0) ? true : 'Not a valid integer'
102
+ validate: number => (Number.isInteger(parseInt(number)) && parseInt(number) > 0 ? true : 'Not a valid integer'),
118
103
  },
119
104
  {
120
105
  name: 'callbacks',
@@ -122,7 +107,7 @@ export default class extends Generator {
122
107
  type: 'checkbox',
123
108
  store: true,
124
109
  default: [],
125
- choices: choices.callbacks
110
+ choices: choices.callbacks,
126
111
  },
127
112
  {
128
113
  name: 'includes',
@@ -130,16 +115,17 @@ export default class extends Generator {
130
115
  type: 'checkbox',
131
116
  store: true,
132
117
  default: [],
133
- choices: async () => this.firstParty ? choices.includes : await getAllLibraries(),
134
- validate: callbacks => (callbacks.includes('MUI') && callbacks.includes('MUI2')) ? 'Don\'t mix MUI versions' : true
118
+ choices: async () => (this.firstParty ? choices.includes : await getAllLibraries()),
119
+ validate: callbacks =>
120
+ callbacks.includes('MUI') && callbacks.includes('MUI2') ? "Don't mix MUI versions" : true,
135
121
  },
136
122
  {
137
123
  name: 'languages',
138
- message: (this.disabled === true) ? 'Add languages other than English' : 'Add languages',
124
+ message: this.disabled === true ? 'Add languages other than English' : 'Add languages',
139
125
  type: 'checkbox',
140
126
  store: true,
141
127
  default: [],
142
- choices: getLanguageChoices(this.disabled)
128
+ choices: getLanguageChoices(this.disabled),
143
129
  },
144
130
  {
145
131
  name: 'languageDialog',
@@ -149,33 +135,27 @@ export default class extends Generator {
149
135
  store: true,
150
136
  when: answers => {
151
137
  switch (true) {
152
- case (this.options['unlock-all'] === true && answers.languages?.length > 1):
153
- case (this.options['unlock-all'] === false && answers.languages?.length > 0):
138
+ case this.options['unlock-all'] === true && answers.languages?.length > 1:
139
+ case this.options['unlock-all'] === false && answers.languages?.length > 0:
154
140
  return true;
155
141
 
156
142
  default:
157
143
  return false;
158
144
  }
159
- }
160
- },
161
- {
162
- name: 'editInstallerScript',
163
- message: 'Edit installer script',
164
- type: 'confirm',
165
- default: 'true',
166
- store: true,
167
- when: () => {
168
- return (process.env.EDITOR) ? true : false;
169
- }
145
+ },
170
146
  },
171
147
  ]).then(async props => {
172
-
173
148
  if (this.options.debug) {
174
149
  console.log(props);
175
150
  }
176
151
 
177
152
  if (typeof props.spdxLicense !== 'undefined') {
178
- props.licenseText = spdxLicenseList[props.spdxLicense].licenseText.replace(/\n{3,}/g, '\n\n');
153
+ props.licenseText = spdxLicenseList[props.spdxLicense].licenseText
154
+ // normalize line endings
155
+ .split('\n')
156
+
157
+ // .map(line => line.trim())
158
+ .join(props.unicode ? '\n' : '\r\n');
179
159
  }
180
160
 
181
161
  if (props.name.includes('&')) {
@@ -204,29 +184,17 @@ export default class extends Generator {
204
184
  }
205
185
  }
206
186
 
207
- await this.fs.copyTplAsync(
208
- this.templatePath('installer.nsi.ejs'),
209
- this.destinationPath('installer.nsi'),
210
- {
211
- languageData: languageData,
212
- pkg: props,
213
- unlockAll: this.options['unlock-all'],
214
- debug: this.options.debug
215
- }
216
- );
187
+ await this.fs.copyTplAsync(this.templatePath('installer.nsi.ejs'), this.destinationPath('installer.nsi'), {
188
+ languageData: languageData,
189
+ pkg: props,
190
+ unlockAll: this.options['unlock-all'],
191
+ debug: this.options.debug,
192
+ });
217
193
 
218
194
  if (typeof props.spdxLicense !== 'undefined') {
219
- await this.fs.copyTplAsync(
220
- this.templatePath('license.txt.ejs'),
221
- this.destinationPath('license.txt'),
222
- {
223
- licenseText: props.licenseText
224
- }
225
- );
226
- }
227
-
228
- if (props.editInstallerScript === true) {
229
- this.spawnCommand(process.env.EDITOR, [ 'installer.nsi' ]);
195
+ await this.fs.copyTplAsync(this.templatePath('license.txt.ejs'), this.destinationPath('license.txt'), {
196
+ licenseText: props.licenseText,
197
+ });
230
198
  }
231
199
  });
232
200
  }
@@ -1,6 +1,6 @@
1
1
  import terminalLink from 'terminal-link';
2
2
 
3
- const docsURL = 'https://github.com/NSIS-Dev/Documentation/tree/master';
3
+ const docsURL = 'https://github.com/NSIS-Dev/Documentation/tree/main/docs/';
4
4
 
5
5
  export const binary = [false, true];
6
6
  export const elevation = ['user', 'highest', 'admin', 'none'];
@@ -8,84 +8,64 @@ export const compression = ['zlib', 'bzip2', 'lzma'];
8
8
 
9
9
  export const callbacks = [
10
10
  {
11
- name: terminalLink('.onInit', 'https://github.com/NSIS-Dev/Documentation/blob/master/Callbacks/onInit.md', {
12
- fallback() {
13
- return '.onInit';
14
- }
11
+ name: terminalLink('.onInit', `${docsURL}/Callbacks/onInit.md`, {
12
+ fallback: false,
15
13
  }),
16
- value: '.onInit'
14
+ value: '.onInit',
17
15
  },
18
16
  {
19
- name: terminalLink('.onGUIInit', 'https://github.com/NSIS-Dev/Documentation/blob/master/Callbacks/onGUIInit.md', {
20
- fallback() {
21
- return '.onGUIInit';
22
- }
17
+ name: terminalLink('.onGUIInit', `${docsURL}/Callbacks/onGUIInit.md`, {
18
+ fallback: false,
23
19
  }),
24
- value: '.onGUIInit'
20
+ value: '.onGUIInit',
25
21
  },
26
22
  {
27
- name: terminalLink('.onGUIEnd', 'https://github.com/NSIS-Dev/Documentation/blob/master/Callbacks/onGUIEnd.md', {
28
- fallback() {
29
- return '.onGUIEnd';
30
- }
23
+ name: terminalLink('.onGUIEnd', `${docsURL}/Callbacks/onGUIEnd.md`, {
24
+ fallback: false,
31
25
  }),
32
- value: '.onGUIEnd'
26
+ value: '.onGUIEnd',
33
27
  },
34
28
  {
35
- name: terminalLink('.onInstSuccess', 'https://github.com/NSIS-Dev/Documentation/blob/master/Callbacks/onInstSuccess.md', {
36
- fallback() {
37
- return '.onInstSuccess';
38
- }
29
+ name: terminalLink('.onInstSuccess', `${docsURL}/Callbacks/onInstSuccess.md`, {
30
+ fallback: false,
39
31
  }),
40
- value: '.onInstSuccess'
32
+ value: '.onInstSuccess',
41
33
  },
42
34
  {
43
- name: terminalLink('.onInstFailed', 'https://github.com/NSIS-Dev/Documentation/blob/master/Callbacks/onInstFailed.md', {
44
- fallback() {
45
- return '.onInstFailed';
46
- }
35
+ name: terminalLink('.onInstFailed', `${docsURL}/Callbacks/onInstFailed.md`, {
36
+ fallback: false,
47
37
  }),
48
- value: '.onInstFailed'
38
+ value: '.onInstFailed',
49
39
  },
50
40
  {
51
- name: terminalLink('.onUserAbort', 'https://github.com/NSIS-Dev/Documentation/blob/master/Callbacks/onUserAbort.md', {
52
- fallback() {
53
- return '.onUserAbort';
54
- }
41
+ name: terminalLink('.onUserAbort', `${docsURL}/Callbacks/onUserAbort.md`, {
42
+ fallback: false,
55
43
  }),
56
- value: '.onUserAbort'
44
+ value: '.onUserAbort',
57
45
  },
58
46
  {
59
- name: terminalLink('.onVerifyInstDir', 'https://github.com/NSIS-Dev/Documentation/blob/master/Callbacks/onVerifyInstDir.md', {
60
- fallback() {
61
- return '.onVerifyInstDir';
62
- }
47
+ name: terminalLink('.onVerifyInstDir', `${docsURL}/Callbacks/onVerifyInstDir.md`, {
48
+ fallback: false,
63
49
  }),
64
- value: '.onVerifyInstDir'
50
+ value: '.onVerifyInstDir',
65
51
  },
66
52
  {
67
- name: terminalLink('.onRebootFailed', 'https://github.com/NSIS-Dev/Documentation/blob/master/Callbacks/onRebootFailed.md', {
68
- fallback() {
69
- return '.onRebootFailed';
70
- }
53
+ name: terminalLink('.onRebootFailed', `${docsURL}/Callbacks/onRebootFailed.md`, {
54
+ fallback: false,
71
55
  }),
72
- value: '.onRebootFailed'
56
+ value: '.onRebootFailed',
73
57
  },
74
58
  {
75
- name: terminalLink('.onSelChange', 'https://github.com/NSIS-Dev/Documentation/blob/master/Callbacks/onSelChange.md', {
76
- fallback() {
77
- return '.onSelChange';
78
- }
59
+ name: terminalLink('.onSelChange', `${docsURL}/Callbacks/onSelChange.md`, {
60
+ fallback: false,
79
61
  }),
80
- value: '.onSelChange'
62
+ value: '.onSelChange',
81
63
  },
82
64
  {
83
- name: terminalLink('.onMouseOverSection', 'https://github.com/NSIS-Dev/Documentation/blob/master/Callbacks/onMouseOverSection.md', {
84
- fallback() {
85
- return '.onMouseOverSection';
86
- }
65
+ name: terminalLink('.onMouseOverSection', `${docsURL}/Callbacks/onMouseOverSection.md`, {
66
+ fallback: false,
87
67
  }),
88
- value: '.onMouseOverSection'
68
+ value: '.onMouseOverSection',
89
69
  },
90
70
  ];
91
71
 
@@ -93,155 +73,139 @@ export const includes = [
93
73
  {
94
74
  name: 'Colors.nsh',
95
75
  value: 'Colors',
96
- checked: false
76
+ checked: false,
97
77
  },
98
78
  {
99
79
  name: terminalLink('FileFunc.nsh', `${docsURL}/Includes/FileFunc`, {
100
- fallback() {
101
- return 'FileFunc.nsh';
102
- }
80
+ fallback: false,
103
81
  }),
104
82
  value: 'FileFunc',
105
- checked: false
83
+ checked: false,
106
84
  },
107
85
  {
108
86
  name: 'InstallOptions.nsh',
109
87
  value: 'InstallOptions',
110
- checked: false
88
+ checked: false,
111
89
  },
112
90
  {
113
91
  name: 'Integration.nsh',
114
92
  value: 'Integration',
115
- checked: false
93
+ checked: false,
116
94
  },
117
95
  {
118
96
  name: 'LangFile.nsh',
119
97
  value: 'LangFile',
120
- checked: false
98
+ checked: false,
121
99
  },
122
100
  {
123
101
  name: 'Library.nsh',
124
102
  value: 'Library',
125
- checked: false
103
+ checked: false,
126
104
  },
127
105
  {
128
106
  name: terminalLink('LogicLib.nsh', `${docsURL}/Includes/LogicLib`, {
129
- fallback() {
130
- return 'LogicLib.nsh';
131
- }
107
+ fallback: false,
132
108
  }),
133
109
  value: 'LogicLib',
134
- checked: false
110
+ checked: false,
135
111
  },
136
112
  {
137
113
  name: terminalLink('Memento.nsh', `${docsURL}/Includes/Memento`, {
138
- fallback() {
139
- return 'Memento.nsh';
140
- }
114
+ fallback: false,
141
115
  }),
142
116
  value: 'Memento',
143
- checked: false
117
+ checked: false,
144
118
  },
145
119
  {
146
120
  name: 'MUI.nsh',
147
121
  value: 'MUI',
148
- checked: false
122
+ checked: false,
149
123
  },
150
124
  {
151
125
  name: 'MUI2.nsh',
152
126
  value: 'MUI2',
153
- checked: false
127
+ checked: false,
154
128
  },
155
129
  {
156
130
  name: 'MultiUser.nsh',
157
131
  value: 'MultiUser',
158
- checked: false
132
+ checked: false,
159
133
  },
160
134
  {
161
135
  name: 'nsDialogs.nsh',
162
136
  value: 'nsDialogs',
163
- checked: false
137
+ checked: false,
164
138
  },
165
139
  {
166
140
  name: 'Sections.nsh',
167
141
  value: 'Sections',
168
- checked: false
142
+ checked: false,
169
143
  },
170
144
  {
171
145
  name: terminalLink('StrFunc.nsh', `${docsURL}/Includes/StrFunc`, {
172
- fallback() {
173
- return 'StrFunc.nsh';
174
- }
146
+ fallback: false,
175
147
  }),
176
148
  value: 'StrFunc',
177
- checked: false
149
+ checked: false,
178
150
  },
179
151
  {
180
152
  name: terminalLink('TextFunc.nsh', `${docsURL}/Includes/TextFunc`, {
181
- fallback() {
182
- return 'TextFunc.nsh';
183
- }
153
+ fallback: false,
184
154
  }),
185
155
  value: 'TextFunc',
186
- checked: false
156
+ checked: false,
187
157
  },
188
158
  {
189
159
  name: 'UpgradeDLL.nsh',
190
160
  value: 'UpgradeDLL',
191
- checked: false
161
+ checked: false,
192
162
  },
193
163
  {
194
164
  name: 'Util.nsh',
195
165
  value: 'Util',
196
- checked: false
166
+ checked: false,
197
167
  },
198
168
  {
199
169
  name: 'VB6RunTime.nsh',
200
170
  value: 'VB6RunTime',
201
- checked: false
171
+ checked: false,
202
172
  },
203
173
  {
204
174
  name: 'VPatchLib.nsh',
205
175
  value: 'VPatchLib',
206
- checked: false
176
+ checked: false,
207
177
  },
208
178
  {
209
179
  name: 'WinCore.nsh',
210
180
  value: 'WinCore',
211
- checked: false
181
+ checked: false,
212
182
  },
213
183
  {
214
184
  name: 'WinMessages.nsh',
215
185
  value: 'WinMessages',
216
- checked: false
186
+ checked: false,
217
187
  },
218
188
  {
219
189
  name: terminalLink('WinVer.nsh', `${docsURL}/Includes/WinVer`, {
220
- fallback() {
221
- return 'WinVer.nsh';
222
- }
190
+ fallback: false,
223
191
  }),
224
192
  value: 'WinVer',
225
- checked: false
193
+ checked: false,
226
194
  },
227
195
  {
228
196
  name: terminalLink('WordFunc.nsh', `${docsURL}/Includes/WordFunc`, {
229
- fallback() {
230
- return 'WordFunc.nsh';
231
- }
197
+ fallback: false,
232
198
  }),
233
199
  value: 'WordFunc',
234
- checked: false
200
+ checked: false,
235
201
  },
236
202
  {
237
203
  name: terminalLink('x64.nsh', `${docsURL}/Includes/x64`, {
238
- fallback() {
239
- return 'x64.nsh';
240
- }
204
+ fallback: false,
241
205
  }),
242
206
  value: 'x64',
243
- checked: false
244
- }
207
+ checked: false,
208
+ },
245
209
  ];
246
210
 
247
211
  export const pages = [
@@ -260,6 +224,6 @@ export const pages = [
260
224
  {
261
225
  name: 'instfiles',
262
226
  value: 'instfiles',
263
- checked: true
264
- }
227
+ checked: true,
228
+ },
265
229
  ];
@@ -11,9 +11,7 @@ const spdxCodes = Object.getOwnPropertyNames(spdxLicenseList).sort();
11
11
  export const licenseChoices = spdxCodes.map(obj => {
12
12
  const licenses = {};
13
13
  licenses['name'] = terminalLink(obj, `https://spdx.org/licenses/${obj}.html`, {
14
- fallback() {
15
- return obj;
16
- }
14
+ fallback: true,
17
15
  });
18
16
  licenses['value'] = obj;
19
17
 
@@ -22,18 +20,18 @@ export const licenseChoices = spdxCodes.map(obj => {
22
20
 
23
21
  export const getAllLibraries = async () => {
24
22
  const nsisPath = await nsisDir();
25
- const includeDir = resolve(nsisPath, 'Include')
23
+ const includeDir = resolve(nsisPath, 'Include');
26
24
 
27
25
  const headerFiles = await glob([`${includeDir}/*.nsh`, `!${includeDir}/MUI.nsh`], {
28
- ignore: bundledLibraries.map(excludedFile => `${includeDir}/${excludedFile.value}.nsh`)
26
+ ignore: bundledLibraries.map(excludedFile => `${includeDir}/${excludedFile.value}.nsh`),
29
27
  });
30
28
 
31
29
  const customHeaders = headerFiles.map(headerFile => {
32
30
  return {
33
31
  name: `${basename(headerFile)} [3rd party]`,
34
32
  value: basename(headerFile, extname(headerFile)),
35
- checked: false
36
- }
33
+ checked: false,
34
+ };
37
35
  });
38
36
 
39
37
  const allLibraries = [...bundledLibraries, ...customHeaders];
@@ -43,13 +41,13 @@ export const getAllLibraries = async () => {
43
41
 
44
42
  export function getLanguageChoices(disabled) {
45
43
  const languageChoices = Object.entries(languageData).map(([key, value]) => {
46
- const isDisabled = (key === 'English') ? disabled : false;
44
+ const isDisabled = key === 'English' ? disabled : false;
47
45
 
48
46
  // Use long names
49
47
  return {
50
48
  name: value.english || key,
51
49
  value: key,
52
- disabled: isDisabled
50
+ disabled: isDisabled,
53
51
  };
54
52
  });
55
53
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "generator-nsis",
3
- "version": "0.10.1",
3
+ "version": "0.11.0",
4
4
  "description": "Yeoman generator for NSIS scripts",
5
5
  "author": "Jan T. Sott",
6
6
  "license": "MIT",
@@ -18,15 +18,6 @@
18
18
  "LICENSE",
19
19
  "README.md"
20
20
  ],
21
- "scripts": {
22
- "lint:ejs": "ejslint generators/**/*.ejs",
23
- "lint:js": "eslint generators/**/*.js --ignore-path .gitignore",
24
- "lint:json": "eslint ./*.json --ignore-path .gitignore",
25
- "lint": "npm-run-all --parallel lint:*",
26
- "prepare": "husky",
27
- "publish": "np --no-yarn",
28
- "test": "uvu --ignore test/__helper.js"
29
- },
30
21
  "repository": {
31
22
  "type": "git",
32
23
  "url": "https://github.com/idleberg/generator-nsis"
@@ -37,31 +28,44 @@
37
28
  "dependencies": {
38
29
  "@nsis/language-data": "^0.9.2",
39
30
  "@sindresorhus/slugify": "^2.2.1",
40
- "glob": "^10.3.10",
41
- "makensis": "^2.0.8",
42
- "semver": "^7.5.4",
43
- "spdx-license-list": "^6.8.0",
31
+ "glob": "^10.3.12",
32
+ "makensis": "^3.0.0-alpha.3",
33
+ "semver": "^7.6.0",
34
+ "spdx-license-list": "^6.9.0",
44
35
  "terminal-link": "^3.0.0",
45
36
  "yeoman-generator": "^7.1.1"
46
37
  },
47
38
  "devDependencies": {
48
39
  "@lukeed/uuid": "^2.0.1",
49
40
  "ejs-lint": "^2.0.0",
50
- "eslint": "^8.56.0",
41
+ "eslint": "^8.57.0",
51
42
  "eslint-plugin-json": "^3.1.0",
52
- "husky": "^9.0.7",
53
- "lint-staged": "^15.2.0",
54
- "mem-fs": "^4.0.0",
55
- "np": "^9.2.0",
56
- "npm-run-all2": "^6.1.1",
43
+ "husky": "^9.0.11",
44
+ "lint-staged": "^15.2.2",
45
+ "mem-fs": "^4.1.0",
46
+ "np": "^10.0.2",
47
+ "npm-run-all2": "^6.1.2",
48
+ "prettier": "^3.2.5",
49
+ "rimraf": "^5.0.5",
57
50
  "tsm": "^2.3.0",
58
51
  "uvu": "^0.5.6",
59
52
  "yeoman-assert": "^3.1.1",
60
- "yeoman-environment": "^4.3.0",
53
+ "yeoman-environment": "^4.4.0",
61
54
  "yeoman-test": "^8.2.0"
62
55
  },
63
56
  "lint-staged": {
64
57
  "*.ejs": "ejslint",
65
- "*.(js|json)": "eslint --cache --fix"
58
+ "*.(js|json)": [
59
+ "eslint --cache --fix",
60
+ "prettier --write"
61
+ ]
62
+ },
63
+ "packageManager": "pnpm@8.15.2+sha256.90bb5d6382cb2cb8b8d4959a076b3953d84d1d94121717097bcd41c71344fa14",
64
+ "scripts": {
65
+ "lint:ejs": "ejslint generators/**/*.ejs",
66
+ "lint:js": "eslint generators/**/*.js --ignore-path .gitignore",
67
+ "lint:json": "eslint ./*.json --ignore-path .gitignore",
68
+ "lint": "npm-run-all --parallel lint:*",
69
+ "test": "uvu --ignore test/__helper.js"
66
70
  }
67
- }
71
+ }
package/license.txt DELETED
@@ -1,7 +0,0 @@
1
- <copyright notice>
2
-
3
- By obtaining, using, and/or copying this software and/or its associated documentation, you agree that you have read, understood, and will comply with the following terms and conditions:
4
-
5
- Permission to use, copy, modify, and distribute this software and its associated documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appears in all copies, and that both that copyright notice and this permission notice appear in supporting documentation, and that the name of the copyright holder not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission.
6
-
7
- THE COPYRIGHT HOLDER DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM THE LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.