Giter Site home page Giter Site logo

wishtack / wishtack-steroids Goto Github PK

View Code? Open in Web Editor NEW
95.0 4.0 16.0 7.54 MB

Frontend on Steroids: Reactive Component Loader, RxJS Scavenger...

Home Page: https://wishtack.io

License: MIT License

JavaScript 8.05% TypeScript 91.70% HTML 0.25%
javascript typescript angular helpers tools monorepo ngx

wishtack-steroids's People

Contributors

edbzn avatar greenkeeper[bot] avatar jrpribs avatar misikir avatar yjaaidi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

wishtack-steroids's Issues

[issue] Uncaught (in promise): Error: StaticInjectorError(AppServerModule)[InjectionToken REACTIVE_COMPONENT_LOADER_MODULE_REGISTRY]:

Hi, thanks in advance for any help. This library saved my life.

Well, the thing is that I'm getting an error, I'm not sure if its a bug or not thats why I tagged it with [issue] instead.

Error I'm getting.
ERROR { Error: Uncaught (in promise): Error: StaticInjectorError(AppServerModule)[InjectionToken REACTIVE_COMPONENT_LOADER_MODULE_REGISTRY]: StaticInjectorError(Platform: core)[InjectionToken REACTIVE_COMPONENT_LOADER_MODULE_REGISTRY]: NullInjectorError: No provider for InjectionToken REACTIVE_COMPONENT_LOADER_MODULE_REGISTRY! Error: StaticInjectorError(AppServerModule)[InjectionToken REACTIVE_COMPONENT_LOADER_MODULE_REGISTRY]: StaticInjectorError(Platform: core)[InjectionToken REACTIVE_COMPONENT_LOADER_MODULE_REGISTRY]: NullInjectorError: No provider for InjectionToken REACTIVE_COMPONENT_LOADER_MODULE_REGISTRY!

My goal is intead of defining the following each time i needed and adding it to the import of my AppModule, importing all the routes using withModule based on a configuration file (if not i have to replicate routes 2 times...) :
ReactiveComponentLoaderModule.withModule({ moduleId: camelCase(route.path, { pascalCase: true }), loadChildren: 'app/views/aboutUs/AboutUs.module#AboutUsModule' })

Approach
`const core = NgModule({
imports: config.EngineRegistry.reduce((modules, route: EngineRegistryItem, index) => {

    return ([
        ...modules,
        ReactiveComponentLoaderModule.withModule({
            moduleId: camelCase(route.path, { pascalCase: true }),
            loadChildren: 'app/views/aboutUs/AboutUs.module#AboutUsModule'
        })
    ])
}, [ReactiveComponentLoaderModule.forRoot()]),
providers: [{ provide: NgModuleFactoryLoader, useClass: SystemJsNgModuleLoader }]

})(class { });

@NgModule({
imports: [
SSRTransition.forRoot({ appId: 'my-app' }),
BrowserModule,
PrebootModule.withConfig({ appRoot: 'app-root', replay: false }),
TransferHttpCacheModule,
BrowserAnimationsModule,
ComponentsModule,
RouterModule,
AppRoutes,
ReactiveComponentLoaderModule.forRoot(),
core
],
declarations: [AppComponent],
bootstrap: [AppComponent],
providers: [{ provide: NgModuleFactoryLoader, useClass: SystemJsNgModuleLoader }, SSRService]
})
export class AppModule { }`

I'm not sure why I'm getting this but If i add the routes manually it works... hope I don't require to duplicate my filesssss.

An in-range update of @types/angular is breaking the build 🚨

The devDependency @types/angular was updated from 1.6.50 to 1.6.51.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

@types/angular is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • ❌ continuous-integration/travis-ci/push: The Travis CI build failed (Details).

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

License file

Firstly, thanks very much for posting this awesome library. It's just the ticket for our large Angular 1.5 app that needs a sprinkling of onPush style change detection for some optimizations.

What license are you releasing this under? Based on your other libraries, I'm assuming MIT. If so, would you mind adding a license file? :)

Problem when compiling project with ECMAScript 2018

I have a problem compiling my project. The console throws several errors among which are the following:
"Uncaught TypeError: Cannot read property 'meteorInstall' of undefined",
"Uncaught TypeError: Cannot read property 'Base64' of undefined",
"Uncaught TypeError: Cannot read property 'EJSON' of undefined"
.....

I think it may be because of the configuration of the tscongig.json. I am using the ECMAScript version 'es2018' but if I change it to 'es2015' it works. My tsconfig.josn is the following:

`{

"compilerOptions": {
    "allowSyntheticDefaultImports": true,
    "baseUrl": ".",
    "declaration": false,
    "emitDecoratorMetadata": true,
    "importHelpers": true,
    "experimentalDecorators": true,
    "lib": [
        "es2018",
        "dom"
    ],
    "module": "commonjs",
    "moduleResolution": "node",
    "sourceMap": true,
    "target": "es5",
    "skipLibCheck": true,
    "stripInternal": true,
    "noImplicitAny": false,
    "typeRoots": [
        "node_modules/@types"
    ]
},
"include": [
    "imports/**/*.ts",
    "client/**/*.ts",
    "server/**/*.ts"
],
"exclude": [
    "node_modules",
    ".meteor/local"
],
"compileOnSave": false,
"angularCompilerOptions": {
    "genDir": "aot",
    "skipMetadataEmit": true,
    "enableIvy": true
},
"atom": {
    "rewriteTsconfig": false
}

}`

Is there incompatibility with the ECMAscript 2018 version?

Could you help me with this problem?

unable to work with after angular 9 migration

Hi,

Since We migrate from angular 8.x to 9 our application is not working properly with our subscriber,
I feel like scavenger do not auto unsubscribe anymore

ex:

this.queryService
          .getQueryParams()
          .pipe(this._scavenger.collectByKey("queryParams"))
          .subscribe(params => {
            this.getMultiSearches(currentUser.organizationId, params);
          });

An in-range update of webpack-cli is breaking the build 🚨

The devDependency webpack-cli was updated from 3.2.1 to 3.2.2.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

webpack-cli is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • ❌ continuous-integration/travis-ci/push: The Travis CI build failed (Details).

Commits

The new version differs by 88 commits.

There are 88 commits in total.

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

Angular 8 Ivy issue

When i compile project i get error: ERROR in Value at position 1 in the NgModule.imports of ReactiveComponentLoaderModule is not a reference: [object Object] when Compiling @wishtack/reactive-component-loader : main as umd

Find component by selector with IVY enabled

I searched for a way to lazy load modules and create components by only knowing its selector. I found this library and was quite amazed - it works perfect (also with AoT). But then I tried to apply it to my Angular 9 project with Ivy enabled and recognized that it always creates the same component. Then I had a look into the implementation and saw that for the Ivy variant the selector is ignored:

const [ bootstrapComponent ] = moduleRef._bootstrapComponents;

So without Ivy the correct component is searched from the entryComponents array but with Ivy enabled it always creates first of the bootstrapComponents.
Do you have plans to apply finding the right component by its selector also to the Ivy variant?
And do you have plans to update your library to Angular 9?

scavenger.js es7.array.includes not recognize with latest core-js

Hi,

I found your package really helpful, Thanks for sharing them with the community.

I'm having an issue with rx-scavenger.

I'm using angular 8.1 and I'm having the following error when I try to serve it :

ERROR in ./node_modules/@wishtack/rx-scavenger/dist/scavenger.js
Module not found: Error: Can't resolve 'core-js/es6/map' in 'C:\dev\node_modules\@wishtack\rx-scavenger\dist'
ERROR in ./node_modules/@wishtack/rx-scavenger/dist/scavenger.js
Module not found: Error: Can't resolve 'core-js/modules/es7.array.includes' in 'C:\dev\node_modules\@wishtack\rx-scavenger\dist'

Any idea how to reolve this issue ?

Thanks for your help in advance

Trying to get reactive-component-loader to work

Hi. Just trying out your component to attempt to load components from other lazily loaded modules into a lazily loaded module. I'm having a few gremlins trying to get it to work.

The readme does not show import declarations so I am assuming they should be for both appmodule and the feature module:
import { ReactiveComponentLoaderModule } from '@wishtack/reactive-component-loader';

In my feature module, I'm adding in the imports array:

ReactiveComponentLoaderModule.withModule({
	moduleId: 'patientRecord',
	loadChildren: '../patientRecord/patientRecord.module#PatientRecordModule' ,
}),

I do not know what the ./+ does in your example in the readme. For my app, I'm looking to load a module from a relative path in the folder structure.

In the component that I wish to use :

<wt-lazy [location]="patientRecordComponentLocation" [inputs]="{bannerOptions: patientBannerOptions}"></wt-lazy>

I am unsure if I need the closing or not.

I have defined in the component:

patientRecordComponentLocation = {
	moduleId: 'patientRecord',
	selector: 'patient-record',
};

Unfortunately, when I try to run the app I get an error:

Uncaught SyntaxError: Unexpected token {

This error is referencing the import line in the ng-dynamic-component library that you depend upon.
Angular basically does not start at all.

/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//                                                                                                                     //
// node_modules/ng-dynamic-component/dynamic/io.service.js                                                             //
//                                                                                                                     //
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
                                                                                                                       //
/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,extraRequire,missingReturn,uselessCode} checked by tsc
 */
import { ComponentFactoryResolver, Injectable, KeyValueDiffers, } from '@angular/core';

Any ideas about what can be causing this?

ng8 & ivy

Hi,

is it possible to make "reactive-component-loader" ivy-ready?

enable ivy in tsconfig.json
{ ... "angularCompilerOptions": { "enableIvy": true } ... }

change
loadChildren: './dyn.module#DynModule', // old style
to
loadChildren: (() => import('./dyn.module').then(m => m.DynModule)), // new style

with old pre-ivy-style i get an error:

core.js:7187 ERROR TypeError: Cannot read property 'values' of undefined
at ReactiveComponentLoader._tryGetComponentType (wishtack-reactive-component-loader.js:116)
at ReactiveComponentLoader. (wishtack-reactive-component-loader.js:97)
at Generator.next ()
at fulfilled (tslib.es6.js:68)
at ZoneDelegate.invoke (zone-evergreen.js:359)
at Object.onInvoke (core.js:30900)
at ZoneDelegate.invoke (zone-evergreen.js:358)
at Zone.run (zone-evergreen.js:124)
at zone-evergreen.js:855
at ZoneDelegate.invokeTask (zone-evergreen.js:391)

with new style i get an other error:

ERROR TypeError: path.split is not a function or its return value is not iterable
at SystemJsNgModuleLoader.loadAndCompile (core.js:32294)
at SystemJsNgModuleLoader.load (core.js:32286)
at ReactiveComponentLoader. (wishtack-reactive-component-loader.js:135)
at Generator.next ()
at tslib.es6.js:71
at new ZoneAwarePromise (zone-evergreen.js:876)
at __awaiter (tslib.es6.js:67)
at ReactiveComponentLoader._getModuleFactory (wishtack-reactive-component-loader.js:134)
at ReactiveComponentLoader. (wishtack-reactive-component-loader.js:91)
at Generator.next ()

An in-range update of karma is breaking the build 🚨

The devDependency karma was updated from 3.1.1 to 3.1.2.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

karma is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • ❌ continuous-integration/travis-ci/push: The Travis CI build failed (Details).

Release Notes for v3.1.2

Bug Fixes

Features

Commits

The new version differs by 11 commits.

  • 7d4d347 chore: release v3.1.2
  • 5077c18 chore: update contributors
  • fb05fb1 fix(server): use flatted for json.stringify (#3220)
  • 2682bff feat(docs): callout the key debug strategies. (#3219)
  • 4e87902 fix(changelog): remove release which does not exist (#3214)
  • 30ff73b fix(browser): report errors to console during singleRun=false (#3209)
  • 5334d1a fix(file-list): do not preprocess up-to-date files (#3196)
  • dc5f5de fix(deps): upgrade sinon-chai 2.x -> 3.x (#3207)
  • d38f344 fix(package): bump lodash version (#3203)
  • ffb41f9 refactor(browser): log state transitions in debug (#3202)
  • 240209f fix(dep): Bump useragent to fix HeadlessChrome version (#3201)

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

Can't resolve ng-dynamic-component

I think there is a problem with the package, I get an error in angular cli that it cannot resolve ng-dynamic-component and @whistack/rxscavenger, I don't think there is an error with my code, because I'm not using it, I'm just importing the module
image

An in-range update of lerna is breaking the build 🚨

The devDependency lerna was updated from 3.4.3 to 3.5.0.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

lerna is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • ❌ continuous-integration/travis-ci/push: The Travis CI build failed (Details).

Commits

The new version differs by 48 commits.

  • 1c142db chore(release): publish v3.5.0
  • fbf9629 refactor(version): Tweak error code when remote branch does not exist
  • b199f32 refactor(publish): Allow --git-reset to be configured from lerna.json
  • 3b98973 refactor(publish): Gather current tags filtered by --list glob
  • 1aa1712 chore: bump eslint-plugin-jest
  • f4edc76 docs: Remove broken badges
  • bc56839 chore: sync protocol of public registry
  • 1a78f1a chore: reset lockfile
  • 3cb7465 fix(publish): Ignore non-release tags when detecting from-git (#1782)
  • 7ee05d7 feat(version): Add --include-merged-tags option (#1712)
  • e2c0342 docs: Fix link to --git-remote option (#1796) [ci skip]
  • eae5619 feat(publish): Add option --no-git-reset to leave unstaged changes in working tree (#1791)
  • b69a728 feat(run): Log package name and timing in runScriptInPackageCapturing (#1781)
  • 9d36654 feat(import) Add --dest option to explicitly specify import destination (#1772)
  • cd34b48 fix(version): Add friendly error message when remote branch doesn't exist (#1741)

There are 48 commits in total.

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

NullInjectorError: No provider for InjectionToken ComponentInjector!

Hi!

Today I updated most of my npm packages and it seems there is some problem. Everything compiles successfully but when I open my browser I get this error in my console:

ERROR NullInjectorError: StaticInjectorError(AppModule)[DynamicDirective -> InjectionToken ComponentInjector]: 
  StaticInjectorError(Platform: core)[DynamicDirective -> InjectionToken ComponentInjector]: 
    NullInjectorError: No provider for InjectionToken ComponentInjector!
    at NullInjector.push../node_modules/@angular/core/fesm5/core.js.NullInjector.get (http://localhost:31337/vendor.js:16123:25)
    at resolveToken (http://localhost:31337/vendor.js:27315:24)
    at tryResolveToken (http://localhost:31337/vendor.js:27259:16)
    at StaticInjector.push../node_modules/@angular/core/fesm5/core.js.StaticInjector.get (http://localhost:31337/vendor.js:27161:20)
    at resolveToken (http://localhost:31337/vendor.js:27315:24)
    at tryResolveToken (http://localhost:31337/vendor.js:27259:16)
    at StaticInjector.push../node_modules/@angular/core/fesm5/core.js.StaticInjector.get (http://localhost:31337/vendor.js:27161:20)
    at resolveNgModuleDep (http://localhost:31337/vendor.js:35631:29)
    at NgModuleRef_.push../node_modules/@angular/core/fesm5/core.js.NgModuleRef_.get (http://localhost:31337/vendor.js:36302:16)
    at resolveDep (http://localhost:31337/vendor.js:36673:45)

This is my package.json:

{
  "name": "WebApp",
  "version": "1.0.0",
  "license": "MIT",
  "scripts": {
    "ng": "ng",
    "start": "ng serve --configuration=bg",
    "build": "node --max_old_space_size=8192 node_modules/@angular/cli/bin/ng build",
    "build:ssr": "npm run build -- --app=ssr --output-hashing=media",
    "test": "ng test",
    "lint": "ng lint",
    "e2e": "ng e2e"
  },
  "private": true,
  "dependencies": {
    "@angular/animations": "^8.2.7",
    "@angular/common": "^8.2.7",
    "@angular/compiler": "^8.2.7",
    "@angular/core": "^8.2.7",
    "@angular/forms": "^8.2.7",
    "@angular/http": "^7.2.15",
    "@angular/platform-browser": "^8.2.7",
    "@angular/platform-browser-dynamic": "^8.2.7",
    "@angular/platform-server": "^8.2.7",
    "@angular/router": "^8.2.7",
    "@fortawesome/fontawesome-free": "^5.11.1",
    "@ng-bootstrap/ng-bootstrap": "^5.1.1",
    "@ngrx/effects": "^8.3.0",
    "@ngrx/store": "^8.3.0",
    "@ngrx/store-devtools": "^8.3.0",
    "@nguniversal/module-map-ngfactory-loader": "^8.1.1",
    "@progress/kendo-angular-buttons": "^5.0.0",
    "@progress/kendo-angular-common": "^1.1.0",
    "@progress/kendo-angular-dateinputs": "^4.1.0",
    "@progress/kendo-angular-dialog": "^4.1.0",
    "@progress/kendo-angular-dropdowns": "^4.1.0",
    "@progress/kendo-angular-excel-export": "^3.0.1",
    "@progress/kendo-angular-grid": "^4.3.0",
    "@progress/kendo-angular-inputs": "^6.2.0",
    "@progress/kendo-angular-intl": "^2.0.0",
    "@progress/kendo-angular-l10n": "^2.0.0",
    "@progress/kendo-angular-layout": "^4.1.0",
    "@progress/kendo-angular-menu": "^2.0.0",
    "@progress/kendo-angular-pdf-export": "^2.0.0",
    "@progress/kendo-angular-popup": "^3.0.1",
    "@progress/kendo-angular-scrollview": "latest",
    "@progress/kendo-angular-tooltip": "^2.1.0",
    "@progress/kendo-angular-treeview": "^4.0.1",
    "@progress/kendo-angular-upload": "^5.1.0",
    "@progress/kendo-data-query": "^1.5.2",
    "@progress/kendo-drawing": "^1.2.0",
    "@progress/kendo-schematics": "latest",
    "@progress/kendo-theme-default": "^4.3.2",
    "@progress/kendo-ui": "^2019.3.917",
    "@progress/telerik-angular-report-viewer": "^8.19.918",
    "@types/lodash": "^4.14.138",
    "@wishtack/reactive-component-loader": "^1.0.0",
    "@wishtack/rx-scavenger": "^1.0.5",
    "ajv": "^6.10.2",
    "apollo-angular": "^1.7.0",
    "apollo-angular-link-http": "^1.8.0",
    "apollo-cache-inmemory": "^1.6.3",
    "apollo-client": "^2.6.4",
    "apollo-link": "^1.2.13",
    "apollo-link-context": "^1.0.19",
    "apollo-link-ws": "^1.0.19",
    "apollo-utilities": "^1.3.2",
    "aspnet-prerendering": "^3.0.1",
    "bootstrap": "^4.3.1",
    "core-js": "^3.2.1",
    "graphql": "^14.5.6",
    "graphql-tag": "^2.10.1",
    "jasny-bootstrap": "4.0.0",
    "jquery": "^3.4.1",
    "lodash": "^4.17.15",
    "ng-dynamic-component": "^5.0.0",
    "ngx-viewer": "^1.0.5",
    "perfect-scrollbar": "^1.4.0",
    "popper.js": "^1.15.0",
    "reflect-metadata": "^0.1.13",
    "rxjs": "^6.5.3",
    "rxjs-compat": "^6.5.3",
    "subscriptions-transport-ws": "^0.9.16",
    "viewerjs": "^1.3.6",
    "web-animations-js": "^2.3.2",
    "zone.js": "^0.10.2"
  },
  "devDependencies": {
    "@angular-devkit/build-angular": "^0.803.5",
    "@angular/cli": "^8.3.5",
    "@angular/compiler-cli": "^8.2.7",
    "@angular/language-service": "^8.2.7",
    "@types/bootstrap": "^4.3.1",
    "@types/chartist": "^0.9.46",
    "@types/jasmine": "^3.4.0",
    "@types/jasminewd2": "^2.0.6",
    "@types/jquery": "^3.3.31",
    "@types/node": "^12.7.5",
    "codelyzer": "^5.1.1",
    "jasmine-core": "^3.4.0",
    "jasmine-spec-reporter": "^4.2.1",
    "karma": "^4.3.0",
    "karma-chrome-launcher": "^3.1.0",
    "karma-cli": "2.0.0",
    "karma-coverage-istanbul-reporter": "^2.1.0",
    "karma-jasmine": "^2.0.1",
    "karma-jasmine-html-reporter": "^1.4.2",
    "protractor": "^5.4.2",
    "ts-node": "^8.4.1",
    "tslint": "^5.20.0",
    "typescript": "^3.5.3"
  },
  "optionalDependencies": {
    "node-sass": "^4.12.0"
  }
}

I would be grateful if you could help me identify and solve the problem.

Error after migrating to Angular version 14

After migrating my project to version 14 of Angular, the error below started to occur when starting the project:

./node_modules/@wishtack/reactive-component-loader/ivy_ngcc/dist/reactive-component-loader/fesm2015/wishtack-reactive-component-loader.js:246:128-149 - Error: export 'NgModuleFactoryLoader' (imported as 'NgModuleFactoryLoader') was not found in '@angular/core'

Could anyone help me?

Grateful.

An in-range update of lerna is breaking the build 🚨

The devDependency lerna was updated from 3.13.3 to 3.13.4.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

lerna is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • ❌ continuous-integration/travis-ci/push: The Travis CI build could not complete due to an error (Details).

Release Notes for v3.13.4

3.13.4 (2019-04-24)

Bug Fixes

  • import: Avoid "unrecognized input" error from colors when using --flatten (#2037) (51625fa), closes #1644
  • version: Resolve prerelease for version without bump (#2041) (aa11325)
  • version: Search for complete tag prefix when composing GitHub releases (024a6ab), closes #2038
Commits

The new version differs by 8 commits.

  • e32da08 chore(release): v3.13.4
  • 024a6ab fix(version): Search for complete tag prefix when composing GitHub releases
  • 090e180 test(version): Ensure prompt default preserves prereleaseId
  • c1aafe7 test(version): Simplify version-bump assertions
  • cdc5e46 chore: bump dev deps, reset lockfile
  • aa11325 fix(version): Resolve prerelease for version without bump (#2041)
  • 8ccf844 test(exec/run): Explicitly test --no-sort
  • 51625fa fix(import): Avoid "unrecognized input" error from colors when using --flatten (#2037)

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

rx-scavenger: Doesn't work without OnDestroy

I was curious since according to the readme this should work without implementing the OnDestroy interface. But I tried it and it doesn't work.

The lib fails because Angular doesn't call the OnDestroy lifecycle method when the method is added afterwards. In order to fix this you are probably required to change component?: ComponentWithOptionalOnDestroy to component?: OnDestroy

See this discussion for more details:
w11k/ngx-componentdestroyed#1

Support for Angular v.16

Is there any update available for @wishtack/rx-scavenger that supports RxJS version 7.x.x? I'm encountering issues with peerDependency because the latest version of @wishtack/rx-scavenger is compatible with RxJS version 6.x.x.

[esnext] tsconfig.server.json remove "module":"commonjs" issue

Hi,

Using commonjs, there is not isssue. Everything is working fine

I've spent the morning on this issue and I've created a sample to reproduce the issue:

When I remove the "module":"commonjs" from tsconfig.server.js from tour of heroes

"compilerOptions": {
  "outDir": "../out-tsc/app",
  "baseUrl": "./",
  //"module": "commonjs",
  "types": []
},

It will use by default "esnext" module

and include a hello world wt-lazy and add it to the app.component.ts then npm run build:ssr

.html

<wt-lazy [location]="helloLocation"
         [inputs]="{name:'World'}"></wt-lazy>

app.component.ts

helloLocation = {
        moduleId: 'wt-hello',
        selector: 'app-hello'
    };

app.module.ts

 imports: [
...
 ReactiveComponentLoaderModule.forRoot(),
        ReactiveComponentLoaderModule.withModule({
            moduleId: 'wt-hello',
            loadChildren: () => import('src/app/hello/hello.module').then(m => m.HelloModule)
        }),
]

under dist/server/, i will find a file name hello-hello-module-ngfactory.js

If I run the server with node dist/server

I will get the following error

Running on the server with appId=tour-of-heroes
ERROR TypeError: Cannot read property 'call' of undefined
    at __webpack_require__ (C:\dev\test\universal\dist\server.js:69485:30)
    at Function.requireEnsure [as e] (C:\dev\test\universal\dist\server.js:69504
:25)
    at Object.Ι΅0 [as loadChildren] (C:\dev\test\universal\dist\server.js:69819:3
8)
    at ReactiveComponentLoader.<anonymous> (C:\dev\test\universal\dist\server.js
:157144:65)
    at step (C:\dev\test\universal\dist\server.js:34967:23)
    at Object.next (C:\dev\test\universal\dist\server.js:34948:53)
    at C:\dev\test\universal\dist\server.js:34941:71
    at new ZoneAwarePromise (C:\dev\test\universal\dist\server.js:1068:33)
    at __awaiter (C:\dev\test\universal\dist\server.js:34937:12)
    at ReactiveComponentLoader._getModuleFactory (C:\dev\test\universal\dist\ser
ver.js:157133:71)

For the moment, I have a solution using commonjs module nevertheless whenever you have time it will be good to be able to use 'esnext'

Thanks in advance

No provider for InjectionToken REACTIVE_COMPONENT_LOADER_MODULE_REGISTRY

I just install reactive-component-loader + its dependency (rx-scavenger + ng-dynamic-component).
The build is OK (JIT and AOT), but when trying to access the website, I got the following console error: "NullInjectorError: No provider for InjectionToken REACTIVE_COMPONENT_LOADER_MODULE_REGISTRY!"

Tested version of the lib: 0.2.5 and 0.2.4
Angular-cli v7.3.8

After taking a look in the code of the lib, I figura out that:

  • v0.2.5 is not up to date with master
  • in the code of v0.2.5, is never declared as a provider :
export declare class ReactiveComponentLoaderModule {
    static forRoot(): {
        ngModule: typeof ReactiveComponentLoaderModule;
        providers: {
            provide: typeof NgModuleFactoryLoader;
            useClass: typeof SystemJsNgModuleLoader;
        }[];
    };
    static withModule(moduleInfo: ModuleInfo): ModuleWithProviders;
}

And on master branch:

@NgModule({
    declarations: [
        LazyComponent,
        LazyDirective
    ],
    exports: [
        LazyComponent,
        LazyDirective
    ],
    imports: [
        CommonModule,
        DynamicModule.withComponents([])
    ],
    providers: [
        /* @HACK: Add an empty array to ROUTE token.
         * Otherwise `PreloadAllModules` preloading strategy ends up in infinite loop. */
        provideRoutes([])
    ]
})
export class ReactiveComponentLoaderModule {

    static forRoot() {
        return {
            ngModule: ReactiveComponentLoaderModule,
            providers: [
                {
                    provide: NgModuleFactoryLoader,
                    useClass: SystemJsNgModuleLoader
                }
            ]
        };
    }

    static withModule(moduleInfo: ModuleInfo): ModuleWithProviders {
        return {
            ngModule: ReactiveComponentLoaderModule,
            providers: [
                provideRoutes([
                    {
                        loadChildren: moduleInfo.loadChildren,
                        matcher: noMatch
                    }
                ]),
                {
                    **provide: REACTIVE_COMPONENT_LOADER_MODULE_REGISTRY,**
                    useValue: moduleInfo,
                    multi: true
                }
            ]
        };
    }
}

ReactiveComponentLoaderModule.forRoot in root module and withModule for child module not working, but working vice versa

Angular 8

I did according to documentation, but it doesn't working. In runtime I getting error: No provider for InjectionToken REACTIVE_COMPONENT_LOADER_MODULE_REGISTRY!

Then I moved ReactiveComponentLoaderModule.withModule to root module, but It didn't work because wt-lazy not defined in child module, so I declared ReactiveComponentLoaderModule.forRoot() in child module's imports and it works.

Is the problem with the module itself for the latest angular version or documentation incorrect?

An in-range update of lerna is breaking the build 🚨

The devDependency lerna was updated from 3.10.7 to 3.10.8.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

lerna is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • ❌ continuous-integration/travis-ci/push: The Travis CI build failed (Details).

Release Notes for v3.10.8

Bug Fixes

  • conventional-commits: Support legacy callback presets (60647b4), closes #1896
  • publish: Skip private package lookup (#1905) (f9e18fa)
  • version: Fix negated option links in readme (0908212)
Commits

The new version differs by 7 commits.

  • aaa1825 chore(release): v3.10.8
  • de41377 docs(publish): Update canary description with accurate version generation
  • 60647b4 fix(conventional-commits): Support legacy callback presets
  • c0a750e docs(version): Add examples for generating initial changelogs
  • 0908212 fix(version): Fix negated option links in readme
  • f9e18fa fix(publish): Skip private package lookup (#1905)
  • c78a86c docs(version): update config namespace in examples (#1885)

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

Error with Production Mode NULLINJECTORERROR

I am using ReactiveComponentLoaderModule to open a module to another module on requirement, which was working fine for me in development mode. ng b --watch does not produce any error and works perfectly but when I try to build the production build,
I get ERROR NullInjectorError: StaticInjectorError(o)[_ -> InjectionToken ComponentInjector] I've tried things to solve but nothing worked for me, build is successful but on the browser it doesn't open. I'm attaching screenshots with it.
Please help me out.

image
image

schematics scam: angular 12 ?

ng generate @wishtack/schematics:scam features/xxx

after upgrade angular 9 to angular 12 I have this errror :

"WishtackSchematicsScam" schema is using the keyword "id" which its support is deprecated. Use "$id" for schema ID.
Schematic input does not validate against the Schema: {"name":"features/dashboard/widgets/xxxxxxx","project":"xxxxx","inlineStyle":false,"inlineTemplate":false,"changeDetection":"Default","styleext":"css","style":"css","spec":true,"skipTests":false,"flat":false,"skipImport":false,"entryComponent":false,"lintFix":false,"separateModule":false}
Errors:

  Data path "" must NOT have additional properties(inlineStyle). 
   "@angular/animations": "12.1.1",
   "@angular/cdk": "12.1.0",
   "@angular/common": "12.1.1",
   "@angular/compiler": "12.1.1",
   "@angular/core": "12.1.1",
   "@angular/forms": "12.1.1",
   "@angular/material": "12.1.0",
   "@angular/material-moment-adapter": "12.1.0",
   "@angular/platform-browser": "12.1.1",
   "@angular/platform-browser-dynamic": "12.1.1",
   "@angular/router": "12.1.1",
   "@wishtack/schematics": "^1.1.2",

After upgrading to 1.1.0 i'm getting scavenger error

After upgrading to 1.1.0 we are getting this error:

Module not found: Error: Can't resolve 'core-js/es/map' in '../node_modules/@wishtack/rx-scavenger/dist'

Might also help:

Field 'browser' doesn't contain a valid alias configuration

It also happens when upgrading to 1.0.1

After downgrading to 1.0.0 everything seems to work.
We are on the latest stable Angular (8.2.12)

es5 - compatible / ng-dynamic-component as dependency

  • transpile the whole package (reactive-component-loader) to es5 to use it in ie9/11 (supported by angular)
  • move the devDependency "ng-dynamic-component" (ideally well transpiled to es5 too) to the dependency to avoid install it by myself

or provide the ts-sources in the npm-repo to deep-import the ts-files and transpile by angular itself

An in-range update of @types/angular is breaking the build 🚨

The devDependency @types/angular was updated from 1.6.51 to 1.6.52.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

@types/angular is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • ❌ continuous-integration/travis-ci/push: The Travis CI build failed (Details).

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

No module factory available for dependency type: ContextElementDependency

Yes, this issue seems to be covered here and here but those answered doesn't resolve this case. This case is different.

For one, I only have one version of webpack:
$ npm ls webpack [email protected] C:\LA\src\LogAnalyticsPortalWebRole -- @angular-devkit/[email protected]
-- [email protected]

Here is my code:
editor.module.ts (the lazy loaded module):

'use strict';
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { EditorComponent } from "./editor.component";

@NgModule({
    declarations: [
        EditorComponent
    ],
    imports: [
        CommonModule,
    ],
    providers: [
    ],
    exports: [
        EditorComponent
    ]
})
export class EditorModule { }

lazy.module.ts (the module the contains the lazy load component):

'use strict';

import { NgModule } from '@angular/core';
import { ReactiveComponentLoaderModule } from '@wishtack/reactive-component-loader';
import { lazyLoadComponents } from'./lazyLoadComponents';


@NgModule({
    declarations: [
        ...lazyLoadComponents
    ],
    imports: [
        ReactiveComponentLoaderModule.withModule({
            moduleId: 'editor',
            loadChildren: '../editor/editor.module#EditorModule'
        }),
    ],
    providers: [
    ],
    exports: [
        ...lazyLoadComponents
    ]
})
export class LazyModule { }

app.module

@NgModule({
    declarations: [
        AppComponent,
    ],
    imports: [
        ...
        ReactiveComponentLoaderModule.forRoot()
        ...
    ],
    providers: [
    ],
    entryComponents: [
        ...lazyLoadComponents
    ]
})
export class AppModule { ... }

editor-initiator.component.ts (the lazy load component):

`import { Component } from '@angular/core';
import { downgradeComponent } from '@angular/upgrade/static';

@Component({
	selector: 'la-editor-initiator',
	template: `
	<h1>editor-initiator works!</h1>

	<wt-lazy
	[location]="editorComponentLocation" >
	</wt-lazy>`,
})
export class EditorInitiatorComponent {
	editorComponentLocation = {
		moduleId: 'editor',
		selector: 'wt-editor'
	};
}

angular.module('kibana').directive('laEditorInitiator', downgradeComponent({ component: EditorInitiatorComponent }) as angular.IDirectiveFactory);`

I debugged the webpack code and I noticed that in Compilation.js:696
image

the this.dependencyFactories has the ContextElementDependency module in its map but for some reason the this.dependencyFactories.get(dep.constructor) returns undefined.

I hope this can help.

Angular 10?

Hi,

I am looking at loading Modules dynamically in my child routing. I am trying out this package but I am getting some errors that the module can't be found on Angular 10.
I tried to create a Stackblitz version so I can show you what I am trying to do but when I install this package on Stackblitz, I get the error ngcc failed to run on @wishtack/[email protected]..

Anyway, what I am trying in my main app-routing.module file is the following:

const routes: Routes = [
  {
    path:  '**',
    resolve: {
      template: TemplateResolver
    },
    children: [
      {
        path: '',
        component: TemplateLoaderComponent
      }
    ]
  }
];

The TemplateResolver will receive a recipe with instructions on what template needs to be loaded, which should be decided in the TemplateLoaderComponent.

In the TemplateLoaderComponent I would like to be able to load Module A, Module B or Module C based on what the recipe returns.

Then these Modules will have their own routing file with a root path ('') and a 'thankyou' path.

Is that possible with this package?

Alternatively I would do it in Angular using a load childeren construction like:

const routes: Routes = [
  {
    path:  '**',
    resolve: {
      template: TemplateResolver
    },
    children: [
      {
        path: 'moduleA',
       loadChildren: () => import('./modules/oduleA/moduleA.module').then(m => m.ModuleAModule) 
      },
     {
        path: 'moduleB',
       loadChildren: () => import('./modules/oduleA/moduleA.module').then(m => m.ModuleAModule) 
      },
     {
        path: 'moduleC',
       loadChildren: () => import('./modules/oduleA/moduleA.module').then(m => m.ModuleAModule) 
      }
    ]
  }
];

but I don't want to have to be come rootpath/moduleA. It should just be rootpath and then based on the Template Resolver it loads either ModuleA, B, or C.

An in-range update of webpack is breaking the build 🚨

The devDependency webpack was updated from 4.29.0 to 4.29.1.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

webpack is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • ❌ continuous-integration/travis-ci/push: The Travis CI build failed (Details).

Release Notes for v4.29.1

Bugfixes

  • add missing __esModule flag when modules are concatenated, but without usage information
Commits

The new version differs by 14 commits.

  • 6934b98 4.29.1
  • 960f396 Merge pull request #8686 from MarkPollmann/patch-1
  • 8627743 Merge pull request #8678 from bhavya9107/patch-1
  • 915c32d docs(README): remove to from link
  • 9737a3b Update README.md
  • f654a49 docs(README):Update index
  • c957338 docs(README): newline after index
  • 09cf713 docs(README): add index
  • 07d4d85 Merge pull request #8676 from hulkish/fix-side-effects-example
  • 2209b8a rebuild examples
  • 780c17e fix side-effects example
  • 2fe0ba5 Normalize backslash on windows
  • a0eab48 Merge pull request #8667 from webpack/bugfix/esModule-flag
  • 42007e8 fixes #8666

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

Rx-Scavenger doesn't work after migration from angular 9 to 10

Hi,

Since migration from angular 9 to 10 our application is not working properly with our subscriber,
I feel like scavenger do not auto unsubscribe anymore.

I tried with the same version of core-js (3.3.3) and rxjs (6.4.0) but it still doesn't work, any hint if I want to contribute to this issue?

Thank you

An in-range update of webpack is breaking the build 🚨

The devDependency webpack was updated from 4.25.0 to 4.25.1.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

webpack is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • ❌ continuous-integration/travis-ci/push: The Travis CI build failed (Details).

Release Notes for v4.25.1

Bugfixes

  • fix replacement of compile-time constant expression when expression is a wrapped expression (string prefix and/or suffix).
Commits

The new version differs by 6 commits.

  • 2361995 4.25.1
  • e2a2016 Merge pull request #8338 from webpack/bugfix/issue-8293
  • babe736 replace prefix/postfix even when equal for wrapped context
  • dcd0d59 test for #8293
  • af123a8 Merge pull request #8334 from webpack/bugfix/lint
  • 36eb0bb move azure specific commands to azure-pipelines.yml

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

An in-range update of webpack-merge is breaking the build 🚨

The devDependency webpack-merge was updated from 4.1.5 to 4.2.1.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

webpack-merge is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • ❌ continuous-integration/travis-ci/push: The Travis CI build failed (Details).

Commits

The new version differs by 10 commits.

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

An in-range update of @types/jasmine is breaking the build 🚨

The devDependency @types/jasmine was updated from 2.8.9 to 2.8.10.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

@types/jasmine is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • ❌ continuous-integration/travis-ci/push: The Travis CI build failed (Details).

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

An in-range update of webpack-cli is breaking the build 🚨

The devDependency webpack-cli was updated from 3.1.2 to 3.2.0.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

webpack-cli is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • ❌ continuous-integration/travis-ci/push: The Travis CI build failed (Details).

Commits

The new version differs by 124 commits.

  • 6253a73 chore: v.3.2.0
  • 0c3be76 chore: make tests pass
  • 0b6bab3 chore: better defaults
  • 78436ff chore: add-on -> scaffold
  • 3281372 chore: simplify clean-all script
  • b0f4a0f chore: addon -> scaffold
  • 82c9ea8 chore: update lockfiles
  • a3fe013 Merge pull request #716 from EvsChen/dist-scaffold
  • f9bb82d Merge pull request #693 from lakatostamas/feature/find-config-recursively
  • 3ec2e9d chore: resolve conflict
  • 83602d4 chore: update package lock and scripts
  • d82b016 Merge pull request #720 from rishabh3112/patch-7
  • 4d9c847 Merge pull request #723 from eavichay/patch-1
  • 4b2a127 docs: improve the docs (#722)
  • 9ad8c1d See #721

There are 124 commits in total.

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

Reactive component loader: Lazy loading with preloadAllModules strategy causing load loop (?)

Just wanted to let others that might be in the same situation know that Reactive component loader doesn't seem to work with preloadingStrategy: preloadAllModules. At least for me disabling this strategy instantly fixed my issue, which was that the page just would load infinitely / become unresponsive. The strategy was likely causing some infinite loop.

Will come back here and try to create a minimal reproduction when I find the time.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.