Skip to content
This repository has been archived by the owner on Apr 10, 2024. It is now read-only.

Commit

Permalink
test: fix imports
Browse files Browse the repository at this point in the history
  • Loading branch information
udondan committed Apr 10, 2024
1 parent 66429a4 commit 0ca7eb5
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 4 deletions.
18 changes: 18 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,21 @@ eslint:
@echo -e "$(TARGET_COLOR)Running eslint $$(npx eslint --version)$(NO_COLOR)"
@npx eslint .; \
echo "Passed"

validate-package:
@echo -e "$(TARGET_COLOR)Checking package content$(NO_COLOR)"
@npm publish --dry-run 2>&1 | tee publish_output.txt
@\
FILES_TO_CHECK="lambda/code.zip lib/index.d.ts lib/index.js lib/types.d.ts lib/types.js"; \
MISSING_FILES=""; \
for file in $$FILES_TO_CHECK; do \
if ! grep -q $$file publish_output.txt; then \
MISSING_FILES="$$MISSING_FILES $$file"; \
fi; \
done; \
if [ -n "$$MISSING_FILES" ]; then \
echo "❌ The following files are NOT included in the package:$$MISSING_FILES"; \
rm publish_output.txt; \
exit 1; \
fi
@rm publish_output.txt
3 changes: 1 addition & 2 deletions test/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ clean:

install: package
@echo Installing dependencies...
@cd .. && make install
@npm install ../cdk-athena-test.tgz --no-save --prefer-offline --cache ../.npm
@npm list

Expand Down Expand Up @@ -33,6 +32,6 @@ package:
@echo Building npm tgz...
@ \
cd .. && \
make build && \
make install build && \
npm pack && \
mv cdk-athena-*.tgz cdk-athena-test.tgz
3 changes: 1 addition & 2 deletions test/lib/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ import {
Tags,
} from 'aws-cdk-lib';
import { Construct } from 'constructs';

import { EncryptionOption, LogLevel, NamedQuery, WorkGroup } from '../../lib';
import { EncryptionOption, LogLevel, NamedQuery, WorkGroup } from 'cdk-athena';

Check failure on line 11 in test/lib/index.ts

View workflow job for this annotation

GitHub Actions / test

Cannot find module 'cdk-athena' or its corresponding type declarations.

export class TestStack extends Stack {
constructor(scope: Construct, id: string, props?: StackProps) {
Expand Down

0 comments on commit 0ca7eb5

Please sign in to comment.