文档地址

以下这些都是引入了无法向下兼容的breaking changes,需要尽量避免:

  • Changing the selector of a component, directive, or pipe. 更改了Component,directive或者pipe的selector
  • Removing or changing the name of exported classes, functions, constants, interfaces or types in public_api.ts.
    修改了定义在public_api.ts中导出的类,函数,常量,接口和类型的名称

Note that index.ts barrels can also bubble up exports to public_api.ts.

index.ts中的类型也要特别小心。原因参考这篇文章:SAP Spartacus的API暴露逻辑和index.ts的设计原理 - 什么是所谓的PUBLIC API

  • Changing or removing interface properties. 修改或者删除接口属性

  • Adding new, required properties to interfaces and types. However, you can add optional properties with ?.
    给接口增添了新的必需属性。注意使用?.增添的接口属性,不算是breaking changes.

  • Changing or removing public or protected class members. 更改或者删除public或者proected类成员。

  • Changing or removing existing public or protected function parameters. Note that changing the order also introduces a breaking change.
    更改或删除已有的public或者protected函数参数。注意修改参数的相对顺序,也算breaking changes.

  • Adding new, required parameters to public functions. However, you can add optional parameters to public functions.
    给公有函数增添必须的参数算breaking changes. 增添optional参数不算。

  • Changing access levels on classes, functions or interfaces to a more restrictive access level. In other words, changing public to protected or private, or changing protected to private introduces a breaking change.

将类,函数和接口的restrictive access level修改成更严格的更改算是breaking changes, 例如从public改成protected或是private,从protected改成private.

  • Changing function’s return type form T to T | S
    函数的返回类型从T改成T | S.

  • Changing function behavior where the function returns different results. In other words, when changing function behavior, the function should return the same results for the same provided input as it did before the change.
    对于相同的函数输入,必须返回相同的函数输出。

  • Changing assertions in unit tests or end-to-end tests.

单元测试或者端到端测试里的assertions发生了更改。

  • Removing anything from Angular modules, such as imports, providers, declarations, entryComponents, or exports. 删除了Angular modules里的imports, providers, declarations, entryComponents或者exports等声明。

  • Removing or updating existing values, or changing the order for exported enums. However, you can add new values.
    删除或修改枚举变量值。可以新增枚举变量值。

  • Changing the default value for function parameters. The default value should match the function behavior from before the change.
    修改了函数参数的默认值。

  • Making any changes to the class constructor signature. Note that super calls need to be updated in classes extending ours.
    修改了类构造函数的参数类型。

  • Changing the initial values of an exported class’s public or protected fields, or changing them to read-only.
    修改了导出类的public和protected字段的默认值,或者将其修改成了read-only.

  • Changing or removing translation keys or values.
    修改或者删除了translation keys / values.

  • Changing default configurations.

  • Changing any CSS or SCSS attributes, classes or selectors.

  • Changing anything that affects the rendering of the existing DOM.

SAP Spartacus避免不能向下兼容的breaking changes相关推荐

  1. SAP Spartacus 升级时关于 schematics 的更新

    When upgrading Spartacus to a new major version (for example, from 3.x to 4.0), the Spartacus migrat ...

  2. SAP Spartacus 3.0 的一些变化

    SAP Spartacus 确实使用到了Bootstrap这个框架: Technical Changes in Spartacus 3.0 Breaking Changes Translations ...

  3. SAP Spartacus 4.0 版本因为 hamburger 依赖导致构建出错的问题

    build from Schematics 遇到错误消息: SassError: Undefined function. https://github.com/SAP/spartacus/issues ...

  4. SAP Spartacus UI 服务器端渲染的调试启动方式 - debug 模式

    首先确认你已经熟悉这篇文章的启动方式:SAP Spartacus develop branch 的服务器端渲染启动方式. 第一步 添加一个新的 build script,把 --configurati ...

  5. SAP Spartacus Session affinity

    参见这个讨论. 后端运行在多个 pods/节点时,当子序列请求过早进入时,后端将无法跨集群发送缓存失效请求.此外,如果多个请求分散在多个节点上,则会消耗延迟和不必要的资源. 对于单个客户端,Spart ...

  6. SAP Spartacus 4.0 的技术变化

    在您迁移到 4.0 版库之前,我们强烈建议您切换到新的应用程序结构和新的功能库. 在多个小步骤中进行迁移更容易(迁移到新的应用程序结构,切换到提取的功能库,然后迁移到 4.0),您可以确保在每一步之后 ...

  7. SAP Spartacus travis ci-scripts 下面 e2e-cypress.sh 的实现分析

    文件地址:https://github.com/SAP/spartacus/blob/develop/.travis.yml 里面引用到了 e2e-cypress.sh: https://github ...

  8. SAP Spartacus 里的 .release-it.json 文件

    在 SAP Spartacus package.json 里有一个依赖叫做 release-it: 这个工具的链接:https://github.com/release-it/release-it 这 ...

  9. SAP Spartacus PageLayoutComponent 如何知道自己应该显示哪些具体内容

    我们以前介绍过,经过 SAP Spartacus 路由配置后的 routes 数组,其 route 数据结构的 Component 属性,清一色指向 generic 的 PageLayoutCompo ...

最新文章

  1. php配置文件能直接用吗,我应该在PHP应用程序中使用YAML配置文件吗?
  2. 嵌入式linux 实现mdev SD卡和U盘自动挂载和卸载的方法 mdev.conf
  3. 怎么用计算机知道别人手机密码,怎样才能知道别人家的wifi密码
  4. mysql c api example_The MySQL C API 编程实例
  5. 半透明渲染新技术摘录
  6. 【EXLIBRIS】纸版书目整理 -- 小书架 下/床头柜/书箱 【100 种】【108 册】
  7. python 移除列表中的值 list index out of range_重拾Python(二)之列表
  8. go语言--goroutine
  9. MySQL-快速入门(5)数据查询-常用关键字、分组查询、聚合函数
  10. 未来教育 ***java二级考试题库第二十五套错题***
  11. 声卡性能测试软件,RightMark Audio Analyzer音频声卡测试软件
  12. 三星全新贴片机SM421(S)参数性能!
  13. IDEA添加Mapper.xml文件模板
  14. acdsee 5.0简体中文免费下载【非常流行的看图工具】
  15. Java使用map接收时间格式是Wed Sep 14 00:00:00 CST 2022这种解决办法
  16. 九爷带你了解 2017年3-4月企业面试题总结
  17. 欧洲之星Fotona 4D是什么,欧洲之星Fotona 4和热玛吉哪个好
  18. 一个简单的DGA(Domain Generate Algorithm)
  19. 小心inneHTML的地雷
  20. 4.编写一个程序来计算10000以内的素数之和并输出

热门文章

  1. 专家称 AI 可以在 120 年内接管人类的所有工作
  2. Windows Azure Cloud Service (17) Role Endpoint
  3. [C++ Mind Map] class and memory
  4. 【Asp.net】Cookie对象
  5. Mapreduce自定义数据类型
  6. JavaScript---设计模式之观察者模式
  7. 前端代码有关搜索引擎的代码
  8. ElasticSearch 索引模块——集成IK中文分词
  9. [Erlang危机](5.1.1)内存
  10. 走向.NET架构设计—第五章—业务层模式,原则,实践(中篇)