yeoman-environment 3.9.0 → 3.9.1

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.
@@ -764,16 +764,10 @@ class Environment extends Base {
764
764
  };
765
765
 
766
766
  maybeGenerator = maybeGenerator || this.get(namespaceOrPath);
767
- if (maybeGenerator && (maybeGenerator.then || maybeGenerator.prototype._postConstruct)) {
767
+ if (maybeGenerator && maybeGenerator.then) {
768
768
  return Promise.resolve(maybeGenerator)
769
769
  .then(Generator => checkGenerator(Generator))
770
- .then(Generator => this.instantiate(Generator, args, options))
771
- .then(async generator => {
772
- if (!options.help && generator._postConstruct) {
773
- await generator._postConstruct();
774
- }
775
- return generator;
776
- });
770
+ .then(Generator => this.instantiate(Generator, args, options));
777
771
  }
778
772
 
779
773
  return this.instantiate(checkGenerator(maybeGenerator), args, options);
@@ -816,6 +810,10 @@ class Environment extends Base {
816
810
  ...environmentOptions
817
811
  };
818
812
 
813
+ if (!options.help && generator._postConstruct) {
814
+ return Promise.resolve(generator._postConstruct()).then(() => generator);
815
+ }
816
+
819
817
  return generator;
820
818
  }
821
819
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "yeoman-environment",
3
- "version": "3.9.0",
3
+ "version": "3.9.1",
4
4
  "description": "Handles the lifecyle and bootstrapping of generators in a specific environment",
5
5
  "homepage": "http://yeoman.io",
6
6
  "author": "Yeoman",