There is no singular current definition of continuous integration.
In Extreme Programming Explained, 2nd edition, Kent Beck wrote:
Integrate and build a complete product. If the goal is to burn a CD,
burn a CD. If the goal is to deploy a web site, deploy a web site,
even if it is to a test environment. Continuous integration should be
complete enough that the eventual first deployment of the system is no
Since continuous integration is a core practice of Extreme Programming and Kent Beck is one of the originators of Extreme Programming, I'd consider this to be the "correct" definition of what continuous integration is.
This is much further than either of your definitions since it not only requires developers to merge their changes to a common codebase as well as building and testing that codebase but also deploying or preparing to deploy that codebase to something - creating an installer, deploying to a dev or test environment, pushing to a simulator. Beck's definition is inclusive of what some people consider continuous delivery.
However, at least in my experience, many people do not use the term "continuous integration" in a way that is consistent with the description from Extreme Programming Explained. In my experience, most people separate continuous integration (merging, building, and testing) from continuous delivery (continuous integration plus packaging for release and possibly deployment to test environment).
For completeness, I also checked the IEEE Software and Systems Engineering Vocabulary, which pulls in definitions from various IEEE standards. IEEE 2675:2021 (the IEEE Standard for DevOps: Building Reliable and Secure Systems Including Application Build, Package, and Deployment) defines "continuous integration" as a "technique that continually merges artifacts, including source code updates from all developers on a team, into a shared mainline to build and test the developed system". Without reading the whole standard, my impression is that the IEEE also separates continuous integration from continuous delivery, which is defined as "software engineering practices that allow for frequent releases of new systems (including software) to staging or various test environments through the use of automated tools".
Which definition is correct? I'm not sure that it matters. Unfortunately, there are many terms and concepts in software engineering that have varying meanings to different people, teams, and organizations. It's important to ask questions. If someone uses a term that is unclear or you find yourself not able to effectively communicate, take a few minutes to define the term. Teams and organizations should take a little bit of time to normalize their terms and definitions for effective communication.