File tree 16 files changed +204
-77
lines changed
16 files changed +204
-77
lines changed Original file line number Diff line number Diff line change
1
+ name : Publish Documentation
2
+ description : ' Publish documentation to github pages.'
3
+
4
+ inputs :
5
+ github_token :
6
+ description : ' The github token to use for committing'
7
+ required : true
8
+
9
+ runs :
10
+ using : composite
11
+ steps :
12
+ -
uses :
launchdarkly/gh-actions/actions/[email protected]
13
+ name : ' Publish to Github pages'
14
+ with :
15
+ docs_path : docs
16
+ github_token : ${{ inputs.github_token }}
Original file line number Diff line number Diff line change
1
+ name : Publish to NPM
2
+ description : Publish an npm package.
3
+ inputs :
4
+ prerelease :
5
+ description : ' Is this a prerelease. If so, then the latest tag will not be updated in npm.'
6
+ required : false
7
+ dry-run :
8
+ description : ' Is this a dry run. If so no package will be published.'
9
+ required : false
10
+
11
+ runs :
12
+ using : composite
13
+ steps :
14
+ - name : Publish
15
+ shell : bash
16
+ run : |
17
+ ./scripts/publish-npm.sh
18
+ env :
19
+ LD_RELEASE_IS_PRERELEASE : ${{ inputs.prerelease }}
20
+ LD_RELEASE_IS_DRYRUN : ${{ inputs.dry-run }}
Original file line number Diff line number Diff line change
1
+ name : Build and Test
2
+
3
+ on :
4
+ push :
5
+ branches : [main]
6
+ paths-ignore :
7
+ - ' **.md' # Do not need to run CI for markdown changes.
8
+ pull_request :
9
+ branches : [main]
10
+ paths-ignore :
11
+ - ' **.md'
12
+
13
+ jobs :
14
+ build-test :
15
+ strategy :
16
+ matrix :
17
+ variations : [
18
+ {os: ubuntu-latest, node: latest},
19
+ {os: ubuntu-latest, node: 18}
20
+ ]
21
+
22
+ runs-on : ${{ matrix.variations.os }}
23
+ env :
24
+ TEST_SERVICE_PORT : 8000
25
+
26
+ steps :
27
+ - uses : actions/checkout@v4
28
+ - uses : actions/setup-node@v4
29
+ with :
30
+ node-version : ${{ matrix.variations.node }}
31
+ registry-url : ' https://registry.npmjs.org'
32
+ - name : Install
33
+ run : npm install
34
+ - name : Test
35
+ run : npm test
36
+ - name : Lint
37
+ run : npm run lint:all
38
+ - name : Check typescript
39
+ run : npm run check-typescript
40
+ - name : Build Docs
41
+ run : npm run doc
Original file line number Diff line number Diff line change
1
+ name : Lint PR title
2
+
3
+ on :
4
+ pull_request_target :
5
+ types :
6
+ - opened
7
+ - edited
8
+ - synchronize
9
+
10
+ jobs :
11
+ lint-pr-title :
12
+ uses : launchdarkly/gh-actions/.github/workflows/lint-pr-title.yml@main
Original file line number Diff line number Diff line change
1
+ name : Release Please
2
+
3
+ on :
4
+ push :
5
+ branches :
6
+ - main
7
+
8
+ jobs :
9
+ release-please :
10
+ runs-on : ubuntu-latest
11
+ outputs :
12
+ release_created : ${{ steps.release.outputs.release_created }}
13
+ steps :
14
+ - uses : googleapis/release-please-action@v4
15
+ id : release
16
+ with :
17
+ token : ${{secrets.GITHUB_TOKEN}}
18
+
19
+ publish-package :
20
+ runs-on : ubuntu-latest
21
+ needs : ['release-please']
22
+ permissions :
23
+ id-token : write
24
+ contents : write
25
+ if : ${{ needs.release-please.outputs.release_created == 'true' }}
26
+ steps :
27
+ - uses : actions/checkout@v4
28
+
29
+ - uses : actions/setup-node@v4
30
+ with :
31
+ node-version : 20.x
32
+ registry-url : ' https://registry.npmjs.org'
33
+
34
+ -
uses :
launchdarkly/gh-actions/actions/[email protected]
35
+ name : ' Get NPM token'
36
+ with :
37
+ aws_assume_role : ${{ vars.AWS_ROLE_ARN }}
38
+ ssm_parameter_pairs : ' /production/common/releasing/npm/token = NODE_AUTH_TOKEN'
39
+
40
+ - name : Install Dependencies
41
+ run : npm install
42
+
43
+ - id : publish-npm
44
+ name : Publish NPM Package
45
+ uses : ./.github/actions/publish-npm
46
+ with :
47
+ dry-run : ' false'
48
+ prerelease : ' false'
49
+
50
+ - name : Build Documentation
51
+ run : npm run doc
52
+
53
+ - id : publish-docs
54
+ name : Publish Documentation
55
+ uses : ./.github/actions/publish-docs
56
+ with :
57
+ github_token : ${{ secrets.GITHUB_TOKEN }}
Original file line number Diff line number Diff line change 10
10
test-types.js
11
11
docs /build /
12
12
package-lock.json
13
+ docs /
Original file line number Diff line number Diff line change
1
+ {
2
+ "." : " 3.4.0"
3
+ }
Load Diff This file was deleted.
Load Diff This file was deleted.
Load Diff This file was deleted.
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 38
38
"test:junit" : " cross-env NODE_ENV=test jest --testResultsProcessor jest-junit" ,
39
39
"check-typescript" : " node_modules/typescript/bin/tsc" ,
40
40
"clean" : " rimraf dist/**" ,
41
- "prepublishOnly" : " npm run build:min"
41
+ "prepublishOnly" : " npm run build:min" ,
42
+ "doc" : " typedoc"
42
43
},
43
44
"devDependencies" : {
44
45
"@babel/cli" : " ^7.19.3" ,
72
73
"rollup-plugin-node-globals" : " ^1.4.0" ,
73
74
"rollup-plugin-terser" : " ^7.0.2" ,
74
75
"sinon" : " ^14.0.0" ,
75
- "typescript" : " ^4.8.4" ,
76
+ "typescript" : " ~5.4.5" ,
77
+ "typedoc" : " ^0.25.13" ,
76
78
"@types/estree" : " ^1.0.0"
77
79
},
78
80
"dependencies" : {
Original file line number Diff line number Diff line change
1
+ {
2
+ "bootstrap-sha" : " 4d323c5e7cd7d509cfeb1be3a7446b10d94697a6" ,
3
+ "packages" : {
4
+ "." : {
5
+ "release-type" : " node" ,
6
+ "include-v-in-tag" : false ,
7
+ "include-component-in-tag" : false
8
+ }
9
+ }
10
+ }
Original file line number Diff line number Diff line change
1
+ #! /usr/bin/env bash
2
+ if $LD_RELEASE_IS_DRYRUN ; then
3
+ echo " Doing a dry run of publishing."
4
+ else
5
+ if $LD_RELEASE_IS_PRERELEASE ; then
6
+ echo " Publishing with prerelease tag."
7
+ npm publish --tag prerelease --provenance --access public || { echo " npm publish failed" >&2 ; exit 1; }
8
+ else
9
+ npm publish --provenance --access public || { echo " npm publish failed" >&2 ; exit 1; }
10
+ fi
11
+ fi
Original file line number Diff line number Diff line change
1
+ {
2
+ "$schema" : " https://typedoc.org/schema.json" ,
3
+ "name" : " launchdarkly-js-client-sdk" ,
4
+ "includeVersion" : true ,
5
+ "entryPoints" : [
6
+ " typings.d.ts" ,
7
+ ],
8
+ "readme" : " none" ,
9
+ "visibilityFilters" : {
10
+ "protected" : false ,
11
+ "private" : false ,
12
+ "inherited" : true ,
13
+ "external" : true ,
14
+ "@alpha" : false ,
15
+ "@beta" : false
16
+ }
17
+ }
Original file line number Diff line number Diff line change 1
- // Put top level documentation into docs/doc.md.
1
+ /**
2
+ * This is the API reference for the LaunchDarkly SDK for browser JavaScript.
3
+ *
4
+ * In typical usage, you will call {@link initialize} once at startup time to obtain an instance of
5
+ * {@link LDClient}, which provides access to all of the SDK's functionality.
6
+ *
7
+ * For more information, see the [SDK reference guide](https://docs.launchdarkly.com/sdk/client-side/javascript).
8
+ *
9
+ * @packageDocumentation
10
+ */
11
+
2
12
declare module 'launchdarkly-js-client-sdk' {
3
13
4
- //// DOCBUILD-START-REPLACE (see docs/Makefile)
5
14
export * from 'launchdarkly-js-sdk-common' ;
6
15
import {
7
16
BasicLoggerOptions ,
@@ -10,7 +19,6 @@ declare module 'launchdarkly-js-client-sdk' {
10
19
LDLogger ,
11
20
LDOptionsBase ,
12
21
} from 'launchdarkly-js-sdk-common' ;
13
- //// DOCBUILD-END-REPLACE
14
22
15
23
/**
16
24
* Creates an instance of the LaunchDarkly client.
@@ -133,7 +141,7 @@ declare module 'launchdarkly-js-client-sdk' {
133
141
*
134
142
* @param options Configuration for the logger. If no options are specified, the
135
143
* logger uses `{ level: 'info' }`.
136
- *
144
+ *
137
145
* @example
138
146
* This example shows how to use `basicLogger` in your SDK options to enable console
139
147
* logging only at `warn` and `error` levels.
You can’t perform that action at this time.
0 commit comments