Skip to content

Commit

Permalink
chore: native esm bundle (#836)
Browse files Browse the repository at this point in the history
Co-authored-by: Jason Paulos <jasonpaulos@users.noreply.github.com>
  • Loading branch information
PhearZero and jasonpaulos committed Jan 5, 2024
1 parent 5a33cb0 commit 1947079
Show file tree
Hide file tree
Showing 116 changed files with 1,308 additions and 688 deletions.
9 changes: 9 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,4 +58,13 @@ module.exports = {
'tests/cucumber/browser/build/',
'tests/browser/bundle.*',
],
settings: {
'import/resolver': {
typescript: {
extensionAlias: {
'.js': ['.ts', '.d.ts', '.js'],
},
},
},
},
};
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
dist/*
!dist/esm
dist/esm/*
!dist/esm/package.json

.DS_Store

.idea/
Expand All @@ -23,7 +28,6 @@ tests/cucumber/browser/build
tests/browser/bundle.*

# Builds
dist/
docs/
built/

Expand Down
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ UNIT_TAGS := "$(subst :, or ,$(shell awk '{print $2}' tests/cucumber/unit.tags
INTEGRATIONS_TAGS := "$(subst :, or ,$(shell awk '{print $2}' tests/cucumber/integration.tags | paste -s -d: -))"

unit:
node_modules/.bin/cucumber-js --tags $(UNIT_TAGS) tests/cucumber/features --require-module ts-node/register --require tests/cucumber/steps/index.js
node_modules/.bin/cucumber-js --tags $(UNIT_TAGS) tests/cucumber/features --require-module tsx/cjs --require tests/cucumber/steps/index.js

integration:
node_modules/.bin/cucumber-js --tags $(INTEGRATIONS_TAGS) tests/cucumber/features --require-module ts-node/register --require tests/cucumber/steps/index.js
node_modules/.bin/cucumber-js --tags $(INTEGRATIONS_TAGS) tests/cucumber/features --require-module tsx/cjs --require tests/cucumber/steps/index.js

# The following assumes that all cucumber steps are defined in `./tests/cucumber/steps/steps.js` and begin past line 135 of that file.
# Please note any deviations of the above before presuming correctness.
Expand Down
1 change: 1 addition & 0 deletions dist/esm/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"type": "module"}
2 changes: 1 addition & 1 deletion examples/smoke_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ for file in *; do
# Check if the filename is not "utils.ts"
if [[ $file != "utils.ts" ]]; then
# Call the file using `ts-node`
../node_modules/.bin/ts-node "$file"
../node_modules/.bin/tsx "$file"
# Check if the test failed
if [ $? -ne 0 ]; then
echo "Test failed, stopping script"
Expand Down
Loading

0 comments on commit 1947079

Please sign in to comment.