Skip to content

Commit b03d83d

Browse files
GZLiewAutomated Version Bump
and
Automated Version Bump
authoredAug 24, 2022
feat(plugin): complete plugin (#4)
* feat(plugin): complete plugin * fix(ci): remove command * ci: version bump to 0.0.2 Co-authored-by: Automated Version Bump <gh-action-bump-version@users.noreply.github.com>
1 parent 65b7460 commit b03d83d

File tree

7 files changed

+56
-6
lines changed

7 files changed

+56
-6
lines changed
 

‎.github/workflows/ci.yml

+47
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: ci
2+
3+
on: [push]
4+
5+
jobs:
6+
build:
7+
runs-on: ubuntu-latest
8+
strategy:
9+
matrix:
10+
node-version: [16.16.0]
11+
12+
timeout-minutes: 10
13+
14+
if: "!contains(github.event.head_commit.message, 'skip ci')"
15+
steps:
16+
- uses: actions/checkout@v2
17+
- name: Use Node.js ${{ matrix.node-version }}
18+
uses: actions/setup-node@v1
19+
with:
20+
node-version: ${{ matrix.node-version }}
21+
- name: Cache node modules
22+
uses: actions/cache@v2
23+
env:
24+
cache-name: cache-node-modules
25+
with:
26+
path: ~/.npm
27+
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
28+
restore-keys: |
29+
${{ runner.os }}-build-${{ env.cache-name }}-
30+
${{ runner.os }}-build-
31+
${{ runner.os }}--
32+
- name: Authenticate with GitHub package registry
33+
run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc
34+
- name: Install
35+
run: npm ci
36+
- name: Run tests
37+
run: npm test --ci --coverage
38+
- name: Run build
39+
run: npm run build
40+
- name: 'Automated Version Bump'
41+
uses: 'phips28/gh-action-bump-version@master'
42+
env:
43+
GITHUB_TOKEN: ${{ secrets.REPO_GITHUB_TOKEN }}
44+
with:
45+
skip-tag: 'true'
46+
- name: Publish new version of serverless-utils to github packages
47+
run: npm publish

‎.husky/pre-commit

100644100755
File mode changed.

‎package-lock.json

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "rollup-plugin-typed-css-modules",
33
"description": "a rollup plugin to create css modules typescript declaration files",
4-
"version": "0.0.1",
4+
"version": "0.0.2",
55
"author": "gzliew",
66
"main": "dist/index.commonjs.js",
77
"module": "dist/index.module.js",

‎tests/fixtures/src/hello.module.css.d.ts

Whitespace-only changes.

‎tests/fixtures/src/index.ts

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
export default function test() {
2+
return 'hey';
3+
}

‎tests/index.test.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ process.chdir(`${__dirname}/fixtures`);
1717

1818
async function build(pluginOptions) {
1919
await rollup({
20-
input: 'src/index.js',
20+
input: 'src/index.ts',
2121
plugins: [dts(pluginOptions)]
2222
});
2323
}
@@ -31,7 +31,7 @@ describe('typed css modules', () => {
3131
test('No config passed', async () => {
3232
await build();
3333

34-
expect(await fs.pathExists('src/hello.module.css.d.ts')).toBe(false);
34+
expect(await fs.pathExists('src/hello.module.css.d.ts')).toBe(true);
3535
expect(await fs.pathExists('dist/hello.module.css.d.ts')).toBe(true);
3636
});
3737

@@ -42,7 +42,7 @@ describe('typed css modules', () => {
4242
pattern: '**/*.module.css'
4343
});
4444

45-
expect(await fs.pathExists('src/hello.module.css.d.ts')).toBe(false);
45+
expect(await fs.pathExists('src/hello.module.css.d.ts')).toBe(true);
4646
expect(await fs.pathExists('dist/hello.module.css.d.ts')).toBe(true);
4747
});
4848

0 commit comments

Comments
 (0)
Please sign in to comment.