From 416ce3a732eb82abbf6011eac6ab3f7530828eac Mon Sep 17 00:00:00 2001 From: Bishoy Boktor <65934617+boktorbb-amzn@users.noreply.github.com> Date: Thu, 8 Apr 2021 10:22:41 -0700 Subject: [PATCH] [Rename] elastic-safer-lodash-set (#252) Renames the elastic-safer-lodash-set to opensearch-safer-lodash-set and updated precommit hook rules and eslintignore since this package file names need to match upstream lodash Signed-off-by: Bishoy Boktor --- .eslintignore | 3 +- .../elastic-safer-lodash-set/fp/assoc.d.ts | 9 ---- packages/elastic-safer-lodash-set/fp/assoc.js | 8 ---- .../fp/assocPath.d.ts | 9 ---- .../elastic-safer-lodash-set/fp/assocPath.js | 8 ---- packages/elastic-safer-lodash-set/fp/index.js | 9 ---- packages/elastic-safer-lodash-set/fp/set.d.ts | 9 ---- packages/elastic-safer-lodash-set/fp/set.js | 13 ------ .../elastic-safer-lodash-set/fp/setWith.d.ts | 9 ---- .../elastic-safer-lodash-set/fp/setWith.js | 13 ------ packages/elastic-safer-lodash-set/index.js | 9 ---- packages/elastic-safer-lodash-set/set.d.ts | 9 ---- packages/elastic-safer-lodash-set/set.js | 8 ---- .../elastic-safer-lodash-set/setWith.d.ts | 9 ---- packages/elastic-safer-lodash-set/setWith.js | 8 ---- packages/elastic-safer-lodash-set/test/set.ts | 14 ------ .../elastic-safer-lodash-set/test/setWith.ts | 32 ------------- .../.gitignore | 0 .../.npmignore | 0 .../LICENSE | 0 .../README.md | 0 .../opensearch-safer-lodash-set/fp/assoc.d.ts | 21 +++++++++ .../opensearch-safer-lodash-set/fp/assoc.js | 20 ++++++++ .../fp/assocPath.d.ts | 21 +++++++++ .../fp/assocPath.js | 20 ++++++++ .../fp/index.d.ts | 20 ++++++-- .../opensearch-safer-lodash-set/fp/index.js | 21 +++++++++ .../opensearch-safer-lodash-set/fp/set.d.ts | 21 +++++++++ .../opensearch-safer-lodash-set/fp/set.js | 25 ++++++++++ .../fp/setWith.d.ts | 21 +++++++++ .../opensearch-safer-lodash-set/fp/setWith.js | 25 ++++++++++ .../index.d.ts | 20 ++++++-- packages/opensearch-safer-lodash-set/index.js | 21 +++++++++ .../lodash/_baseSet.js | 20 ++++++-- .../lodash/set.js | 20 ++++++-- .../lodash/setWith.js | 20 ++++++-- .../package.json | 0 .../scripts/_get_lodash.sh | 0 .../scripts/license-header.txt | 0 .../scripts/patches/_baseSet.js.patch | 0 .../scripts/save_state.sh | 0 .../scripts/update.sh | 0 packages/opensearch-safer-lodash-set/set.d.ts | 21 +++++++++ packages/opensearch-safer-lodash-set/set.js | 20 ++++++++ .../opensearch-safer-lodash-set/setWith.d.ts | 21 +++++++++ .../opensearch-safer-lodash-set/setWith.js | 20 ++++++++ .../test/fp.ts | 18 +++++++- .../test/fp_assoc.ts | 18 +++++++- .../test/fp_assocPath.ts | 18 +++++++- .../test/fp_patch_test.js | 18 +++++++- .../test/fp_set.ts | 18 +++++++- .../test/fp_setWith.ts | 18 +++++++- .../test/index.ts | 18 +++++++- .../test/patch_test.js | 18 +++++++- .../opensearch-safer-lodash-set/test/set.ts | 28 +++++++++++ .../test/setWith.ts | 46 +++++++++++++++++++ .../tsconfig.json | 0 src/dev/precommit_hook/casing_check_config.js | 2 +- 58 files changed, 583 insertions(+), 214 deletions(-) delete mode 100644 packages/elastic-safer-lodash-set/fp/assoc.d.ts delete mode 100644 packages/elastic-safer-lodash-set/fp/assoc.js delete mode 100644 packages/elastic-safer-lodash-set/fp/assocPath.d.ts delete mode 100644 packages/elastic-safer-lodash-set/fp/assocPath.js delete mode 100644 packages/elastic-safer-lodash-set/fp/index.js delete mode 100644 packages/elastic-safer-lodash-set/fp/set.d.ts delete mode 100644 packages/elastic-safer-lodash-set/fp/set.js delete mode 100644 packages/elastic-safer-lodash-set/fp/setWith.d.ts delete mode 100644 packages/elastic-safer-lodash-set/fp/setWith.js delete mode 100644 packages/elastic-safer-lodash-set/index.js delete mode 100644 packages/elastic-safer-lodash-set/set.d.ts delete mode 100644 packages/elastic-safer-lodash-set/set.js delete mode 100644 packages/elastic-safer-lodash-set/setWith.d.ts delete mode 100644 packages/elastic-safer-lodash-set/setWith.js delete mode 100644 packages/elastic-safer-lodash-set/test/set.ts delete mode 100644 packages/elastic-safer-lodash-set/test/setWith.ts rename packages/{elastic-safer-lodash-set => opensearch-safer-lodash-set}/.gitignore (100%) rename packages/{elastic-safer-lodash-set => opensearch-safer-lodash-set}/.npmignore (100%) rename packages/{elastic-safer-lodash-set => opensearch-safer-lodash-set}/LICENSE (100%) rename packages/{elastic-safer-lodash-set => opensearch-safer-lodash-set}/README.md (100%) create mode 100644 packages/opensearch-safer-lodash-set/fp/assoc.d.ts create mode 100644 packages/opensearch-safer-lodash-set/fp/assoc.js create mode 100644 packages/opensearch-safer-lodash-set/fp/assocPath.d.ts create mode 100644 packages/opensearch-safer-lodash-set/fp/assocPath.js rename packages/{elastic-safer-lodash-set => opensearch-safer-lodash-set}/fp/index.d.ts (91%) create mode 100644 packages/opensearch-safer-lodash-set/fp/index.js create mode 100644 packages/opensearch-safer-lodash-set/fp/set.d.ts create mode 100644 packages/opensearch-safer-lodash-set/fp/set.js create mode 100644 packages/opensearch-safer-lodash-set/fp/setWith.d.ts create mode 100644 packages/opensearch-safer-lodash-set/fp/setWith.js rename packages/{elastic-safer-lodash-set => opensearch-safer-lodash-set}/index.d.ts (71%) create mode 100644 packages/opensearch-safer-lodash-set/index.js rename packages/{elastic-safer-lodash-set => opensearch-safer-lodash-set}/lodash/_baseSet.js (66%) rename packages/{elastic-safer-lodash-set => opensearch-safer-lodash-set}/lodash/set.js (55%) rename packages/{elastic-safer-lodash-set => opensearch-safer-lodash-set}/lodash/setWith.js (57%) rename packages/{elastic-safer-lodash-set => opensearch-safer-lodash-set}/package.json (100%) rename packages/{elastic-safer-lodash-set => opensearch-safer-lodash-set}/scripts/_get_lodash.sh (100%) rename packages/{elastic-safer-lodash-set => opensearch-safer-lodash-set}/scripts/license-header.txt (100%) rename packages/{elastic-safer-lodash-set => opensearch-safer-lodash-set}/scripts/patches/_baseSet.js.patch (100%) rename packages/{elastic-safer-lodash-set => opensearch-safer-lodash-set}/scripts/save_state.sh (100%) rename packages/{elastic-safer-lodash-set => opensearch-safer-lodash-set}/scripts/update.sh (100%) create mode 100644 packages/opensearch-safer-lodash-set/set.d.ts create mode 100644 packages/opensearch-safer-lodash-set/set.js create mode 100644 packages/opensearch-safer-lodash-set/setWith.d.ts create mode 100644 packages/opensearch-safer-lodash-set/setWith.js rename packages/{elastic-safer-lodash-set => opensearch-safer-lodash-set}/test/fp.ts (84%) rename packages/{elastic-safer-lodash-set => opensearch-safer-lodash-set}/test/fp_assoc.ts (52%) rename packages/{elastic-safer-lodash-set => opensearch-safer-lodash-set}/test/fp_assocPath.ts (54%) rename packages/{elastic-safer-lodash-set => opensearch-safer-lodash-set}/test/fp_patch_test.js (92%) rename packages/{elastic-safer-lodash-set => opensearch-safer-lodash-set}/test/fp_set.ts (52%) rename packages/{elastic-safer-lodash-set => opensearch-safer-lodash-set}/test/fp_setWith.ts (70%) rename packages/{elastic-safer-lodash-set => opensearch-safer-lodash-set}/test/index.ts (52%) rename packages/{elastic-safer-lodash-set => opensearch-safer-lodash-set}/test/patch_test.js (86%) create mode 100644 packages/opensearch-safer-lodash-set/test/set.ts create mode 100644 packages/opensearch-safer-lodash-set/test/setWith.ts rename packages/{elastic-safer-lodash-set => opensearch-safer-lodash-set}/tsconfig.json (100%) diff --git a/.eslintignore b/.eslintignore index ec733bfa1f77..a495516fd869 100644 --- a/.eslintignore +++ b/.eslintignore @@ -22,7 +22,8 @@ target /src/plugins/vis_type_timeline/public/_generated_/** # package overrides -/packages/elastic-eslint-config-kibana +/packages/opensearch-eslint-config-opensearch-dashboards +/packages/opensearch-safer-lodash-set /packages/osd-interpreter/src/common/lib/grammar.js /packages/osd-plugin-generator/template /packages/osd-pm/dist diff --git a/packages/elastic-safer-lodash-set/fp/assoc.d.ts b/packages/elastic-safer-lodash-set/fp/assoc.d.ts deleted file mode 100644 index 57fe84d0b07f..000000000000 --- a/packages/elastic-safer-lodash-set/fp/assoc.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -/* - * This file is forked from the DefinitelyTyped project (https://github.com/DefinitelyTyped/DefinitelyTyped), - * and may include modifications made by Elasticsearch B.V. - * Elasticsearch B.V. licenses this file to you under the MIT License. - * See `packages/elastic-safer-lodash-set/LICENSE` for more information. - */ - -import { assoc } from './index'; -export = assoc; diff --git a/packages/elastic-safer-lodash-set/fp/assoc.js b/packages/elastic-safer-lodash-set/fp/assoc.js deleted file mode 100644 index 851e11690ea3..000000000000 --- a/packages/elastic-safer-lodash-set/fp/assoc.js +++ /dev/null @@ -1,8 +0,0 @@ -/* - * This file is forked from the lodash project (https://lodash.com/), - * and may include modifications made by Elasticsearch B.V. - * Elasticsearch B.V. licenses this file to you under the MIT License. - * See `packages/elastic-safer-lodash-set/LICENSE` for more information. - */ - -module.exports = require('./set'); diff --git a/packages/elastic-safer-lodash-set/fp/assocPath.d.ts b/packages/elastic-safer-lodash-set/fp/assocPath.d.ts deleted file mode 100644 index 76df38e98ff2..000000000000 --- a/packages/elastic-safer-lodash-set/fp/assocPath.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -/* - * This file is forked from the DefinitelyTyped project (https://github.com/DefinitelyTyped/DefinitelyTyped), - * and may include modifications made by Elasticsearch B.V. - * Elasticsearch B.V. licenses this file to you under the MIT License. - * See `packages/elastic-safer-lodash-set/LICENSE` for more information. - */ - -import { assocPath } from './index'; -export = assocPath; diff --git a/packages/elastic-safer-lodash-set/fp/assocPath.js b/packages/elastic-safer-lodash-set/fp/assocPath.js deleted file mode 100644 index 851e11690ea3..000000000000 --- a/packages/elastic-safer-lodash-set/fp/assocPath.js +++ /dev/null @@ -1,8 +0,0 @@ -/* - * This file is forked from the lodash project (https://lodash.com/), - * and may include modifications made by Elasticsearch B.V. - * Elasticsearch B.V. licenses this file to you under the MIT License. - * See `packages/elastic-safer-lodash-set/LICENSE` for more information. - */ - -module.exports = require('./set'); diff --git a/packages/elastic-safer-lodash-set/fp/index.js b/packages/elastic-safer-lodash-set/fp/index.js deleted file mode 100644 index 7d9cdb099dfd..000000000000 --- a/packages/elastic-safer-lodash-set/fp/index.js +++ /dev/null @@ -1,9 +0,0 @@ -/* - * This file is forked from the lodash project (https://lodash.com/), - * and may include modifications made by Elasticsearch B.V. - * Elasticsearch B.V. licenses this file to you under the MIT License. - * See `packages/elastic-safer-lodash-set/LICENSE` for more information. - */ - -exports.set = exports.assoc = exports.assocPath = require('./set'); -exports.setWith = require('./setWith'); diff --git a/packages/elastic-safer-lodash-set/fp/set.d.ts b/packages/elastic-safer-lodash-set/fp/set.d.ts deleted file mode 100644 index 16bc98658bdc..000000000000 --- a/packages/elastic-safer-lodash-set/fp/set.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -/* - * This file is forked from the DefinitelyTyped project (https://github.com/DefinitelyTyped/DefinitelyTyped), - * and may include modifications made by Elasticsearch B.V. - * Elasticsearch B.V. licenses this file to you under the MIT License. - * See `packages/elastic-safer-lodash-set/LICENSE` for more information. - */ - -import { set } from './index'; -export = set; diff --git a/packages/elastic-safer-lodash-set/fp/set.js b/packages/elastic-safer-lodash-set/fp/set.js deleted file mode 100644 index 0fb48694d736..000000000000 --- a/packages/elastic-safer-lodash-set/fp/set.js +++ /dev/null @@ -1,13 +0,0 @@ -/* - * This file is forked from the lodash project (https://lodash.com/), - * and may include modifications made by Elasticsearch B.V. - * Elasticsearch B.V. licenses this file to you under the MIT License. - * See `packages/elastic-safer-lodash-set/LICENSE` for more information. - */ - -/*eslint no-var:0 */ -var convert = require('lodash/fp/convert'); -var func = convert('set', require('../set')); - -func.placeholder = require('lodash/fp/placeholder'); -module.exports = func; diff --git a/packages/elastic-safer-lodash-set/fp/setWith.d.ts b/packages/elastic-safer-lodash-set/fp/setWith.d.ts deleted file mode 100644 index 556e702f59f0..000000000000 --- a/packages/elastic-safer-lodash-set/fp/setWith.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -/* - * This file is forked from the DefinitelyTyped project (https://github.com/DefinitelyTyped/DefinitelyTyped), - * and may include modifications made by Elasticsearch B.V. - * Elasticsearch B.V. licenses this file to you under the MIT License. - * See `packages/elastic-safer-lodash-set/LICENSE` for more information. - */ - -import { setWith } from './index'; -export = setWith; diff --git a/packages/elastic-safer-lodash-set/fp/setWith.js b/packages/elastic-safer-lodash-set/fp/setWith.js deleted file mode 100644 index e477d4b4bc7b..000000000000 --- a/packages/elastic-safer-lodash-set/fp/setWith.js +++ /dev/null @@ -1,13 +0,0 @@ -/* - * This file is forked from the lodash project (https://lodash.com/), - * and may include modifications made by Elasticsearch B.V. - * Elasticsearch B.V. licenses this file to you under the MIT License. - * See `packages/elastic-safer-lodash-set/LICENSE` for more information. - */ - -/*eslint no-var:0 */ -var convert = require('lodash/fp/convert'); -var func = convert('setWith', require('../setWith')); - -func.placeholder = require('lodash/fp/placeholder'); -module.exports = func; diff --git a/packages/elastic-safer-lodash-set/index.js b/packages/elastic-safer-lodash-set/index.js deleted file mode 100644 index d9edb25476c1..000000000000 --- a/packages/elastic-safer-lodash-set/index.js +++ /dev/null @@ -1,9 +0,0 @@ -/* - * This file is forked from the lodash project (https://lodash.com/), - * and may include modifications made by Elasticsearch B.V. - * Elasticsearch B.V. licenses this file to you under the MIT License. - * See `packages/elastic-safer-lodash-set/LICENSE` for more information. - */ - -exports.set = require('./lodash/set'); -exports.setWith = require('./lodash/setWith'); diff --git a/packages/elastic-safer-lodash-set/set.d.ts b/packages/elastic-safer-lodash-set/set.d.ts deleted file mode 100644 index 16bc98658bdc..000000000000 --- a/packages/elastic-safer-lodash-set/set.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -/* - * This file is forked from the DefinitelyTyped project (https://github.com/DefinitelyTyped/DefinitelyTyped), - * and may include modifications made by Elasticsearch B.V. - * Elasticsearch B.V. licenses this file to you under the MIT License. - * See `packages/elastic-safer-lodash-set/LICENSE` for more information. - */ - -import { set } from './index'; -export = set; diff --git a/packages/elastic-safer-lodash-set/set.js b/packages/elastic-safer-lodash-set/set.js deleted file mode 100644 index 697706290854..000000000000 --- a/packages/elastic-safer-lodash-set/set.js +++ /dev/null @@ -1,8 +0,0 @@ -/* - * This file is forked from the lodash project (https://lodash.com/), - * and may include modifications made by Elasticsearch B.V. - * Elasticsearch B.V. licenses this file to you under the MIT License. - * See `packages/elastic-safer-lodash-set/LICENSE` for more information. - */ - -module.exports = require('./lodash/set'); diff --git a/packages/elastic-safer-lodash-set/setWith.d.ts b/packages/elastic-safer-lodash-set/setWith.d.ts deleted file mode 100644 index 556e702f59f0..000000000000 --- a/packages/elastic-safer-lodash-set/setWith.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -/* - * This file is forked from the DefinitelyTyped project (https://github.com/DefinitelyTyped/DefinitelyTyped), - * and may include modifications made by Elasticsearch B.V. - * Elasticsearch B.V. licenses this file to you under the MIT License. - * See `packages/elastic-safer-lodash-set/LICENSE` for more information. - */ - -import { setWith } from './index'; -export = setWith; diff --git a/packages/elastic-safer-lodash-set/setWith.js b/packages/elastic-safer-lodash-set/setWith.js deleted file mode 100644 index aafa8a4db4be..000000000000 --- a/packages/elastic-safer-lodash-set/setWith.js +++ /dev/null @@ -1,8 +0,0 @@ -/* - * This file is forked from the lodash project (https://lodash.com/), - * and may include modifications made by Elasticsearch B.V. - * Elasticsearch B.V. licenses this file to you under the MIT License. - * See `packages/elastic-safer-lodash-set/LICENSE` for more information. - */ - -module.exports = require('./lodash/setWith'); diff --git a/packages/elastic-safer-lodash-set/test/set.ts b/packages/elastic-safer-lodash-set/test/set.ts deleted file mode 100644 index 9829ac3f04ce..000000000000 --- a/packages/elastic-safer-lodash-set/test/set.ts +++ /dev/null @@ -1,14 +0,0 @@ -/* - * Elasticsearch B.V licenses this file to you under the MIT License. - * See `packages/elastic-safer-lodash-set/LICENSE` for more information. - */ - -import { expectType } from 'tsd'; -import set from '../set'; - -const someObj: object = {}; -const anyValue: any = 'any value'; - -expectType(set(someObj, 'a.b.c', anyValue)); -expectType(set(someObj, ['a.b.c'], anyValue)); -expectType(set(someObj, ['a.b.c', 2, Symbol('hep')], anyValue)); diff --git a/packages/elastic-safer-lodash-set/test/setWith.ts b/packages/elastic-safer-lodash-set/test/setWith.ts deleted file mode 100644 index b3ed93443c4f..000000000000 --- a/packages/elastic-safer-lodash-set/test/setWith.ts +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Elasticsearch B.V licenses this file to you under the MIT License. - * See `packages/elastic-safer-lodash-set/LICENSE` for more information. - */ - -import { expectType } from 'tsd'; -import setWith from '../setWith'; - -const someObj: object = {}; -const anyValue: any = 'any value'; - -expectType( - setWith(someObj, 'a.b.c', anyValue, (value, key, obj) => { - expectType(value); - expectType(key); - expectType(obj); - }) -); -expectType( - setWith(someObj, ['a.b.c'], anyValue, (value, key, obj) => { - expectType(value); - expectType(key); - expectType(obj); - }) -); -expectType( - setWith(someObj, ['a.b.c', 2, Symbol('hep')], anyValue, (value, key, obj) => { - expectType(value); - expectType(key); - expectType(obj); - }) -); diff --git a/packages/elastic-safer-lodash-set/.gitignore b/packages/opensearch-safer-lodash-set/.gitignore similarity index 100% rename from packages/elastic-safer-lodash-set/.gitignore rename to packages/opensearch-safer-lodash-set/.gitignore diff --git a/packages/elastic-safer-lodash-set/.npmignore b/packages/opensearch-safer-lodash-set/.npmignore similarity index 100% rename from packages/elastic-safer-lodash-set/.npmignore rename to packages/opensearch-safer-lodash-set/.npmignore diff --git a/packages/elastic-safer-lodash-set/LICENSE b/packages/opensearch-safer-lodash-set/LICENSE similarity index 100% rename from packages/elastic-safer-lodash-set/LICENSE rename to packages/opensearch-safer-lodash-set/LICENSE diff --git a/packages/elastic-safer-lodash-set/README.md b/packages/opensearch-safer-lodash-set/README.md similarity index 100% rename from packages/elastic-safer-lodash-set/README.md rename to packages/opensearch-safer-lodash-set/README.md diff --git a/packages/opensearch-safer-lodash-set/fp/assoc.d.ts b/packages/opensearch-safer-lodash-set/fp/assoc.d.ts new file mode 100644 index 000000000000..405135ac18c7 --- /dev/null +++ b/packages/opensearch-safer-lodash-set/fp/assoc.d.ts @@ -0,0 +1,21 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +import { assoc } from './index'; +export = assoc; diff --git a/packages/opensearch-safer-lodash-set/fp/assoc.js b/packages/opensearch-safer-lodash-set/fp/assoc.js new file mode 100644 index 000000000000..a19b80cce276 --- /dev/null +++ b/packages/opensearch-safer-lodash-set/fp/assoc.js @@ -0,0 +1,20 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +module.exports = require('./set'); diff --git a/packages/opensearch-safer-lodash-set/fp/assocPath.d.ts b/packages/opensearch-safer-lodash-set/fp/assocPath.d.ts new file mode 100644 index 000000000000..641b2fab7ae3 --- /dev/null +++ b/packages/opensearch-safer-lodash-set/fp/assocPath.d.ts @@ -0,0 +1,21 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +import { assocPath } from './index'; +export = assocPath; diff --git a/packages/opensearch-safer-lodash-set/fp/assocPath.js b/packages/opensearch-safer-lodash-set/fp/assocPath.js new file mode 100644 index 000000000000..a19b80cce276 --- /dev/null +++ b/packages/opensearch-safer-lodash-set/fp/assocPath.js @@ -0,0 +1,20 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +module.exports = require('./set'); diff --git a/packages/elastic-safer-lodash-set/fp/index.d.ts b/packages/opensearch-safer-lodash-set/fp/index.d.ts similarity index 91% rename from packages/elastic-safer-lodash-set/fp/index.d.ts rename to packages/opensearch-safer-lodash-set/fp/index.d.ts index fcd7ff01e3cc..c43a227bc11f 100644 --- a/packages/elastic-safer-lodash-set/fp/index.d.ts +++ b/packages/opensearch-safer-lodash-set/fp/index.d.ts @@ -1,8 +1,20 @@ /* - * This file is forked from the DefinitelyTyped project (https://github.com/DefinitelyTyped/DefinitelyTyped), - * and may include modifications made by Elasticsearch B.V. - * Elasticsearch B.V. licenses this file to you under the MIT License. - * See `packages/elastic-safer-lodash-set/LICENSE` for more information. + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. */ import lodash = require('lodash'); diff --git a/packages/opensearch-safer-lodash-set/fp/index.js b/packages/opensearch-safer-lodash-set/fp/index.js new file mode 100644 index 000000000000..a733adf99ff6 --- /dev/null +++ b/packages/opensearch-safer-lodash-set/fp/index.js @@ -0,0 +1,21 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +exports.set = exports.assoc = exports.assocPath = require('./set'); +exports.setWith = require('./setWith'); diff --git a/packages/opensearch-safer-lodash-set/fp/set.d.ts b/packages/opensearch-safer-lodash-set/fp/set.d.ts new file mode 100644 index 000000000000..195a9603a299 --- /dev/null +++ b/packages/opensearch-safer-lodash-set/fp/set.d.ts @@ -0,0 +1,21 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +import { set } from './index'; +export = set; diff --git a/packages/opensearch-safer-lodash-set/fp/set.js b/packages/opensearch-safer-lodash-set/fp/set.js new file mode 100644 index 000000000000..fda28f38aeee --- /dev/null +++ b/packages/opensearch-safer-lodash-set/fp/set.js @@ -0,0 +1,25 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +/*eslint no-var:0 */ +var convert = require('lodash/fp/convert'); +var func = convert('set', require('../set')); + +func.placeholder = require('lodash/fp/placeholder'); +module.exports = func; diff --git a/packages/opensearch-safer-lodash-set/fp/setWith.d.ts b/packages/opensearch-safer-lodash-set/fp/setWith.d.ts new file mode 100644 index 000000000000..d003869ec931 --- /dev/null +++ b/packages/opensearch-safer-lodash-set/fp/setWith.d.ts @@ -0,0 +1,21 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +import { setWith } from './index'; +export = setWith; diff --git a/packages/opensearch-safer-lodash-set/fp/setWith.js b/packages/opensearch-safer-lodash-set/fp/setWith.js new file mode 100644 index 000000000000..f2fe56e52f46 --- /dev/null +++ b/packages/opensearch-safer-lodash-set/fp/setWith.js @@ -0,0 +1,25 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +/*eslint no-var:0 */ +var convert = require('lodash/fp/convert'); +var func = convert('setWith', require('../setWith')); + +func.placeholder = require('lodash/fp/placeholder'); +module.exports = func; diff --git a/packages/elastic-safer-lodash-set/index.d.ts b/packages/opensearch-safer-lodash-set/index.d.ts similarity index 71% rename from packages/elastic-safer-lodash-set/index.d.ts rename to packages/opensearch-safer-lodash-set/index.d.ts index aaff01f11a7a..ba54e553de37 100644 --- a/packages/elastic-safer-lodash-set/index.d.ts +++ b/packages/opensearch-safer-lodash-set/index.d.ts @@ -1,8 +1,20 @@ /* - * This file is forked from the DefinitelyTyped project (https://github.com/DefinitelyTyped/DefinitelyTyped), - * and may include modifications made by Elasticsearch B.V. - * Elasticsearch B.V. licenses this file to you under the MIT License. - * See `packages/elastic-safer-lodash-set/LICENSE` for more information. + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. */ export = SaferLodashSet; diff --git a/packages/opensearch-safer-lodash-set/index.js b/packages/opensearch-safer-lodash-set/index.js new file mode 100644 index 000000000000..caff7e2e7416 --- /dev/null +++ b/packages/opensearch-safer-lodash-set/index.js @@ -0,0 +1,21 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +exports.set = require('./lodash/set'); +exports.setWith = require('./lodash/setWith'); diff --git a/packages/elastic-safer-lodash-set/lodash/_baseSet.js b/packages/opensearch-safer-lodash-set/lodash/_baseSet.js similarity index 66% rename from packages/elastic-safer-lodash-set/lodash/_baseSet.js rename to packages/opensearch-safer-lodash-set/lodash/_baseSet.js index 9cbf19808edd..0016534e3589 100644 --- a/packages/elastic-safer-lodash-set/lodash/_baseSet.js +++ b/packages/opensearch-safer-lodash-set/lodash/_baseSet.js @@ -1,8 +1,20 @@ /* - * This file is forked from the lodash project (https://lodash.com/), - * and may include modifications made by Elasticsearch B.V. - * Elasticsearch B.V. licenses this file to you under the MIT License. - * See `packages/elastic-safer-lodash-set/LICENSE` for more information. + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. */ /* eslint-disable */ diff --git a/packages/elastic-safer-lodash-set/lodash/set.js b/packages/opensearch-safer-lodash-set/lodash/set.js similarity index 55% rename from packages/elastic-safer-lodash-set/lodash/set.js rename to packages/opensearch-safer-lodash-set/lodash/set.js index 740f7c926ee4..45f5d26892fa 100644 --- a/packages/elastic-safer-lodash-set/lodash/set.js +++ b/packages/opensearch-safer-lodash-set/lodash/set.js @@ -1,8 +1,20 @@ /* - * This file is forked from the lodash project (https://lodash.com/), - * and may include modifications made by Elasticsearch B.V. - * Elasticsearch B.V. licenses this file to you under the MIT License. - * See `packages/elastic-safer-lodash-set/LICENSE` for more information. + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. */ /* eslint-disable */ diff --git a/packages/elastic-safer-lodash-set/lodash/setWith.js b/packages/opensearch-safer-lodash-set/lodash/setWith.js similarity index 57% rename from packages/elastic-safer-lodash-set/lodash/setWith.js rename to packages/opensearch-safer-lodash-set/lodash/setWith.js index 0ac4f4c9cf39..dfd35aecb877 100644 --- a/packages/elastic-safer-lodash-set/lodash/setWith.js +++ b/packages/opensearch-safer-lodash-set/lodash/setWith.js @@ -1,8 +1,20 @@ /* - * This file is forked from the lodash project (https://lodash.com/), - * and may include modifications made by Elasticsearch B.V. - * Elasticsearch B.V. licenses this file to you under the MIT License. - * See `packages/elastic-safer-lodash-set/LICENSE` for more information. + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. */ /* eslint-disable */ diff --git a/packages/elastic-safer-lodash-set/package.json b/packages/opensearch-safer-lodash-set/package.json similarity index 100% rename from packages/elastic-safer-lodash-set/package.json rename to packages/opensearch-safer-lodash-set/package.json diff --git a/packages/elastic-safer-lodash-set/scripts/_get_lodash.sh b/packages/opensearch-safer-lodash-set/scripts/_get_lodash.sh similarity index 100% rename from packages/elastic-safer-lodash-set/scripts/_get_lodash.sh rename to packages/opensearch-safer-lodash-set/scripts/_get_lodash.sh diff --git a/packages/elastic-safer-lodash-set/scripts/license-header.txt b/packages/opensearch-safer-lodash-set/scripts/license-header.txt similarity index 100% rename from packages/elastic-safer-lodash-set/scripts/license-header.txt rename to packages/opensearch-safer-lodash-set/scripts/license-header.txt diff --git a/packages/elastic-safer-lodash-set/scripts/patches/_baseSet.js.patch b/packages/opensearch-safer-lodash-set/scripts/patches/_baseSet.js.patch similarity index 100% rename from packages/elastic-safer-lodash-set/scripts/patches/_baseSet.js.patch rename to packages/opensearch-safer-lodash-set/scripts/patches/_baseSet.js.patch diff --git a/packages/elastic-safer-lodash-set/scripts/save_state.sh b/packages/opensearch-safer-lodash-set/scripts/save_state.sh similarity index 100% rename from packages/elastic-safer-lodash-set/scripts/save_state.sh rename to packages/opensearch-safer-lodash-set/scripts/save_state.sh diff --git a/packages/elastic-safer-lodash-set/scripts/update.sh b/packages/opensearch-safer-lodash-set/scripts/update.sh similarity index 100% rename from packages/elastic-safer-lodash-set/scripts/update.sh rename to packages/opensearch-safer-lodash-set/scripts/update.sh diff --git a/packages/opensearch-safer-lodash-set/set.d.ts b/packages/opensearch-safer-lodash-set/set.d.ts new file mode 100644 index 000000000000..195a9603a299 --- /dev/null +++ b/packages/opensearch-safer-lodash-set/set.d.ts @@ -0,0 +1,21 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +import { set } from './index'; +export = set; diff --git a/packages/opensearch-safer-lodash-set/set.js b/packages/opensearch-safer-lodash-set/set.js new file mode 100644 index 000000000000..54ccf3ffc385 --- /dev/null +++ b/packages/opensearch-safer-lodash-set/set.js @@ -0,0 +1,20 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +module.exports = require('./lodash/set'); diff --git a/packages/opensearch-safer-lodash-set/setWith.d.ts b/packages/opensearch-safer-lodash-set/setWith.d.ts new file mode 100644 index 000000000000..d003869ec931 --- /dev/null +++ b/packages/opensearch-safer-lodash-set/setWith.d.ts @@ -0,0 +1,21 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +import { setWith } from './index'; +export = setWith; diff --git a/packages/opensearch-safer-lodash-set/setWith.js b/packages/opensearch-safer-lodash-set/setWith.js new file mode 100644 index 000000000000..c6033164e87c --- /dev/null +++ b/packages/opensearch-safer-lodash-set/setWith.js @@ -0,0 +1,20 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +module.exports = require('./lodash/setWith'); diff --git a/packages/elastic-safer-lodash-set/test/fp.ts b/packages/opensearch-safer-lodash-set/test/fp.ts similarity index 84% rename from packages/elastic-safer-lodash-set/test/fp.ts rename to packages/opensearch-safer-lodash-set/test/fp.ts index 7a1d6601b5e2..664cbc298ba8 100644 --- a/packages/elastic-safer-lodash-set/test/fp.ts +++ b/packages/opensearch-safer-lodash-set/test/fp.ts @@ -1,6 +1,20 @@ /* - * Elasticsearch B.V licenses this file to you under the MIT License. - * See `packages/elastic-safer-lodash-set/LICENSE` for more information. + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. */ import { expectType } from 'tsd'; diff --git a/packages/elastic-safer-lodash-set/test/fp_assoc.ts b/packages/opensearch-safer-lodash-set/test/fp_assoc.ts similarity index 52% rename from packages/elastic-safer-lodash-set/test/fp_assoc.ts rename to packages/opensearch-safer-lodash-set/test/fp_assoc.ts index 8244458cd118..7a8ca465cde4 100644 --- a/packages/elastic-safer-lodash-set/test/fp_assoc.ts +++ b/packages/opensearch-safer-lodash-set/test/fp_assoc.ts @@ -1,6 +1,20 @@ /* - * Elasticsearch B.V licenses this file to you under the MIT License. - * See `packages/elastic-safer-lodash-set/LICENSE` for more information. + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. */ import { expectType } from 'tsd'; diff --git a/packages/elastic-safer-lodash-set/test/fp_assocPath.ts b/packages/opensearch-safer-lodash-set/test/fp_assocPath.ts similarity index 54% rename from packages/elastic-safer-lodash-set/test/fp_assocPath.ts rename to packages/opensearch-safer-lodash-set/test/fp_assocPath.ts index abbfa57eeb96..0ad5cfe18f6f 100644 --- a/packages/elastic-safer-lodash-set/test/fp_assocPath.ts +++ b/packages/opensearch-safer-lodash-set/test/fp_assocPath.ts @@ -1,6 +1,20 @@ /* - * Elasticsearch B.V licenses this file to you under the MIT License. - * See `packages/elastic-safer-lodash-set/LICENSE` for more information. + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. */ import { expectType } from 'tsd'; diff --git a/packages/elastic-safer-lodash-set/test/fp_patch_test.js b/packages/opensearch-safer-lodash-set/test/fp_patch_test.js similarity index 92% rename from packages/elastic-safer-lodash-set/test/fp_patch_test.js rename to packages/opensearch-safer-lodash-set/test/fp_patch_test.js index 362ecf6f9d86..4a8f1a516279 100644 --- a/packages/elastic-safer-lodash-set/test/fp_patch_test.js +++ b/packages/opensearch-safer-lodash-set/test/fp_patch_test.js @@ -1,6 +1,20 @@ /* - * Elasticsearch B.V licenses this file to you under the MIT License. - * See `packages/elastic-safer-lodash-set/LICENSE` for more information. + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. */ const test = require('tape'); diff --git a/packages/elastic-safer-lodash-set/test/fp_set.ts b/packages/opensearch-safer-lodash-set/test/fp_set.ts similarity index 52% rename from packages/elastic-safer-lodash-set/test/fp_set.ts rename to packages/opensearch-safer-lodash-set/test/fp_set.ts index a5dbb24d33a0..34e2d6e6f0d4 100644 --- a/packages/elastic-safer-lodash-set/test/fp_set.ts +++ b/packages/opensearch-safer-lodash-set/test/fp_set.ts @@ -1,6 +1,20 @@ /* - * Elasticsearch B.V licenses this file to you under the MIT License. - * See `packages/elastic-safer-lodash-set/LICENSE` for more information. + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. */ import { expectType } from 'tsd'; diff --git a/packages/elastic-safer-lodash-set/test/fp_setWith.ts b/packages/opensearch-safer-lodash-set/test/fp_setWith.ts similarity index 70% rename from packages/elastic-safer-lodash-set/test/fp_setWith.ts rename to packages/opensearch-safer-lodash-set/test/fp_setWith.ts index 70a5197f7217..6386bef5ba49 100644 --- a/packages/elastic-safer-lodash-set/test/fp_setWith.ts +++ b/packages/opensearch-safer-lodash-set/test/fp_setWith.ts @@ -1,6 +1,20 @@ /* - * Elasticsearch B.V licenses this file to you under the MIT License. - * See `packages/elastic-safer-lodash-set/LICENSE` for more information. + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. */ import { expectType } from 'tsd'; diff --git a/packages/elastic-safer-lodash-set/test/index.ts b/packages/opensearch-safer-lodash-set/test/index.ts similarity index 52% rename from packages/elastic-safer-lodash-set/test/index.ts rename to packages/opensearch-safer-lodash-set/test/index.ts index 2090c1adcfce..02bb54daa017 100644 --- a/packages/elastic-safer-lodash-set/test/index.ts +++ b/packages/opensearch-safer-lodash-set/test/index.ts @@ -1,6 +1,20 @@ /* - * Elasticsearch B.V licenses this file to you under the MIT License. - * See `packages/elastic-safer-lodash-set/LICENSE` for more information. + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. */ import { expectType } from 'tsd'; diff --git a/packages/elastic-safer-lodash-set/test/patch_test.js b/packages/opensearch-safer-lodash-set/test/patch_test.js similarity index 86% rename from packages/elastic-safer-lodash-set/test/patch_test.js rename to packages/opensearch-safer-lodash-set/test/patch_test.js index 03dfe260009e..23d3af2f94e0 100644 --- a/packages/elastic-safer-lodash-set/test/patch_test.js +++ b/packages/opensearch-safer-lodash-set/test/patch_test.js @@ -1,6 +1,20 @@ /* - * Elasticsearch B.V licenses this file to you under the MIT License. - * See `packages/elastic-safer-lodash-set/LICENSE` for more information. + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. */ const test = require('tape'); diff --git a/packages/opensearch-safer-lodash-set/test/set.ts b/packages/opensearch-safer-lodash-set/test/set.ts new file mode 100644 index 000000000000..7e9a68b0f257 --- /dev/null +++ b/packages/opensearch-safer-lodash-set/test/set.ts @@ -0,0 +1,28 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +import { expectType } from 'tsd'; +import set from '../set'; + +const someObj: object = {}; +const anyValue: any = 'any value'; + +expectType(set(someObj, 'a.b.c', anyValue)); +expectType(set(someObj, ['a.b.c'], anyValue)); +expectType(set(someObj, ['a.b.c', 2, Symbol('hep')], anyValue)); diff --git a/packages/opensearch-safer-lodash-set/test/setWith.ts b/packages/opensearch-safer-lodash-set/test/setWith.ts new file mode 100644 index 000000000000..577a9d5c8ec8 --- /dev/null +++ b/packages/opensearch-safer-lodash-set/test/setWith.ts @@ -0,0 +1,46 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +import { expectType } from 'tsd'; +import setWith from '../setWith'; + +const someObj: object = {}; +const anyValue: any = 'any value'; + +expectType( + setWith(someObj, 'a.b.c', anyValue, (value, key, obj) => { + expectType(value); + expectType(key); + expectType(obj); + }) +); +expectType( + setWith(someObj, ['a.b.c'], anyValue, (value, key, obj) => { + expectType(value); + expectType(key); + expectType(obj); + }) +); +expectType( + setWith(someObj, ['a.b.c', 2, Symbol('hep')], anyValue, (value, key, obj) => { + expectType(value); + expectType(key); + expectType(obj); + }) +); diff --git a/packages/elastic-safer-lodash-set/tsconfig.json b/packages/opensearch-safer-lodash-set/tsconfig.json similarity index 100% rename from packages/elastic-safer-lodash-set/tsconfig.json rename to packages/opensearch-safer-lodash-set/tsconfig.json diff --git a/src/dev/precommit_hook/casing_check_config.js b/src/dev/precommit_hook/casing_check_config.js index c83af34ed01e..3552caa6e195 100644 --- a/src/dev/precommit_hook/casing_check_config.js +++ b/src/dev/precommit_hook/casing_check_config.js @@ -56,7 +56,7 @@ export const IGNORE_FILE_GLOBS = [ 'api-documenter.json', // filename must match upstream filenames from lodash - 'packages/elastic-safer-lodash-set/**/*', + 'packages/opensearch-safer-lodash-set/**/*', // TODO fix file names in APM to remove these