diff --git a/.babelrc b/.babelrc deleted file mode 100644 index 8aa924d7..00000000 --- a/.babelrc +++ /dev/null @@ -1,3 +0,0 @@ -{ - "presets": ["@babel/preset-env"] -} \ No newline at end of file diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 4b7261d4..3833551e 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -38,6 +38,9 @@ jobs: - run: npm run build --if-present - run: npm test + - name: Smoke test the ES module build + run: npm run test:esm + - name: Calculate code coverage run: npm run coverage diff --git a/MIGRATION.md b/MIGRATION.md new file mode 100644 index 00000000..25640961 --- /dev/null +++ b/MIGRATION.md @@ -0,0 +1,113 @@ +# Migrating to concerto-codegen 7.0.0 + +7.0.0 publishes an ES module build for browsers, selects it through an `exports` map +in `package.json`, and removes the webpack UMD bundle. This was done under +[template-engine#185](https://github.com/accordproject/template-engine/issues/185) +so that browser applications ship only the generators they use, and share one copy +of Concerto with the rest of the application. The layout follows Concerto 5.0.0 +([concerto#1306](https://github.com/accordproject/concerto/pull/1306)). + +**Who is affected:** almost nobody. If your code imports the package by its name, +`require('@accordproject/concerto-codegen')` or +`import { CodeGen } from '@accordproject/concerto-codegen'`, nothing changes. You are +only affected if you import a file inside the package, or load the UMD bundle with a +`