mirror of
https://github.com/strapi/strapi.git
synced 2025-09-25 08:19:07 +00:00
Set lib & target to node 14, remove usage of Array.at
This commit is contained in:
parent
4d327803cd
commit
b3ffb28aa9
@ -1,6 +1,6 @@
|
||||
import type { SchemaUID } from '@strapi/strapi/lib/types/utils';
|
||||
|
||||
import { get } from 'lodash/fp';
|
||||
import { get, last } from 'lodash/fp';
|
||||
import { Writable } from 'stream';
|
||||
|
||||
import type { IEntity } from '../../../../../../types';
|
||||
@ -72,7 +72,7 @@ const createEntitiesWriteStream = (options: IEntitiesRestoreStreamOptions) => {
|
||||
// For each difference found on an ID attribute,
|
||||
// update the mapping the table accordingly
|
||||
diffs.forEach((diff) => {
|
||||
if (diff.kind === 'modified' && diff.path.at(-1) === 'id') {
|
||||
if (diff.kind === 'modified' && last(diff.path) === 'id') {
|
||||
const target = resolveType(diff.path);
|
||||
|
||||
// If no type is found for the given path, then ignore the diff
|
||||
|
@ -2,7 +2,8 @@
|
||||
"extends": "@tsconfig/node16/tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"strict": true,
|
||||
"lib": ["ESNEXT"],
|
||||
"lib": ["ES2020"],
|
||||
"target": "ES2020",
|
||||
"skipLibCheck": true,
|
||||
"outDir": "lib",
|
||||
"declaration": true,
|
||||
|
Loading…
x
Reference in New Issue
Block a user