Skip to content

Commit

Permalink
feat(typescript): expose types at regular build (algolia#4832)
Browse files Browse the repository at this point in the history
* feat(typescript): expose types at regular build

This moves away from -experimental and to stable.

Note that, like every type change, this could be a breaking change, as manually defined definitions will now merge with the ones provided by InstantSearch.

In almost all cases manual definitions or changes made are no longer needed, if you do however see any problems, please open an issue or pull request with reproduction.

* add cjs build again
  • Loading branch information
Haroenv authored Aug 17, 2021
1 parent d201322 commit 4bea07b
Show file tree
Hide file tree
Showing 9 changed files with 8 additions and 46 deletions.
5 changes: 4 additions & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,10 @@ jobs:
- save_cache: *save_yarn_cache
- run:
name: Build library
command: yarn run build
command: |
yarn run build:umd
yarn run build:cjs
yarn run build:es
- run:
name: Test packages size
command: yarn run test:size
Expand Down
1 change: 0 additions & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
/cjs
/es
/scripts/build/.temp
/website
dist
.cache
Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ yarn-error.log
/dist
/cjs
/es
/scripts/build/.temp

# Generated files
/docs
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@
"scripts": {
"start": "yarn run dev",
"dev": "yarn run storybook",
"build": "yarn run build:cjs && yarn run build:es && yarn run build:umd",
"build": "yarn run build:cjs && yarn run build:es && yarn run build:umd && yarn run build:types",
"build:umd": "rm -rf dist && BABEL_ENV=umd rollup --config scripts/rollup/config.js",
"build:cjs": "rm -rf cjs && BABEL_ENV=cjs babel src --extensions '.js,.ts,.tsx' --out-dir cjs/ --ignore 'src/index.es.ts','**/__tests__','**/__mocks__' --quiet",
"build:es": "rm -rf es && BABEL_ENV=es babel src --extensions '.js,.ts,.tsx' --out-dir es/ --ignore 'src/index.es.ts','**/__tests__','**/__mocks__' --quiet && BABEL_ENV=es babel src/index.es.ts --out-file es/index.js --quiet",
"build:types": "./scripts/build/types.js",
"build:types": "./scripts/typescript/extract.js",
"doctoc": "doctoc --no-title --maxlevel 3 README.md CONTRIBUTING.md",
"storybook": "start-storybook --quiet --port 6006 --ci --static-dir .storybook/static",
"storybook:build": "build-storybook --quiet --output-dir website/stories --static-dir .storybook/static",
Expand Down
29 changes: 0 additions & 29 deletions scripts/release/build-experimental-typescript.js

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
"$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",

"projectFolder": "../../",

"mainEntryPointFilePath": "<projectFolder>/es/index.d.ts",

"dtsRollup": {
"enabled": false
},
Expand Down Expand Up @@ -32,10 +34,6 @@
"addToApiReportFile": true
},

"ae-internal-missing-underscore": {
"logLevel": "none"
},

"ae-missing-release-tag": {
"logLevel": "none"
}
Expand Down
File renamed without changes.
File renamed without changes.
8 changes: 0 additions & 8 deletions ship.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,6 @@ module.exports = {
pullRequestTeamReviewers: ['instantsearch-for-websites'],
buildCommand: ({ version }) =>
`NODE_ENV=production VERSION=${version} yarn build`,
afterPublish: ({ exec, version, releaseTag }) => {
if (releaseTag === 'latest' && version.startsWith('4.')) {
exec('./scripts/release/build-experimental-typescript.js');
exec(
`yarn publish --no-git-tag-version --non-interactive --tag experimental-typescript`
);
}
},
slack: {
// disable slack notification for `prepared` lifecycle.
// Ship.js will send slack message only for `releaseSuccess`.
Expand Down

0 comments on commit 4bea07b

Please sign in to comment.