File tree Expand file tree Collapse file tree 3 files changed +7
-23
lines changed
clients/algoliasearch-client-javascript Expand file tree Collapse file tree 3 files changed +7
-23
lines changed Original file line number Diff line number Diff line change 10
10
"build:many" : " lerna run build --include-dependencies --scope ${0:-'{@algolia/*,algoliasearch}'}" ,
11
11
"clean" : " lerna run clean --include-dependencies" ,
12
12
"release:bump" : " lerna version ${0:-patch} --no-changelog --no-git-tag-version --no-push --exact --force-publish --yes" ,
13
- "release:publish" : " ts-node --project tsconfig.script.json scripts/publish.ts" ,
13
+ "release:publish" : " ts-node --esm -- project tsconfig.script.json scripts/publish.ts" ,
14
14
"test:size" : " bundlesize"
15
15
},
16
16
"devDependencies" : {
Original file line number Diff line number Diff line change 1
- import fsp from 'fs/promises' ;
2
- import path from 'path' ;
3
-
4
- import execa from 'execa' ;
1
+ import { execaCommand } from 'execa' ;
5
2
import semver from 'semver' ;
6
3
7
- async function publish ( ) : Promise < void > {
8
- // Read the local version of `algoliasearch/package.json`
9
- const { version } = JSON . parse (
10
- (
11
- await fsp . readFile (
12
- path . resolve (
13
- __dirname ,
14
- '..' ,
15
- 'packages' ,
16
- 'algoliasearch' ,
17
- 'package.json'
18
- )
19
- )
20
- ) . toString ( )
21
- ) ;
4
+ import packageJSON from "../packages/algoliasearch/package.json" assert { type : "json" } ;
22
5
6
+ async function publish ( ) : Promise < void > {
23
7
// Get tag like `alpha`, `beta`, ...
24
- const tag = semver . prerelease ( version ) ?. [ 0 ] ;
8
+ const tag = semver . prerelease ( packageJSON . version ) ?. [ 0 ] ;
25
9
26
- await execa . command (
10
+ await execaCommand (
27
11
`lerna exec --no-bail -- npm_config_registry=https://registry.npmjs.org/ npm publish --access public ${
28
12
tag ? `--tag ${ tag } ` : ''
29
13
} `,
Original file line number Diff line number Diff line change 1
1
{
2
2
"extends" : " ./tsconfig.json" ,
3
3
"compilerOptions" : {
4
- "module " : " commonjs "
4
+ "resolveJsonModule " : true
5
5
}
6
6
}
You can’t perform that action at this time.
0 commit comments