Description
Original issue/idea discussed in #4041
Link to design document
-
@nativescript/core
package-
Move all the code to
@nativescript/core
generate thetns-core-modules
compatibility package -
generate tests that validate that compatibility package exports all modules
-
Update developer workflow. There should be an easy way to setup the
nativescript/nativescript
repo so that you can run thetests
and alle2e
projects with linked modules and HMR. -
Do a detailed review of the barrel exports:
-
@nativescript/core
-
@nativescript/core/ui
-
@nativescript/core/ui/layouts
- Missing modules. Style, FormattedString etc.
-
Styling
-> there are a couple of useful things from styling modules: -
export { addTaggedAdditionalCSS, removeTaggedAdditionalCSS } from "./styling/style-scope";
-
export { Style } from "./styling/style";
-
FormattedString
,Text
,Span
-
-
-
Move methods exported by modules into static class-mehtods, thus eliminating the need of
ns
prefix-ed objects. Problematic modules:-
Frame
-
Builder
-
ImageSource
-
Application
-
Application-settings
-
Connectivity
-
Http
-
Profiling
-
Trace
-
Utils
- consider using namespaces where appropriate
-
-
Move modules into
ui
. Create re-exports on the original place for back-compat. Models that should be moved inui
:-
FormattedString
andSpan
-
-
Handle EventDatas and clashing interfaces names. Try to define all event-data interfaces in one place only and reuse.
-
generate documentation (with typedoc) for the scoped packages.
- Research if we can generate typedoc for barrel files (seems now that re-exported modules are not documented). Result: rollup d.ts generated with
api-extractor
. - Docs for functions re-exported inside objects (ex.
Trace
,Utils
) are not visible in the docs.
- Research if we can generate typedoc for barrel files (seems now that re-exported modules are not documented). Result: rollup d.ts generated with
-
Run the
e2e/scoped-packages
application on CI
-
-
@nativescript/angular
package- Move all the code to
@nativescript/angular
and createnativescript-angular
compatibility package (either generate it or manually create it) - Update developer workflow. There should be an easy way to setup the
nativescript-angular
repo so that you can run thetests
and alle2e
projects with linked modules and HMR.
- Move all the code to
-
nativescript-dev-webpack
package- Remove the
tns-core-module/xml
dependency in thexml-namespace-loader
- Make sure webpack works with the
tns-core-modules
compatibility package without the need to change configuration. - Make sure all generated code from webpack loaders uses the scoped packages. This way people won't have to still include the compat packages in their projects. Add a check that scoped-packages exist in the project and show "not compatible" error otherwise.
- Remove the
-
nativescript-cli
- ...
-
Create an ESLint rule for migrating to scoped packages imports #8131 Migration tool (eslint rule with auto-fix). It should:
- convert all
tns-core-modules
imports to@nativescript/core
imports - convert all
nativescript-angular
imports to@nativescript/angular
imports
- convert all