Skip to content

Commit

Permalink
BREAKING CHANGE: Rename the final JS bundles (#202)
Browse files Browse the repository at this point in the history
Rename npm packages to use elastic org
Fix documentation with regards to package name change
  • Loading branch information
jahtalab authored and vigneshshanmugam committed Mar 11, 2019
1 parent 8600837 commit 68b37d8
Show file tree
Hide file tree
Showing 25 changed files with 4,208 additions and 3,675 deletions.
12 changes: 6 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,27 +38,27 @@ jobs:
- stage: test
env:
- STACK_VERSION=6.5.0
- SCOPE=elastic-apm-js-core
- SCOPE=@elastic/apm-rum-core
- stage: test
env:
- STACK_VERSION=6.5.0
- SCOPE=elastic-apm-js-base
- SCOPE=@elastic/apm-rum
- stage: test
env:
- STACK_VERSION=6.6.0
- SCOPE=elastic-apm-js-core
- SCOPE=@elastic/apm-rum-core
- stage: test
env:
- STACK_VERSION=6.6.0
- SCOPE=elastic-apm-js-base
- SCOPE=@elastic/apm-rum
- stage: test
env:
- STACK_VERSION=7.0.0-alpha1-SNAPSHOT
- SCOPE=elastic-apm-js-core
- SCOPE=@elastic/apm-rum-core
- stage: test
env:
- STACK_VERSION=7.0.0-alpha1-SNAPSHOT
- SCOPE=elastic-apm-js-base
- SCOPE=@elastic/apm-rum

addons:
apt:
Expand Down
8 changes: 4 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,20 +93,20 @@ $ npm test
To run tests for a specific package:

```sh
$ SCOPE=elastic-apm-js-base npm test
$ SCOPE=@elastic/apm-rum npm test
```

To run unit/integration/end-to-end tests for packages:

```sh
// Unit tests
$ npx lerna run --scope elastic-apm-js-base runUnitTests
$ npx lerna run --scope @elastic/apm-rum runUnitTests

// Integration tests
$ npx lerna run --scope elastic-apm-js-base runNodeTests
$ npx lerna run --scope @elastic/apm-rum runNodeTests

// End to end tests
$ npx lerna run --scope elastic-apm-js-base run-e2e
$ npx lerna run --scope @elastic/apm-rum run-e2e
```

### Linting
Expand Down
4 changes: 2 additions & 2 deletions RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ To publish all the packages run `npm run release`. It will run `lerna publish`(w

### Releasing single package

To publish a single package, run `npm run release-package -- elastic-apm-js-base` which uses `lerna publish` under the hood to publish single package to NPM
To publish a single package, run `npm run release-package -- @elastic/apm-rum` which uses `lerna publish` under the hood to publish single package to NPM

### Releasing artifacts to GitHub

Use `npm run release-github` in the root directory, the script takes care of building, testing the `elastic-apm-js-base` package and creating a release in GitHub with the previous annonated tag.
Use `npm run release-github` in the root directory, the script takes care of building, testing the `@elastic/apm-rum` package and creating a release in GitHub with the previous annonated tag.

**Note: Make sure you pass the GITHUB_TOKEN (with push access) in your environment variable while releasing**
2 changes: 1 addition & 1 deletion dev-utils/karma.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const { Server } = require('karma')
const { EnvironmentPlugin } = require('webpack')
const { getWebpackEnv, getSauceConnectOptions } = require('./test-config')

const BABEL_CONFIG_FILE = require.resolve('elastic-apm-js-base/babel.config.js')
const BABEL_CONFIG_FILE = require.resolve('@elastic/apm-rum/babel.config.js')

const baseLaunchers = {
SL_CHROME: {
Expand Down
2 changes: 1 addition & 1 deletion docs/api.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ You can access agent API after initializing the agent:

[source,js]
----
var apm = require('elastic-apm-js-base').init(...)
var apm = require('@elastic/apm-rum').init(...)
----


Expand Down
2 changes: 1 addition & 1 deletion docs/custom-transactions.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Here is an example application using custom transactions:

[source,js]
----
import { init as initApm } from 'elastic-apm-js-base'
import { init as initApm } from '@elastic/apm-rum'
var apm = initApm({
serviceName: 'service-name',
serverUrl: 'http://localhost:8200'
Expand Down
8 changes: 4 additions & 4 deletions docs/intro.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,14 @@ Install the APM agent for JavaScript as a dependency to your application:

[source,bash]
----
npm install elastic-apm-js-base --save
npm install @elastic/apm-rum --save
----

Configure the agent:

[source,js]
----
import { init as initApm } from 'elastic-apm-js-base'
import { init as initApm } from '@elastic/apm-rum'
const apm = initApm({
// Set required service name (allowed characters: a-z, A-Z, 0-9, -, _, and space)
Expand All @@ -55,11 +55,11 @@ const apm = initApm({
Add a <script> tag to the HTML page and use the `elasticApm` global object to load and initialize the agent:

NOTE: Please download the latest version of JavaScript agent from https://github.com/elastic/apm-agent-rum-js/releases/latest[GitHub] or
https://unpkg.com/elastic-apm-js-base/dist/bundles/elastic-apm-js-base.umd.min.js[UNPKG] and host the file in your Server/CDN before deploying to production.
https://unpkg.com/@elastic/apm-rum/dist/bundles/elastic-apm-rum.umd.min.js[UNPKG] and host the file in your Server/CDN before deploying to production.

[source,html]
----
<script src="https://your-cdn-host.com/path/to/elastic-apm-js-base.umd.min.js" crossorigin></script>
<script src="https://your-cdn-host.com/path/to/elastic-apm-rum.umd.min.js" crossorigin></script>
<script>
elasticApm.init({
serviceName: '',
Expand Down
4 changes: 2 additions & 2 deletions docs/opentracing.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ In order to use OpenTracing API with Elastic APM, you need to first create a Tra

[source,js]
----
const { init: initApm, createTracer } = require('elastic-apm-js-base/dist/bundles/elastic-apm-opentracing.umd.js')
const { init: initApm, createTracer } = require('@elastic/apm-rum/dist/bundles/elastic-apm-opentracing.umd.js')
const elasticApm = initApm({
// ...
})
Expand All @@ -39,7 +39,7 @@ Please refer to https://github.com/opentracing/opentracing-javascript/[opentraci
on OpenTracing API.

NOTE: If you are loading the RUM agent using a script tag, please make sure to use our OpenTracing bundle
(`elastic-apm-js-base/dist/bundles/elastic-apm-opentracing.umd.js`) in your scripts instead, then you can create a tracer
(`@elastic/apm-rum/dist/bundles/elastic-apm-opentracing.umd.js`) in your scripts instead, then you can create a tracer
using `window.elasticApm.createTracer()`.


Expand Down
2 changes: 1 addition & 1 deletion docs/sourcemap.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ Then you can use the provided service version to set the "serviceVersion" config

[source,js]
----
import { init as initApm } from 'elastic-apm-js-base'
import { init as initApm } from '@elastic/apm-rum'
var apm = initApm({
// Set required service name
serviceName: 'service-name',
Expand Down
Loading

0 comments on commit 68b37d8

Please sign in to comment.