@form8ion/javascript 5.1.0 → 5.4.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/lib/index.cjs.js CHANGED
@@ -175,7 +175,7 @@ async function removeNyc ({
175
175
  force: true
176
176
  }), removeDependencies({
177
177
  packageManager,
178
- dependencies: ['nyc', '@istanbuljs/nyc-config-babel']
178
+ dependencies: ['nyc', '@istanbuljs/nyc-config-babel', 'babel-plugin-istanbul']
179
179
  })]);
180
180
  }
181
181
 
@@ -691,25 +691,18 @@ async function prompt({
691
691
  async function scaffoldBabel ({
692
692
  projectRoot,
693
693
  preset,
694
- tests,
695
694
  buildDirectory
696
695
  }) {
697
696
  if (!preset) {
698
697
  throw new Error('No babel preset provided. Cannot configure babel transpilation');
699
698
  }
700
699
 
701
- await fs.promises.writeFile(`${projectRoot}/.babelrc`, JSON.stringify(_objectSpread2({
700
+ await fs.promises.writeFile(`${projectRoot}/.babelrc`, JSON.stringify({
702
701
  presets: [preset.name],
703
702
  ignore: [`./${buildDirectory}/`]
704
- }, tests.unit && {
705
- env: {
706
- test: {
707
- plugins: ['istanbul']
708
- }
709
- }
710
- })));
703
+ }));
711
704
  return {
712
- devDependencies: ['@babel/register', preset.packageName, ...(tests.unit ? ['babel-plugin-istanbul'] : [])],
705
+ devDependencies: ['@babel/register', preset.packageName],
713
706
  eslint: {}
714
707
  };
715
708
  }
@@ -765,7 +758,6 @@ function scaffoldDialect ({
765
758
  projectType,
766
759
  projectRoot,
767
760
  configs,
768
- tests,
769
761
  buildDirectory,
770
762
  testFilenamePattern
771
763
  }) {
@@ -774,7 +766,6 @@ function scaffoldDialect ({
774
766
  return scaffoldBabel({
775
767
  preset: configs.babelPreset,
776
768
  projectRoot,
777
- tests,
778
769
  buildDirectory
779
770
  });
780
771
 
@@ -1163,7 +1154,8 @@ async function scaffoldPackageType ({
1163
1154
  }
1164
1155
  }, detailsForBuild)), javascriptCore.dialects.ESM === dialect && _objectSpread2({
1165
1156
  packageProperties: {
1166
- main: 'lib/index.es.js',
1157
+ main: './lib/index.es.js',
1158
+ exports: './lib/index.es.js',
1167
1159
  sideEffects: false,
1168
1160
  files: ['lib/']
1169
1161
  }
@@ -1733,7 +1725,6 @@ async function scaffolder (options) {
1733
1725
  configs,
1734
1726
  projectRoot,
1735
1727
  projectType,
1736
- tests,
1737
1728
  buildDirectory: projectTypeResults.buildDirectory,
1738
1729
  testFilenamePattern: verificationResults.testFilenamePattern
1739
1730
  })]);