Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: mrmckeb/typescript-plugin-css-modules
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v4.2.0
Choose a base ref
...
head repository: mrmckeb/typescript-plugin-css-modules
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v4.2.1
Choose a head ref
  • 2 commits
  • 5 files changed
  • 1 contributor

Commits on Feb 19, 2023

  1. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    da7b048 View commit details
  2. chore: bump version

    mrmckeb committed Feb 19, 2023
    Copy the full SHA
    9ef8e07 View commit details
Showing with 6 additions and 6 deletions.
  1. +1 −1 README.md
  2. +1 −1 package.json
  3. +2 −2 src/helpers/__tests__/getDtsSnapshot.test.ts
  4. +1 −1 src/helpers/getCssExports.ts
  5. +1 −1 src/options.ts
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -99,7 +99,7 @@ Please note that no options are required. However, depending on your configurati

| Option | Default value | Description |
| -------------------------- | ---------------------------------- | ------------------------------------------------------------------------------ |
| `additonalData` | `undefined` | An optional string to append to the top of source files. |
| `additionalData` | `undefined` | An optional string to append to the top of source files. |
| `allowUnknownClassnames` | `false` | Disables TypeScript warnings on unknown classnames (for default imports only). |
| `classnameTransform` | `"asIs"` | See [`classnameTransform`](#classnameTransform) below. |
| `customMatcher` | `"\\.module\\.(c\|le\|sa\|sc)ss$"` | Changes the file extensions that this plugin processes. |
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "typescript-plugin-css-modules",
"version": "4.2.0",
"version": "4.2.1",
"main": "dist/index.js",
"author": "Brody McKee <mrmckeb@hotmail.com>",
"license": "MIT",
4 changes: 2 additions & 2 deletions src/helpers/__tests__/getDtsSnapshot.test.ts
Original file line number Diff line number Diff line change
@@ -331,11 +331,11 @@ describe('helpers / cssSnapshots', () => {
});
});

describe('with additonalData enabled', () => {
describe('with additionalData enabled', () => {
const fileName = join(__dirname, 'fixtures', 'test.module.scss');
const css = readFileSync(fileName, 'utf8');
const options: Options = {
additonalData: '.my-data {\n color: red;\n}\n\n',
additionalData: '.my-data {\n color: red;\n}\n\n',
};

const cssExports = getCssExports({
2 changes: 1 addition & 1 deletion src/helpers/getCssExports.ts
Original file line number Diff line number Diff line change
@@ -52,7 +52,7 @@ export const getCssExports = ({
compilerOptions: tsModule.CompilerOptions;
directory: string;
}): CSSExportsWithSourceMap => {
const rawCss = options.additonalData ? options.additonalData + css : css;
const rawCss = options.additionalData ? options.additionalData + css : css;

const fileType = getFileType(fileName);
const rendererOptions = options.rendererOptions ?? {};
2 changes: 1 addition & 1 deletion src/options.ts
Original file line number Diff line number Diff line change
@@ -20,7 +20,7 @@ export interface RendererOptions {
}

export interface Options {
additonalData?: string;
additionalData?: string;
allowUnknownClassnames?: boolean;
classnameTransform?: ClassnameTransformOptions;
customMatcher?: string;