@astral/pack 2.0.1 → 2.0.2

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
@@ -44,13 +44,13 @@ module.exports = defineConfig({
44
44
  ```json
45
45
  {
46
46
  "exports": {
47
- "./components/Button": "./components/Button/index.ts",
48
- "./components/Input": "./components/Button/index.tsx"
47
+ "./components/Button": "./src/components/Button/index.ts",
48
+ "./components/Input": "./src/components/Button/index.tsx"
49
49
  }
50
50
  }
51
51
  ```
52
52
 
53
- Строковые экспорты автоматически расширяются в полные объекты с учетом настроек `format` и `lang` из `pack.config.js`:
53
+ Строковые экспорты автоматически расширяются в полные объекты с учетом настроек `format` и `lang` из `pack.config.js`. Директория 'src' убирается из финального пути.
54
54
  ```json
55
55
  {
56
56
  "exports": {
@@ -146,12 +146,12 @@ pack create-release
146
146
  {
147
147
  "exports": {
148
148
  "./server": "./server/index.js",
149
- "./components/Button": "./components/Button/index.tsx"
149
+ "./components/Button": "./src/components/Button/index.tsx"
150
150
  }
151
151
  }
152
152
  ```
153
153
 
154
- Строковые экспорты автоматически расширяются в полные объекты с учетом настроек `format` и `lang`:
154
+ Строковые экспорты автоматически расширяются в полные объекты с учетом настроек `format` и `lang`. Директория 'src' убирается из финального пути.
155
155
  ```json
156
156
  {
157
157
  "exports": {
@@ -44,7 +44,7 @@ const initUpdatingReleaseGroup = (config, packageVersion) => (originPackageJson)
44
44
  */
45
45
  const expandStringExport = (value, format, lang) => {
46
46
  const exportItem = {};
47
- const jsPath = value.replace(/\.(ts|tsx|jsx)$/, '.js');
47
+ const jsPath = value.replace('/src', '').replace(/\.(ts|tsx|jsx)$/, '.js');
48
48
  if (format.includes('esm')) {
49
49
  exportItem.module = jsPath;
50
50
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@astral/pack",
3
- "version": "2.0.1",
3
+ "version": "2.0.2",
4
4
  "main": "./index.js",
5
5
  "bin": {
6
6
  "pack": "bin.js"