Skip to content

Commit

Permalink
feat(compiler): remove deprecated compile/compileSync
Browse files Browse the repository at this point in the history
Use transpile/transpileSync instead.
  • Loading branch information
adamdbradley committed Aug 4, 2020
1 parent 2089481 commit 58a27d2
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 31 deletions.
2 changes: 1 addition & 1 deletion src/compiler/index.ts
Expand Up @@ -8,7 +8,6 @@ if (IS_WEB_WORKER_ENV) {
initWebWorkerThread(createWorkerMessageHandler(createSystem()));
}

export { compile, compileSync, transpile, transpileSync } from './transpile';
export { createCompiler } from './compiler';
export { createPrerenderer } from './prerender/prerender-main';
export { createSystem } from './sys/stencil-sys';
Expand All @@ -19,5 +18,6 @@ export { loadConfig } from './config/load-config';
export { optimizeCss } from './optimize/optimize-css';
export { optimizeJs } from './optimize/optimize-js';
export { path } from './sys/modules/path';
export { transpile, transpileSync } from './transpile';
export { version, versions, vermoji, buildId } from '../version';
export { ts };
20 changes: 0 additions & 20 deletions src/compiler/public.ts
Expand Up @@ -141,23 +141,3 @@ export {
TranspileOptions,
TranspileResults,
};

/**
* @deprecated Use `transpile()` instead.
*/
export declare const compile: (code: string, opts?: any) => Promise<any>;

/**
* @deprecated Use `transpileSync()` instead.
*/
export declare const compileSync: (code: string, opts?: any) => any;

/**
* @deprecated Use TranspileOptions instead
*/
export type CompileOptions = any;

/**
* @deprecated Use TranspileResults instead
*/
export type CompileResults = any;
10 changes: 0 additions & 10 deletions src/compiler/transpile.ts
Expand Up @@ -126,13 +126,3 @@ const transpileJson = (results: TranspileResults) => {

// NOTE: if you change this, also change scripts/bundles/helpers/jest/jest-preset.js
const shouldTranspileModule = (ext: string) => ['tsx', 'ts', 'mjs', 'jsx', 'js'].includes(ext);

export const compile = (code: string, opts: any = {}): Promise<any> => {
console.warn(`compile() deprecated, please use transpile() instead`);
return transpile(code, opts);
};

export const compileSync = (code: string, opts: any = {}): any => {
console.warn(`compileSync() deprecated, please use transpileSync() instead`);
return transpileSync(code, opts);
};

0 comments on commit 58a27d2

Please sign in to comment.