So called “infancy gospel” is bogus:
“The Infancy Narrative of James is also known as the Protevangelium of James. In The Other Gospels, Ron Cameron says that the name Protevangelium “implies that most of the events recorded in this ‘initial gospel’ of James occur prior to those recorded in the gospels of the New Testament.”
***The gospel received this name when it was first published in the sixteenth century.***
“There are about one hundred and thirty Greek manuscripts containing the Infancy Gospel of James, but ***the vast majority of these come from the tenth century or later.***
***The earliest known manuscript of the text was found in 1958***; it is now kept in Geneva’s Bodmer Library. The manuscript dates to the third century; however, according to Cameron, “many of its readings seem to be secondary.”
“Cameron identifies three different sources for the Infancy Gospel of James: extracanonical traditions, the Old Testament, and the Gospels of Matthew and Luke. The mythical element of birth in a cave, for example, is an extracanonical also known to Justin Martyr. Cameron states of the author’s use of Jewish scriptures: “Not only are individual words, phrases, and even whole paragraphs reminiscent of the Septuagint; such discrete forms as the hymn and the lament of Anna also display conscious, direct ‘remembrance’ of the stories recorded in the scriptures.” Concerning the use of the canonical gospels, Cameron observes, “Frequently the respective passages in Matthew and Luke are harmonized into a single story in the Protevangelium of James; in some instances the two texts are conflated. It is by combining composite traditions with a harmony of the synoptic infancy stories that the Protevangelium of James has constructed the dramatic scenes of its gospel.”
Quotes are from Wiki