bunchee 5.2.2 → 5.3.0-beta.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/dist/bin/cli.js CHANGED
@@ -470,7 +470,7 @@ function lint$1(pkg) {
470
470
  }
471
471
  }
472
472
 
473
- var version = "5.2.2";
473
+ var version = "5.3.0-beta.0";
474
474
 
475
475
  function relativify(path) {
476
476
  return path.startsWith('.') ? path : `./${path}`;
package/dist/index.js CHANGED
@@ -275,7 +275,9 @@ async function removeDir(dirPath) {
275
275
  const removedDirs = new Set();
276
276
  async function removeOutputDir(output, cwd) {
277
277
  const dir = output.dir;
278
- if (dir && dir !== cwd && !removedDirs.has(dir)) {
278
+ if (dir && // not equal to cwd
279
+ dir !== cwd && // not equal to src/ dir
280
+ dir !== path__default.default.resolve(cwd, SRC) && !removedDirs.has(dir)) {
279
281
  await removeDir(dir);
280
282
  removedDirs.add(dir);
281
283
  }
@@ -1343,7 +1345,8 @@ async function buildInputConfig(entry, bundleConfig, exportCondition, buildConte
1343
1345
  const swcParserConfig = {
1344
1346
  syntax: useTypeScript ? 'typescript' : 'ecmascript',
1345
1347
  [useTypeScript ? 'tsx' : 'jsx']: true,
1346
- exportDefaultFrom: true
1348
+ exportDefaultFrom: true,
1349
+ decorators: true
1347
1350
  };
1348
1351
  const swcOptions = {
1349
1352
  jsc: {
@@ -1353,6 +1356,9 @@ async function buildInputConfig(entry, bundleConfig, exportCondition, buildConte
1353
1356
  loose: true,
1354
1357
  externalHelpers: false,
1355
1358
  parser: swcParserConfig,
1359
+ transform: {
1360
+ decoratorVersion: '2022-03'
1361
+ },
1356
1362
  ...shouldMinify && {
1357
1363
  minify: {
1358
1364
  ...swcMinifyOptions,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bunchee",
3
- "version": "5.2.2",
3
+ "version": "5.3.0-beta.0",
4
4
  "description": "zero config bundler for js/ts/jsx libraries",
5
5
  "bin": "./dist/bin/cli.js",
6
6
  "main": "./dist/index.js",
@@ -70,7 +70,7 @@
70
70
  "@huozhi/testing-package": "1.0.0",
71
71
  "@swc-node/register": "^1.9.0",
72
72
  "@swc/jest": "^0.2.31",
73
- "@swc/types": "^0.1.5",
73
+ "@swc/types": "^0.1.9",
74
74
  "@types/clean-css": "^4.2.11",
75
75
  "@types/jest": "29.0.0",
76
76
  "@types/node": "^20.4.1",
@@ -104,7 +104,6 @@
104
104
  ],
105
105
  "testTimeout": 60000
106
106
  },
107
- "packageManager": "pnpm@8.8.0",
108
107
  "scripts": {
109
108
  "test": "jest --env node",
110
109
  "test:update": "TEST_UPDATE_SNAPSHOT=1 pnpm test",