@knapsack/test-ava 4.71.9--canary.5152.223be3d.0 → 4.71.9--canary.5152.2fc53ae.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -1 +1 @@
1
- {"version":3,"file":"test-ava-creator.d.ts","sourceRoot":"","sources":["../src/test-ava-creator.ts"],"names":[],"mappings":"AASA,eAAO,MAAM,cAAc,gGAsDzB,CAAC"}
1
+ {"version":3,"file":"test-ava-creator.d.ts","sourceRoot":"","sources":["../src/test-ava-creator.ts"],"names":[],"mappings":"AAaA,eAAO,MAAM,cAAc,gGAyDzB,CAAC"}
@@ -3,11 +3,18 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.testAvaCreator = void 0;
4
4
  const creator_utils_1 = require("@knapsack/creator-utils");
5
5
  const { pkg } = (0, creator_utils_1.findUpPkgJson)(__dirname);
6
+ const pkgName = pkg.name;
7
+ if (typeof pkgName !== 'string') {
8
+ throw new Error('pkg.name is not a string');
9
+ }
6
10
  exports.testAvaCreator = (0, creator_utils_1.createCreator)({
7
11
  id: 'test-ava',
8
12
  getQuestions: async () => ({}),
9
- getTasks: async ({ answers }) => {
13
+ getTasks: async () => {
10
14
  const { pkg: { name, scripts, type }, pkgPath, } = (0, creator_utils_1.findUpPkgJson)(process.cwd());
15
+ if (typeof name !== 'string') {
16
+ throw new Error('pkg.name is not a string');
17
+ }
11
18
  const baseName = (0, creator_utils_1.removeNpmScope)(name);
12
19
  const isMjs = type === 'module';
13
20
  return [
@@ -35,18 +42,21 @@ exports.testAvaCreator = (0, creator_utils_1.createCreator)({
35
42
  },
36
43
  {
37
44
  title: 'Update package.json',
38
- task: async () => creator_utils_1.tasks.updatePkgJson({
39
- dir: pkgPath,
40
- pkg: {
41
- scripts: {
42
- [scripts.test ? 'test:ava' : 'test']: 'ava',
45
+ task: async () => {
46
+ var _a;
47
+ return creator_utils_1.tasks.updatePkgJson({
48
+ dir: pkgPath,
49
+ pkg: {
50
+ scripts: {
51
+ [(scripts === null || scripts === void 0 ? void 0 : scripts.test) ? 'test:ava' : 'test']: 'ava',
52
+ },
53
+ devDependencies: {
54
+ [pkgName]: pkg.version,
55
+ ava: ((_a = pkg.dependencies) === null || _a === void 0 ? void 0 : _a.ava) || 'latest',
56
+ },
43
57
  },
44
- devDependencies: {
45
- [pkg.name]: pkg.version,
46
- ava: pkg.dependencies.ava || 'latest',
47
- },
48
- },
49
- }),
58
+ });
59
+ },
50
60
  },
51
61
  ];
52
62
  },
@@ -1 +1 @@
1
- {"version":3,"file":"test-ava-creator.js","sourceRoot":"","sources":["../src/test-ava-creator.ts"],"names":[],"mappings":";;;AAAA,2DAKiC;AAEjC,MAAM,EAAE,GAAG,EAAE,GAAG,IAAA,6BAAa,EAAC,SAAS,CAAC,CAAC;AAE5B,QAAA,cAAc,GAAG,IAAA,6BAAa,EAAC;IAC1C,EAAE,EAAE,UAAU;IACd,YAAY,EAAE,KAAK,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC;IAC9B,QAAQ,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE;QAC9B,MAAM,EACJ,GAAG,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,EAC5B,OAAO,GACR,GAAG,IAAA,6BAAa,EAAC,OAAO,CAAC,GAAG,EAAE,CAAC,CAAC;QACjC,MAAM,QAAQ,GAAG,IAAA,8BAAc,EAAC,IAAI,CAAC,CAAC;QACtC,MAAM,KAAK,GAAG,IAAI,KAAK,QAAQ,CAAC;QAChC,OAAO;YACL;gBACE,KAAK,EAAE,aAAa;gBACpB,IAAI,EAAE,KAAK,IAAI,EAAE,CACf,qBAAK,CAAC,kBAAkB,CAAC;oBACvB,eAAe,EAAE,YAAY;oBAC7B,KAAK,EAAE;wBACL,gBAAgB,EAAE;4BAChB,6CACE,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EACnB,KAAK;4BACL,EAAE;4BACF,0BAA0B;yBAC3B;wBACD,GAAG,EAAE;4BACH,CAAC,GAAG,QAAQ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ack/test-ava",
3
3
  "description": "",
4
- "version": "4.71.9--canary.5152.223be3d.0",
4
+ "version": "4.71.9--canary.5152.2fc53ae.0",
5
5
  "bin": "./bin.js",
6
6
  "main": "ava.config.cjs",
7
7
  "exports": {
@@ -29,13 +29,13 @@
29
29
  "@babel/preset-env": "^7.26.0",
30
30
  "@babel/preset-typescript": "^7.26.0",
31
31
  "@babel/register": "^7.25.9",
32
- "@knapsack/creator-utils": "4.71.9--canary.5152.223be3d.0",
32
+ "@knapsack/creator-utils": "4.71.9--canary.5152.2fc53ae.0",
33
33
  "ava": "^6.2.0",
34
34
  "dotenv": "^16.4.5"
35
35
  },
36
36
  "devDependencies": {
37
- "@knapsack/eslint-config-starter": "4.71.9--canary.5152.223be3d.0",
38
- "@knapsack/typescript-config-starter": "4.71.9--canary.5152.223be3d.0",
37
+ "@knapsack/eslint-config-starter": "4.71.9--canary.5152.2fc53ae.0",
38
+ "@knapsack/typescript-config-starter": "4.71.9--canary.5152.2fc53ae.0",
39
39
  "eslint": "^8.57.0",
40
40
  "typescript": "^5.6.3"
41
41
  },
@@ -48,5 +48,5 @@
48
48
  "directory": "tools/test-ava",
49
49
  "type": "git"
50
50
  },
51
- "gitHead": "223be3d8474df7f152e65a3e32ca5a22be8d0109"
51
+ "gitHead": "2fc53ae778cecfbba4c5f6ccc4122e68a4a86c01"
52
52
  }