@frozzare/pkg 1.0.6 → 1.0.7

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 (2) hide show
  1. package/dist/index.js +2 -2
  2. package/package.json +4 -5
package/dist/index.js CHANGED
@@ -41,8 +41,8 @@ const build = async (entry, options = {}) => {
41
41
  }
42
42
  const name = match === null || match === void 0 ? void 0 : match[1].trim();
43
43
  text =
44
- text.replace(/module.exports = __toCommonJS\(\w+\);/, '') +
45
- `module.exports = ${name};`.replace((config === null || config === void 0 ? void 0 : config.minify) ? /\s/g : '', '');
44
+ text.replace(/module.exports(?:\s+|)=(?:\s+|)\w+\(\w+\);/, '').trim() +
45
+ `${(config === null || config === void 0 ? void 0 : config.minify) ? '' : '\n'}module.exports = ${name};`.replace((config === null || config === void 0 ? void 0 : config.minify) ? /\s/g : '', '');
46
46
  }
47
47
  if (!config.write) {
48
48
  return text;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@frozzare/pkg",
3
- "version": "1.0.6",
3
+ "version": "1.0.7",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {
@@ -8,7 +8,7 @@
8
8
  "format": "prettier --write 'src/**/*.ts' 'test/**/*.ts'",
9
9
  "lint": "eslint src --ext .ts",
10
10
  "prepublishOnly": "npm run build",
11
- "test": "jest"
11
+ "test": "vitest"
12
12
  },
13
13
  "files": [
14
14
  "dist"
@@ -25,12 +25,11 @@
25
25
  "@types/jest": "^29.4.0",
26
26
  "@typescript-eslint/eslint-plugin": "^5.51.0",
27
27
  "@typescript-eslint/parser": "^5.51.0",
28
- "esbuild-jest": "^0.5.0",
29
28
  "eslint": "^8.33.0",
30
- "jest": "^29.4.2",
31
29
  "prettier": "^2.8.4",
32
30
  "rimraf": "^4.1.2",
33
31
  "tsx": "^3.12.3",
34
- "typescript": "^4.9.5"
32
+ "typescript": "^4.9.5",
33
+ "vitest": "^0.28.4"
35
34
  }
36
35
  }