@gooddata/maql-antlr4ts 0.5.1-a5e4f136.0 → 0.5.1-c054df3a.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +33 -2
  2. package/package.json +7 -2
package/README.md CHANGED
@@ -49,7 +49,9 @@ const normalizedAst = normalizer.visit(ast);
49
49
 
50
50
  ## Linking the package to other modules
51
51
 
52
- First build and bundle the module.
52
+ First install the dependencies, then build and bundle the module.
53
+
54
+ `yarn install`
53
55
 
54
56
  `yarn build`
55
57
 
@@ -67,4 +69,33 @@ Use [yalc](https://github.com/wclr/yalc) to link the package to other repositori
67
69
 
68
70
  ## Publishing
69
71
 
70
- The package can be published by triggering the workflow https://github.com/gooddata/gdc-nas/actions/workflows/publish_maql_antlr4ts_npm.yml manually.
72
+ To publish the package, run the [publish_maql_antlr4ts_npm](https://github.com/gooddata/gdc-nas/actions/workflows/publish_maql_antlr4ts_npm.yml) GitHub workflow manually.
73
+
74
+ The workflow publishes a prerelease version `<package.json version + 1 patch>-<commit sha>.0`, for example `0.5.1-a5e4f136.0`.
75
+ It moves the npm `latest` dist-tag to this version. It does not commit the version back. To raise the base version,
76
+ change `version` in `package.json` in a PR before you run the workflow.
77
+
78
+ The workflow publishes to npm with [trusted publishing](https://docs.npmjs.com/trusted-publishers) (OIDC), so it does not need an npm token.
79
+ Trusted publishing does not support self-hosted runners, so the workflow runs on a GitHub-hosted runner.
80
+
81
+ ### Trusted publisher setup
82
+
83
+ The trusted publisher for the package is set once on npm.
84
+ This section records how it was set up, so that you can change it or set it up again.
85
+
86
+ You can set it up in one of these ways:
87
+
88
+ * **In the npm UI** at https://www.npmjs.com/package/@gooddata/maql-antlr4ts/access.
89
+ * **With the npm CLI.** Use npm 11.10.0 or newer, which has the `npm trust` command.
90
+ Log in to npm (`npm login`) as user `gooddata-ci`.
91
+ The user must have publish access to `@gooddata/maql-antlr4ts` and two-factor authentication.
92
+ Then run:
93
+
94
+ ```sh
95
+ npm trust github @gooddata/maql-antlr4ts \
96
+ --file publish_maql_antlr4ts_npm.yml \
97
+ --repo gooddata/gdc-nas \
98
+ --allow-publish
99
+ ```
100
+
101
+ To see the current configuration, run `npm trust list @gooddata/maql-antlr4ts`.
package/package.json CHANGED
@@ -1,10 +1,15 @@
1
1
  {
2
2
  "name": "@gooddata/maql-antlr4ts",
3
3
  "description": "TypeScript lexer and parser for MAQL",
4
- "version": "0.5.1-a5e4f136.0",
4
+ "version": "0.5.1-c054df3a.0",
5
5
  "type": "commonjs",
6
6
  "main": "dist/index.js",
7
7
  "license": "UNLICENSED",
8
+ "repository": {
9
+ "type": "git",
10
+ "url": "git+https://github.com/gooddata/gdc-nas.git",
11
+ "directory": "libraries/calq/maql-antlr4ts"
12
+ },
8
13
  "files": [
9
14
  "dist"
10
15
  ],
@@ -12,7 +17,7 @@
12
17
  "antlr4": "cd ../maql-parser/src/main/antlr && antlr4ts MaqlLexer.g4 -o ../../../../maql-antlr4ts/src/gen/antlr && antlr4ts -visitor MaqlParser.g4 -o ../../../../maql-antlr4ts/src/gen/antlr -lib ../../../../maql-antlr4ts/src/gen/antlr",
13
18
  "funcdef": "yarn tsc -p ./scripts && node scripts/build/funcdefParser.js ../maql-parser/src/main/resources/funcdef.json src/gen/type/functions.ts",
14
19
  "compile": "yarn tsc -p ./tsconfig.build.json",
15
- "build": "yarn install && (yarn antlr4 & yarn funcdef) && yarn compile && yarn rollup -c",
20
+ "build": "(yarn antlr4 & yarn funcdef) && yarn compile && yarn rollup -c",
16
21
  "pretest": "yarn prettier-check && yarn lint",
17
22
  "test": "jest",
18
23
  "test-ci": "yarn test --ci --watchAll=false --maxWorkers=4 --reporters=default --reporters=jest-junit",