dynamo-bao 0.4.1 → 0.4.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.
@@ -15,11 +15,8 @@ function generateModelClass(
15
15
  outputDir,
16
16
  moduleSystem = 'commonjs',
17
17
  ) {
18
- // Calculate relative path to src directory from output directory
19
- const projectRoot = path.resolve(__dirname, '../..');
20
- const srcPath = path.join(projectRoot, 'src');
21
- const relativeSrcPath = path.relative(outputDir, srcPath).replace(/\\/g, '/');
22
- const srcImportPrefix = relativeSrcPath.startsWith('.') ? relativeSrcPath : './' + relativeSrcPath;
18
+ // Use bare package specifier so imports survive version bumps
19
+ const srcImportPrefix = 'dynamo-bao/src';
23
20
  if (!modelConfig || !modelConfig.fields) {
24
21
  throw new Error(
25
22
  `Invalid model configuration for ${modelName}: missing fields`,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dynamo-bao",
3
- "version": "0.4.1",
3
+ "version": "0.4.2",
4
4
  "description": "Simple powerful data modeling primitives for DynamoDB in JavaScript.",
5
5
  "main": "src/index.js",
6
6
  "exports": {