just-task 1.10.0 → 1.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/CHANGELOG.json +16 -1
- package/CHANGELOG.md +10 -2
- package/lib/config.d.ts.map +1 -1
- package/lib/config.js +10 -2
- package/lib/enableTypeScript.js +1 -1
- package/package.json +1 -1
- package/src/config.ts +10 -2
- package/src/enableTypeScript.ts +1 -1
package/CHANGELOG.json
CHANGED
|
@@ -2,7 +2,22 @@
|
|
|
2
2
|
"name": "just-task",
|
|
3
3
|
"entries": [
|
|
4
4
|
{
|
|
5
|
-
"date": "Tue,
|
|
5
|
+
"date": "Tue, 10 Dec 2024 22:22:41 GMT",
|
|
6
|
+
"version": "1.11.0",
|
|
7
|
+
"tag": "just-task_v1.11.0",
|
|
8
|
+
"comments": {
|
|
9
|
+
"minor": [
|
|
10
|
+
{
|
|
11
|
+
"author": "tigeroakes@microsoft.com",
|
|
12
|
+
"package": "just-task",
|
|
13
|
+
"commit": "55e52e9274b9e42d8b243a7a67ec73188dd222c3",
|
|
14
|
+
"comment": "Add .cjs config support"
|
|
15
|
+
}
|
|
16
|
+
]
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"date": "Tue, 26 Mar 2024 00:12:38 GMT",
|
|
6
21
|
"version": "1.10.0",
|
|
7
22
|
"tag": "just-task_v1.10.0",
|
|
8
23
|
"comments": {
|
package/CHANGELOG.md
CHANGED
|
@@ -1,12 +1,20 @@
|
|
|
1
1
|
# Change Log - just-task
|
|
2
2
|
|
|
3
|
-
This log was last generated on Tue,
|
|
3
|
+
This log was last generated on Tue, 10 Dec 2024 22:22:41 GMT and should not be manually modified.
|
|
4
4
|
|
|
5
5
|
<!-- Start content -->
|
|
6
6
|
|
|
7
|
+
## 1.11.0
|
|
8
|
+
|
|
9
|
+
Tue, 10 Dec 2024 22:22:41 GMT
|
|
10
|
+
|
|
11
|
+
### Minor changes
|
|
12
|
+
|
|
13
|
+
- Add .cjs config support (tigeroakes@microsoft.com)
|
|
14
|
+
|
|
7
15
|
## 1.10.0
|
|
8
16
|
|
|
9
|
-
Tue, 26 Mar 2024 00:12:
|
|
17
|
+
Tue, 26 Mar 2024 00:12:38 GMT
|
|
10
18
|
|
|
11
19
|
### Minor changes
|
|
12
20
|
|
package/lib/config.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAOA,OAAO,WAAW,GAAG,QAAQ,cAAc,CAAC,CAAC;AAC7C,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAE5C,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,WAAW,CAAC,SAAS,GAAG,MAAM,GAAG,IAAI,
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAOA,OAAO,WAAW,GAAG,QAAQ,cAAc,CAAC,CAAC;AAC7C,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAE5C,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,WAAW,CAAC,SAAS,GAAG,MAAM,GAAG,IAAI,CAiB5E;AAED,wBAAgB,UAAU,IAAI;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,YAAY,CAAA;CAAE,GAAG,IAAI,CAmCnE"}
|
package/lib/config.js
CHANGED
|
@@ -8,7 +8,15 @@ const resolve_1 = require("./resolve");
|
|
|
8
8
|
const just_task_logger_1 = require("just-task-logger");
|
|
9
9
|
const enableTypeScript_1 = require("./enableTypeScript");
|
|
10
10
|
function resolveConfigFile(args) {
|
|
11
|
-
for (const entry of [
|
|
11
|
+
for (const entry of [
|
|
12
|
+
args.config,
|
|
13
|
+
'./just.config.js',
|
|
14
|
+
'./just.config.cjs',
|
|
15
|
+
'./just-task.js',
|
|
16
|
+
'./just.config.ts',
|
|
17
|
+
'./just.config.cts',
|
|
18
|
+
args.defaultConfig,
|
|
19
|
+
]) {
|
|
12
20
|
const configFile = resolve_1.resolve(entry);
|
|
13
21
|
if (configFile) {
|
|
14
22
|
return configFile;
|
|
@@ -23,7 +31,7 @@ function readConfig() {
|
|
|
23
31
|
const configFile = resolveConfigFile(args);
|
|
24
32
|
if (configFile && fs.existsSync(configFile)) {
|
|
25
33
|
const ext = path.extname(configFile);
|
|
26
|
-
if (ext === '.ts' || ext === '.tsx') {
|
|
34
|
+
if (ext === '.cts' || ext === '.ts' || ext === '.tsx') {
|
|
27
35
|
// TODO: add option to do typechecking as well
|
|
28
36
|
enableTypeScript_1.enableTypeScript({ transpileOnly: true, esm: args.esm });
|
|
29
37
|
}
|
package/lib/enableTypeScript.js
CHANGED
package/package.json
CHANGED
package/src/config.ts
CHANGED
|
@@ -9,7 +9,15 @@ import yargsParser = require('yargs-parser');
|
|
|
9
9
|
import { TaskFunction } from './interfaces';
|
|
10
10
|
|
|
11
11
|
export function resolveConfigFile(args: yargsParser.Arguments): string | null {
|
|
12
|
-
for (const entry of [
|
|
12
|
+
for (const entry of [
|
|
13
|
+
args.config,
|
|
14
|
+
'./just.config.js',
|
|
15
|
+
'./just.config.cjs',
|
|
16
|
+
'./just-task.js',
|
|
17
|
+
'./just.config.ts',
|
|
18
|
+
'./just.config.cts',
|
|
19
|
+
args.defaultConfig,
|
|
20
|
+
]) {
|
|
13
21
|
const configFile = resolve(entry);
|
|
14
22
|
if (configFile) {
|
|
15
23
|
return configFile;
|
|
@@ -26,7 +34,7 @@ export function readConfig(): { [key: string]: TaskFunction } | void {
|
|
|
26
34
|
|
|
27
35
|
if (configFile && fs.existsSync(configFile)) {
|
|
28
36
|
const ext = path.extname(configFile);
|
|
29
|
-
if (ext === '.ts' || ext === '.tsx') {
|
|
37
|
+
if (ext === '.cts' || ext === '.ts' || ext === '.tsx') {
|
|
30
38
|
// TODO: add option to do typechecking as well
|
|
31
39
|
enableTypeScript({ transpileOnly: true, esm: args.esm });
|
|
32
40
|
}
|
package/src/enableTypeScript.ts
CHANGED
|
@@ -19,7 +19,7 @@ export function enableTypeScript({ transpileOnly = true, esm = false }): void {
|
|
|
19
19
|
allowJs: true,
|
|
20
20
|
esModuleInterop: true,
|
|
21
21
|
},
|
|
22
|
-
files: ['just.config.ts'],
|
|
22
|
+
files: ['just.config.ts', 'just.config.cts'],
|
|
23
23
|
});
|
|
24
24
|
} else {
|
|
25
25
|
logger.error(`In order to use TypeScript with just.config.ts, you need to install "ts-node" module:
|