chore(NA): remove src folder from kbn-h** pkgs

This commit is contained in:
Tiago Costa 2022-08-10 04:18:32 +01:00
parent ec5610bd5d
commit dcdf72bcc1
No known key found for this signature in database
GPG key ID: BAECC2D04A04C6EA
19 changed files with 83 additions and 71 deletions

View file

@ -18,7 +18,7 @@
> * See `packages/kbn-handlebars/LICENSE` for more information.
> */
>
> import Handlebars from '..';
> import Handlebars from '../..';
> import { expectTemplate } from '../__jest__/test_bench';
>
> describe('basic context', () => {

View file

@ -8,11 +8,21 @@ TYPES_PKG_REQUIRE_NAME = "@types/kbn__handlebars"
SOURCE_FILES = glob(
[
"src/**/*.ts",
"**/*.ts",
],
exclude = [
"**/*.config.js",
"**/*.mock.*",
"**/*.test.*",
"**/*.stories.*",
"**/__jest__/**",
"**/__snapshots__/**",
"**/integration_tests/**",
"**/mocks/**",
"**/scripts/**",
"**/storybook/**",
"**/test_fixtures/**",
"**/test_helpers/**",
],
)
@ -42,14 +52,12 @@ jsts_transpiler(
name = "target_node",
srcs = SRCS,
build_pkg_name = package_name(),
root_input_dir = "src",
)
jsts_transpiler(
name = "target_web",
srcs = SRCS,
build_pkg_name = package_name(),
root_input_dir = "src",
web = True,
)
@ -71,7 +79,6 @@ ts_project(
declaration_map = True,
emit_declaration_only = True,
out_dir = "target_types",
root_dir = "src",
tsconfig = ":tsconfig",
)

View file

@ -11,7 +11,7 @@
*/
import Handlebars from '.';
import { expectTemplate } from './__jest__/test_bench';
import { expectTemplate } from './src/__jest__/test_bench';
it('Handlebars.create', () => {
expect(Handlebars.create()).toMatchSnapshot();

View file

@ -3,7 +3,7 @@
* See `packages/kbn-handlebars/LICENSE` for more information.
*/
import Handlebars, { ExtendedCompileOptions, ExtendedRuntimeOptions } from '..';
import Handlebars, { ExtendedCompileOptions, ExtendedRuntimeOptions } from '../..';
declare global {
var kbnHandlebarsEnv: typeof Handlebars | null; // eslint-disable-line no-var

View file

@ -5,7 +5,7 @@
* See `packages/kbn-handlebars/LICENSE` for more information.
*/
import Handlebars from '..';
import Handlebars from '../..';
import { expectTemplate } from '../__jest__/test_bench';
describe('basic context', () => {

View file

@ -7,7 +7,7 @@
/* eslint-disable max-classes-per-file */
import Handlebars from '..';
import Handlebars from '../..';
import { expectTemplate } from '../__jest__/test_bench';
describe('builtin helpers', () => {

View file

@ -5,7 +5,7 @@
* See `packages/kbn-handlebars/LICENSE` for more information.
*/
import Handlebars from '..';
import Handlebars from '../..';
describe('compiler', () => {
const compileFns = ['compile', 'compileAST'];

View file

@ -5,7 +5,7 @@
* See `packages/kbn-handlebars/LICENSE` for more information.
*/
import Handlebars from '..';
import Handlebars from '../..';
import { expectTemplate } from '../__jest__/test_bench';
describe('data', () => {

View file

@ -5,7 +5,7 @@
* See `packages/kbn-handlebars/LICENSE` for more information.
*/
import Handlebars from '..';
import Handlebars from '../..';
import { expectTemplate } from '../__jest__/test_bench';
beforeEach(() => {

View file

@ -5,7 +5,7 @@
* See `packages/kbn-handlebars/LICENSE` for more information.
*/
import Handlebars from '..';
import Handlebars from '../..';
import { expectTemplate } from '../__jest__/test_bench';
describe('security issues', () => {

View file

@ -5,7 +5,7 @@
* See `packages/kbn-handlebars/LICENSE` for more information.
*/
import Handlebars from '..';
import Handlebars from '../..';
import { expectTemplate } from '../__jest__/test_bench';
describe('subexpressions', () => {

View file

@ -5,7 +5,7 @@
* See `packages/kbn-handlebars/LICENSE` for more information.
*/
import Handlebars from '..';
import Handlebars from '../..';
import { expectTemplate } from '../__jest__/test_bench';
describe('utils', function () {

View file

@ -5,13 +5,12 @@
"declarationMap": true,
"emitDeclarationOnly": true,
"outDir": "./target_types",
"rootDir": "src",
"types": [
"jest",
"node"
]
},
"include": [
"src/**/*.ts"
"**/*.ts"
]
}

View file

@ -7,11 +7,20 @@ PKG_REQUIRE_NAME = "@kbn/hapi-mocks"
SOURCE_FILES = glob(
[
"src/**/*.ts",
"**/*.ts",
],
exclude = [
"**/*.config.js",
"**/*.mock.*",
"**/*.test.*",
"**/*.stories.*",
"**/__snapshots__/**",
"**/integration_tests/**",
"**/mocks/**",
"**/scripts/**",
"**/storybook/**",
"**/test_fixtures/**",
"**/test_helpers/**",
],
)
@ -43,7 +52,6 @@ jsts_transpiler(
name = "target_node",
srcs = SRCS,
build_pkg_name = package_name(),
root_input_dir = "src",
)
ts_config(
@ -64,7 +72,6 @@ ts_project(
declaration_map = True,
emit_declaration_only = True,
out_dir = "target_types",
root_dir = "src",
tsconfig = ":tsconfig",
)

View file

@ -6,7 +6,7 @@
* Side Public License, v 1.
*/
import { createRequestMock } from './request';
import { createRequestMock } from './src/request';
export const hapiMocks = {
createRequest: createRequestMock,

View file

@ -5,7 +5,6 @@
"declarationMap": true,
"emitDeclarationOnly": true,
"outDir": "target_types",
"rootDir": "src",
"stripInternal": false,
"types": [
"jest",
@ -13,6 +12,6 @@
]
},
"include": [
"src/**/*"
"**/*.ts"
]
}